---
url: /docs/api/authentication.md
---
# Authentication

Hyper API keys are prefixes with `sk-hyper-`. Get one from the
[Hyper Dashboard](https://hyper.charm.land).

To authenticate, use the `Authorization` header:

```
Authorization: Bearer sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx
```

:::info

For compatibility with [Claude Code](/coding-agents/claude-code.html) and other
compatible agents, the `/v1/messages` endpoint also supports the `X-Api-Key`
header for authentication.

```
X-Api-Key: sk-hyper-xxxxxxxxxxxxxxxxxxxxxxxx
```

:::

## Public Endpoints

The `/v1/models` endpoint is public and doesn't require an API key:

* [`GET /v1/models`](/api/list-models)

## Errors

If unauthorized, you'll get a 401 with the follow response bodies.

`/v1/models`, `/v1/chat/completions` and `/v1/responses`:

```json
{
  "error": {
    "message": "invalid api key",
    "type": "invalid_request_error",
    "code": null
  }
}
```

`/messages`:

```json
{
  "type": "error",
  "error": {
    "type": "authentication_error",
    "message": "invalid api key"
  }
}
```
