API access
Scripts get their own admin key, scoped to a subset of the minter's access.
| Grant | Gates | Detail |
|---|---|---|
| Capabilities | Legacy /admin/* routes | The grants behind operator roles and bundles. |
Scopes (<resource>:read, <resource>:write) | Management API (/admin/v1/*) | Derived from the URL; twins every legacy route. GET /admin/v1/me lists the caller's scopes. |
Endpoints and scope tables: API reference.
clienttests:write lets an operator publish content-free client test results and may ride a
scoped key. It translates to client-tests:write; config:read grants client-tests:read.
Endpoint details.
providerresources:manage lists and transfers who owns the files, batches, fine-tuning jobs and stored
responses created on the org's provider keys. Only security_admin and owner hold it, and a scoped key
may carry it. It translates to provider-resources:read and provider-resources:write; no other
capability grants the read, so an auditor cannot list owners.
Endpoint details.
Scoped admin API keys
Mint an aak_… key with POST /admin/v1/admin-keys, list keys with GET /admin/v1/admin-keys,
and revoke one with DELETE /admin/v1/admin-keys/{id}. The mint answer holds the key, so from a
script run anyray-connect admin api POST admin-keys --body @key.json --output <file>
(API reference).
| Property | Posture |
|---|---|
| Subset only | One grant shape: capabilities or v1 scopes, each a subset of the minter's. Minting needs adminkeys:manage (security_admin, owner). A scope-minted key is v1-only and fails every legacy capability gate. |
| Org-wide on traces | Never self-scoped like a person's session: traces:read means every user's trace metadata. Bodies stay out of reach (traces:content can never ride a key). |
| 90-day expiry | Longer or no expiry is an explicit mint-time choice. |
| Shown once | Stored as SHA-256. Revoke with DELETE /admin/v1/admin-keys/{id}; it takes effect on the next request on every replica. Keys outlive the minter, so revoke them at offboarding. |
| Audited | Mint and revoke are logged; admin writes are attributed as apikey:<id>. |
| Fails closed | Key store unreachable: 503 admin_key_store_unavailable, never 401. The admin token keeps working. |