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

# Authentication

The dottxt API uses bearer-token authentication.

## Header format

```http theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
Authorization: Bearer <DOTTXT_API_KEY>
```

## Environment variable

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
export DOTTXT_API_KEY="sk-dottxt-..."
```

## Quick connection check

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
curl https://api.dottxt.ai/v1/models \
  -H "Authorization: Bearer $DOTTXT_API_KEY"
```

If the key is valid, the API returns a `200` response with a `data` array of accessible models.

## Next steps

* [List models](/api/list-models)
* [Create chat completion](/api/chat-completions)
