Platform

API keys

Create an API key, grant its permissions, authenticate requests with it and revoke it.

This page as Markdown: https://u22a8.ai/docs/api-keys.md. The index of every docs page: https://u22a8.ai/llms.txt.

An API key authenticates requests to A8 as your organization. Everything a key judges, teaches or retracts belongs to the organization that created it, and the key carries exactly the permissions you grant it.

§1Create a key

Keys are created in the console. Creating one takes the keys:write role permission, which owners and admins hold.

  1. In Console → API keys, create a key.
  2. Name it after the system that will use it.
  3. Choose its permissions from Table 1.
  4. Copy the secret. It is a token that starts with sk_, and the console shows it once.

Afterwards the list shows the key in an obfuscated form. To replace a lost secret, revoke the key and create a new one.

§2Authenticate requests

Send the key on every request as a bearer token, Authorization: Bearer <key>. The OpenAI SDKs send it this way from their api_key option. The Anthropic SDKs send it as an x-api-key header, which A8 accepts the same way.

The samples on these pages read the key from the U22A8_API_KEY environment variable:

Shell
curl https://api.u22a8.ai/v1/models \
  -H "Authorization: Bearer $U22A8_API_KEY"

The models list answers any key of an organization with access to A8:

JSON
{
  "object": "list",
  "data": [
    {
      "id": "a8",
      "object": "model",
      "owned_by": "u22a8",
      "lifecycle": "preview",
      "shutdown_date": null
    },
    {
      "id": "a8-1-1@20260715t140322z",
      "object": "model",
      "owned_by": "organization",
      "status": "ready",
      "active": true,
      "lifecycle": "preview",
      "shutdown_date": null
    },
    {
      "id": "a8-1-1@reference",
      "object": "model",
      "owned_by": "organization",
      "status": "ready",
      "active": false,
      "lifecycle": "preview",
      "shutdown_date": null
    }
  ]
}

Recorded from a8-1-1@20260715t140322z on 2026-10-22.

The status and active fields say which versions are in service, and lifecycle and shutdown_date when each retires. See Horizons and Deprecations.

§3Permissions

A permission names a capability. Each is independent of the others, and a key holds any set of them.

PermissionGrants
models:inferJudging: verdicts from any version, through every interface
models:trainTeaching and retracting through MCP, which changes what your organization's model learns. See Teaching.
models:explainPrecedents and recall: the examples your organization taught, quoted word for word. See Precedents.
Table 1. The three permissions. A key with models:infer alone judges and leaves your model as it is, so it suits systems that only need verdicts.

A request needs the permission for what it does:

  • A judgment needs models:infer.
  • A judgment that asks for precedents needs models:infer and models:explain.
  • A question about what you taught needs models:explain.
  • A teach or a retract needs models:train.
  • The models list accepts any key of an organization with access to A8.

A request from a key that lacks a permission it needs returns 403, and the error names the permission. A key whose organization lacks access to A8 returns 403 with code model_not_enabled. See Errors.

§4Revoke a key

Revoking a key expires it. Requests that use it return 401 within about a minute, the time verification results are cached. The key stays in the list, marked revoked, as a record.

To rotate a key, create the replacement first, move the system over to it, then revoke the old key.

§5Errors

StatusCondition
401The key is missing, invalid or revoked
403The key is valid and lacks the permission the request needs
503Key verification is briefly unavailable; retry with backoff
Table 2. The errors a key produces. Each status, with its body and fix, is on Errors.

Next steps