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

# Authentication

> Authenticate requests with an API key

Every request carries your key in an HTTP header:

```
Authorization: Bearer <your-api-key>
```

<CodeGroup>
  ```bash curl theme={null}
  curl https://tokendog.io/v1/chat/completions \
    -H "Authorization: Bearer $TOKENDOG_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"model":"gpt-5","messages":[{"role":"user","content":"ping"}]}'
  ```
</CodeGroup>

## Managing keys

Create, view, and revoke keys in the [tokendog.io](https://tokendog.io) console. Each key can be
bound to a quota and a model group; once the quota is exhausted or the key is revoked, requests
return `401/403` (see [Error codes](/en/api-reference/guide/error-codes)).

<Warning>A key is an account credential. Never commit it to a repo or expose it in a frontend; rotate keys periodically and revoke immediately if leaked.</Warning>
