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.
- In Console → API keys, create a key.
- Name it after the system that will use it.
- Choose its permissions from Table 1.
- 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:
curl https://api.u22a8.ai/v1/models \
-H "Authorization: Bearer $U22A8_API_KEY"
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.u22a8.ai/v1",
api_key=os.environ["U22A8_API_KEY"],
)
for model in client.models.list():
print(model.id) # every version your key can call
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.u22a8.ai/v1",
apiKey: process.env.U22A8_API_KEY,
});
for await (const model of client.models.list()) {
console.log(model.id); // every version your key can call
}
The models list answers any key of an organization with access to A8:
{
"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.
| Permission | Grants |
|---|---|
models:infer | Judging: verdicts from any version, through every interface |
models:train | Teaching and retracting through MCP, which changes what your organization's model learns. See Teaching. |
models:explain | Precedents and recall: the examples your organization taught, quoted word for word. See Precedents. |
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:inferandmodels: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
| Status | Condition |
|---|---|
401 | The key is missing, invalid or revoked |
403 | The key is valid and lacks the permission the request needs |
503 | Key verification is briefly unavailable; retry with backoff |