> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.kontinent.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.kontinent.ai/_mcp/server.

# Authentication

Every data-plane request authenticates with a bearer token:

```
Authorization: Bearer sk-kt-<43 base62 chars>
```

## Key facts

* Keys are **49 characters** total (`sk-kt-` + 43 base62 characters).
* A key is shown **exactly once** at creation. Only a SHA-256 hash is stored —
  Kontinent cannot recover a lost key, so store it securely.
* Keys **do not expire**. Revoke them from the dashboard; revocation takes
  effect within about **30 seconds** (the auth cache TTL).
* Every request is scoped to the key's **organization**, which owns the credit
  balance, rate limit, and usage attribution.

Treat a `sk-kt-` key like a password. Anyone holding it can spend your
organization's credits. Prefer environment variables or a secrets manager over
committing keys to source control.

## Using the key

```bash title="curl"
curl https://api.kontinent.ai/v1/models \
  -H "Authorization: Bearer $KONTINENT_API_KEY"
```

```ts title="OpenAI SDK"
const client = new OpenAI({
  baseURL: "https://api.kontinent.ai/v1",
  apiKey: process.env.KONTINENT_API_KEY,
});
```

## When authentication fails

A bad or revoked key returns `401` with code `invalid_api_key`. **Do not
retry** — the outcome will not change until you supply a valid key. See
[Errors](/errors) for the full taxonomy.