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

# API Tokens

> Create and manage API tokens in your MeiGen account

Create and revoke tokens at [meigen.ai → Settings → API Keys](https://www.meigen.ai). Each account supports up to 5 active tokens.

Token format: `meigen_sk_` followed by 32 characters. The full value is shown only at creation — copy it immediately.

Pass the token as a Bearer credential on any authenticated endpoint:

```bash theme={null}
curl -X POST https://www.meigen.ai/api/generate/v2 \
  -H "Authorization: Bearer meigen_sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a minimalist logo"}'
```

<Note>
  Token management itself (`POST` / `GET` / `DELETE /api/tokens`) is authenticated with a logged-in browser session, not with an API key — an API key cannot create or revoke tokens. Manage them from account settings.
</Note>

<Warning>
  **API tokens can only spend purchased credits.** Daily free credits are not available via the API.
</Warning>
