Skip to navigation

Authentication

Flash API keys, and how a person or an agent gets one

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.

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. Every endpoint needs a key except GET /v1/openapi.json and the two key-claim calls.

ScopeGrants
scanPOST /v1/scan and GET /v1/scans/{id}
usage:readGET /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, 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), and neither call takes a credential.

  1. The agent asks, with its own name:

    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:

    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>"}:

errorWhat to do
authorization_pendingThe person hasn’t decided. Poll again after interval.
slow_downAdd 5 seconds to interval. On a 429, wait for Retry-After.
access_deniedThe person denied it. Ask again only if they want you to.
expired_tokenThe claim expired. Ask for a new code.
invalid_grantNo such claim. Ask for a new code.
invalid_requestFix the body.
temporarily_unavailableWait for Retry-After, then try again.

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