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

# API Reference

> Integrate Mind-e into your applications using the REST API.

The Mind-e API lets you send chat messages, manage web sources, check credits, and more — all programmatically.

## Base URL

```
https://api.mind-e.co
```

All API endpoints are relative to this base URL. For example, to send a chat message:

```
POST https://api.mind-e.co/chat
```

## Authentication

Most API endpoints require authentication using a **Bearer token**. Pass your API key in the `Authorization` header:

```bash theme={null}
Authorization: Bearer sk_live_your_api_key_here
```

Create API keys in your [dashboard settings](/account/api-keys). Keys can be scoped to a specific agent or work across all your agents.

<Note>
  Some endpoints are **public** (no authentication required) — these are used by the embeddable chat widget. They are marked as "Public" in the documentation.
</Note>

## Request format

* Send JSON in the request body with `Content-Type: application/json`
* File uploads use `multipart/form-data`
* Query parameters are passed in the URL

## Response format

All responses return JSON with a `success` field:

```json theme={null}
{
  "success": true,
  // ... response data
}
```

On error:

```json theme={null}
{
  "success": false,
  "error": "Description of what went wrong"
}
```

## HTTP status codes

| Code | Description                                          |
| ---- | ---------------------------------------------------- |
| 200  | Success                                              |
| 400  | Bad request — invalid parameters or validation error |
| 401  | Unauthorized — missing or invalid API key            |
| 402  | Payment required — insufficient credits              |
| 404  | Not found — resource doesn't exist                   |
| 429  | Rate limited — too many requests                     |
| 500  | Server error                                         |

## Rate limiting

API requests are rate limited. When rate limited, the response includes these headers:

| Header                  | Description                              |
| ----------------------- | ---------------------------------------- |
| `X-RateLimit-Limit`     | Maximum requests allowed in the window   |
| `X-RateLimit-Remaining` | Remaining requests in the current window |
| `X-RateLimit-Reset`     | Unix timestamp when the window resets    |

If you receive a `429` response, wait until the reset time before retrying.

## Credits

API chat requests consume [credits](/account/credits) just like widget conversations. The response includes a `credits` object showing how many credits were used and your remaining balance.
