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

# Introduction

> Base URL, authentication and conventions shared by every endpoint.

## Base URL

All endpoints live under `https://api.chattler.ai/v1`. Only HTTPS is served.

## Authentication

Every request needs an API key in the `Authorization` header with the `Bearer` scheme. The key is created in the Chattler app; see [Get your API key](/get-started/api-key).

```http theme={null}
Authorization: Bearer cht_live_<key_id>.<secret>
```

Keys are bound to one agent and carry a permission: `read-only` for the two `GET` endpoints, `full` for those plus the two `POST` chat endpoints.

## Conventions

* Request and response bodies are JSON (`Content-Type: application/json`), except the streaming endpoint, which answers `text/event-stream`.
* Both chat endpoints require an `Idempotency-Key` header, 1-255 characters, unique per logical request. See [Idempotency](/guides/idempotency).
* Every response carries `X-Request-ID`. The rate-limit headers `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` are present on JSON `200` responses and on `429`; the SSE stream and other error responses do not carry them. See [Rate limits](/guides/rate-limits).
* Every failure is `{"error": {"code", "message", "request_id"}}`. See [Errors](/guides/errors).
* Lists are `{"data": [...], "next_cursor": "..." | null}`; `limit` is 1-100, default 20.
* Timestamps are ISO-8601 in UTC. Filters accept timezone-aware or naive values (naive is read as UTC); `date_to` is exclusive.

## Try it in the playground

The endpoint pages have a playground. Paste a real key as the bearer token and use the agent id the key belongs to; requests go straight to `https://api.chattler.ai` and are billed like any other call.

<Warning>
  Do not paste a `full` key into a shared screen or recording. Rotate it in the app if you did.
</Warning>
