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

# Authentication

> How to get a Flash API key from the account page or through an agent key claim, and how to send it.

Send a Flash key as a bearer token, and only to `armor.outtake.ai`. Never put it in a URL, a log line or a prompt.

```http
Authorization: Bearer flash_...
```

Flash keys start with `flash_` and are separate from Outtake platform keys. A key's scans belong to its account and count against that account's [limits](/docs/limits). Every endpoint needs a key except `GET /v1/openapi.json` and the two key-claim calls.

| Scope        | Grants                                   |
| ------------ | ---------------------------------------- |
| `scan`       | `POST /v1/scan` and `GET /v1/scans/{id}` |
| `usage:read` | `GET /v1/limits` and `GET /v1/usage`     |

A missing, mistyped or revoked key gets `401 unauthorized`, and a key without the scope gets `403 scope_required`. Neither is worth retrying.

## A person creates a key

Sign in at [flash.outtake.ai/account](https://flash.outtake.ai/account), create a key and store it, for example in `FLASH_API_KEY`. It has both scopes. Create one key per program, so you can revoke one without breaking the others.

## An agent claims a key

An agent without a key can ask for one, and a person approves it. This is the OAuth device flow ([RFC 8628](https://www.rfc-editor.org/rfc/rfc8628)), and neither call takes a credential.

1. The agent asks, with its own name:

   ```bash
   curl https://armor.outtake.ai/v1/keys/request \
     -H "Content-Type: application/json" \
     -d '{"client_name": "My research agent", "scopes": ["scan", "usage:read"]}'
   ```

   `client_name` is 1 to 64 ASCII letters, digits, spaces or `._()/:@+-`, starting with a letter or digit. `scopes` defaults to `scan`.

2. The agent shows the person the `user_code` and the `verification_uri_complete` link, and keeps `device_code` to itself.

3. The person signs in on that claim page, checks the name and scopes, and approves or denies.

4. The agent polls every `interval` seconds:

   ```bash
   curl https://armor.outtake.ai/v1/keys/token \
     -H "Content-Type: application/json" \
     -d '{"device_code": "<device_code>"}'
   ```

   Once the person approves, the poll returns `200` with `api_key`. Flash shows it this once, so store it right away.

A claim expires after 10 minutes. The claimed key lands on the person's account as `agent claim: <client_name>`, and they can revoke it there. Key-claim errors follow OAuth, `{"error": "<code>", "error_description": "<sentence>"}`:

| `error`                   | What to do                                                       |
| ------------------------- | ---------------------------------------------------------------- |
| `authorization_pending`   | The person hasn't decided. Poll again after `interval`.          |
| `slow_down`               | Add 5 seconds to `interval`. On a `429`, wait for `Retry-After`. |
| `access_denied`           | The person denied it. Ask again only if they want you to.        |
| `expired_token`           | The claim expired. Ask for a new code.                           |
| `invalid_grant`           | No such claim. Ask for a new code.                               |
| `invalid_request`         | Fix the body.                                                    |
| `temporarily_unavailable` | Wait for `Retry-After`, then try again.                          |

Asking for a key returns `429 rate_limited` after 10 requests in an hour from one network.