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

# API Overview

> Programmatic access to the Miteos platform via API keys.

# API Reference

The Miteos API lets you create tasks, manage agents, connect integrations, and access all platform features programmatically.

## Base URL

```
https://api.miteos.com
```

All endpoints are relative to this base URL. For example, creating a task is `POST https://api.miteos.com/tasks`.

## Authentication

All requests require an API key sent as a Bearer token in the Authorization header:

```bash theme={null}
curl -X POST https://api.miteos.com/tasks \
  -H "Authorization: Bearer mk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Research competitor pricing"}'
```

### Getting an API Key

1. Go to [platform.miteos.com/api-keys](https://platform.miteos.com/api-keys)
2. Click "Create Key"
3. Name it and select scopes (permissions)
4. Copy the key — it's only shown once

Keys are prefixed with `mk_` and should be kept secret.

### Using the Playground

On each endpoint page, enter your API key in the Authorization field at the top. The `Bearer` prefix is added automatically. Click **Send** to make a live request.

<Warning>
  If you get "CSRF token missing", you forgot to enter your API key. The API key bypasses CSRF protection — without it, the request is treated as an unauthenticated browser request.
</Warning>

## Rate Limits

* 60 requests per minute per key
* Burst: 10 concurrent requests
* Headers: `X-RateLimit-Limit`, `X-RateLimit-Remaining`

## Errors

All errors return JSON with a `detail` field:

```json theme={null}
{"detail": "Human-readable error message"}
```

| Status | Meaning                               |
| ------ | ------------------------------------- |
| 401    | Missing or invalid API key            |
| 403    | Insufficient scopes for this endpoint |
| 404    | Resource not found                    |
| 422    | Invalid request body                  |
| 429    | Rate limit exceeded                   |
| 500    | Server error                          |

## WebSocket (Real-time)

Stream agent events in real-time:

```
wss://api.miteos.com/ws
```

After connecting, authenticate with: `{"type": "auth", "token": "mk_your_api_key"}`
