> The index of all pages is at https://docs.afffast.com/llms.txt.

# api_key_invalid

The API key is not valid.

HTTP status: **401**. Error type: `authentication_error`.

The API key is not valid.

## Example

```json
{
  "error": {
    "type": "authentication_error",
    "code": "api_key_invalid",
    "message": "The API key is not valid.",
    "doc_url": "https://docs.afffast.com/errors/api-key-invalid",
    "request_id": "req_3kQ9x7WmZpL2vNd8TfYb4A"
  }
}
```

## Causes

- The key has a wrong format, or the API does not know it.
- The key is revoked or it expired.

## How to fix

- Copy the key again from the dashboard. A key is shown one time, when you make it.
- Make a new key in the dashboard if you lost it. Only the dashboard manages API keys.
