> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mutagent.io/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> MutagenT REST API documentation

# API Reference

The MutagenT REST API provides programmatic access to all platform features. For the easiest integration, use the official SDKs (TypeScript or Python) which wrap this API with type safety.

## Base URL

```
https://api.mutagent.io
```

## Authentication

All API requests require authentication. MutagenT supports two authentication methods:

<CodeGroup>
  ```bash API Key (recommended) theme={null}
  curl -H "x-api-key: your_api_key_here" \
    https://api.mutagent.io/api/prompt
  ```

  ```bash OAuth Bearer Token theme={null}
  curl -H "Authorization: Bearer your_oauth_token" \
    https://api.mutagent.io/api/prompt
  ```
</CodeGroup>

<Note>
  **API Key scoping** determines which headers are required. Workspace-scoped keys require no additional headers. Organization-scoped keys require `x-workspace-id`. User-scoped keys require both `x-workspace-id` and `x-organization-id`. See [API Keys](/quickstart/api-keys) for details.
</Note>

## Rate Limits

| Plan       | Requests/minute | Requests/day |
| ---------- | --------------- | ------------ |
| Free       | 60              | 1,000        |
| Pro        | 300             | 10,000       |
| Enterprise | Custom          | Custom       |

## Response Format

All responses are JSON:

```json theme={null}
{
  "data": { ... },
  "meta": {
    "requestId": "req_xxxx",
    "timestamp": "2024-01-01T00:00:00Z"
  }
}
```

## Error Responses

```json theme={null}
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Invalid prompt ID",
    "details": { ... }
  },
  "meta": {
    "requestId": "req_xxxx"
  }
}
```

## Common Status Codes

| Code | Description  |
| ---- | ------------ |
| 200  | Success      |
| 201  | Created      |
| 400  | Bad Request  |
| 401  | Unauthorized |
| 403  | Forbidden    |
| 404  | Not Found    |
| 429  | Rate Limited |
| 500  | Server Error |

## SDKs

We recommend using our official SDKs instead of direct API calls:

<CardGroup cols={2}>
  <Card title="TypeScript SDK" icon="js" href="/sdk/typescript/installation">
    Type-safe TypeScript/JavaScript SDK
  </Card>

  <Card title="Python SDK" icon="python" href="/sdk/python/installation">
    Type-safe Python SDK — sync and async
  </Card>
</CardGroup>

## SDKs are recommended

For most use cases, use the [TypeScript SDK](/sdk/typescript/installation) or [Python SDK](/sdk/python/installation) instead of raw HTTP. The SDKs handle authentication, request/response typing, pagination, retries, and tracing automatically.

Detailed per-endpoint reference documentation is coming soon.
