GET /v1/keys
Lists the organization's API keys and CLI tokens (secrets are never returned), newest first. `kind` tells them apart; revoke a lost CLI token like any key.

Authentication

Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)

Query Parameters

limit integer optional query
Page size, from 1 to 100.
cursor string optional query
Opaque cursor from the previous page's `next_cursor`. Omit it for the first page.
project_id string optional query
Only keys of this project.
status string optional query
kind string optional query
Only API keys or only CLI tokens.

Responses

200 A page of keys.
application/json
object string REQUIRED
Enum: list
data object[] REQUIRED
Array of:
id string REQUIRED
object string REQUIRED
Enum: api_key
kind string REQUIRED
`api_key` (`b3os_sk_…`, made with `POST /v1/keys`) or `cli_token` (`b3os_pat_…`, from the device login; `created_by` is the user who approved it).
Enum: api_key, cli_token
client_id string | null REQUIRED
The device-login client a CLI token was issued to (`b3os-cli`); null for API keys.
name string REQUIRED
redacted string REQUIRED
The start and end of the secret, for recognizing it.
org_id string REQUIRED
project_id string REQUIRED
scopes string[] REQUIRED
Array of: string
spend_cap_usd number | null REQUIRED
spent_usd number REQUIRED
Spend in the current billing period.
status string REQUIRED
Enum: active, revoked, expired
expires_at string (date-time) | null REQUIRED
created_at string (date-time) REQUIRED
created_by object REQUIRED
type string REQUIRED
Enum: user, api_key
id string REQUIRED
last_used_at string (date-time) | null REQUIRED
revoked_at string (date-time) | null REQUIRED
metadata object REQUIRED
Up to 16 string key-value pairs you attach to an object for your own use. Keys are 1 to 40 characters of `A-Z a-z 0-9 _ . : -`; values are at most 500 characters. B3OS never interprets them.
next_cursor string | null REQUIRED
400 The request failed validation (`invalid_request`, `invalid_url`).
401 Missing, malformed, expired or revoked credentials (`unauthorized`).
403 Authenticated but not allowed (`forbidden`, `egress_denied`).
429 A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500 Something failed inside B3OS (`internal`). Retry with backoff.
503 The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X GET 'https://beta-api.b3os.org/v1/keys' \  -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/keys', {  method: 'GET',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN"  }});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/keys', headers=headers)print(response.json())
200 Response
{  "object": "list",  "data": [    {      "id": "key_01m5t5kep0ptzmr8rv604yh94a",      "object": "api_key",      "kind": "api_key",      "client_id": null,      "name": "ci-admin",      "redacted": "b3os_sk_7hwd…c40e",      "org_id": "org_01m5t5hthd29mm5wpza5ndd6mm",      "project_id": "prj_01m5t3pf8heewxt65ej3dm577y",      "scopes": [        "*"      ],      "spend_cap_usd": 100,      "spent_usd": 3.18,      "status": "active",      "expires_at": "2027-01-31T00:00:00.000Z",      "created_at": "2026-10-22T09:30:00.000Z",      "created_by": {        "type": "user",        "id": "usr_01m5t3jv4b5sappg7vzv1rwx6x"      },      "last_used_at": "2026-10-25T20:41:07.000Z",      "revoked_at": null,      "metadata": {}    },    {      "id": "key_01m5t5gb92a5zncjx654gevx4p",      "object": "api_key",      "kind": "api_key",      "client_id": null,      "name": "default",      "redacted": "b3os_sk_q2zx…8a1f",      "org_id": "org_01m5t5hthd29mm5wpza5ndd6mm",      "project_id": "prj_01m5t3pf8heewxt65ej3dm577y",      "scopes": [        "vision:read",        "vision:write",        "vision:run",        "render:read",        "render:write",        "render:run",        "sandboxes:read",        "sandboxes:write",        "sandboxes:run",        "routines:read",        "routines:write",        "routines:run",        "actions:read",        "actions:write",        "actions:run",        "infer:read",        "infer:write",        "infer:run",        "vault:read",        "vault:run",        "platform:read"      ],      "spend_cap_usd": null,      "spent_usd": 0,      "status": "active",      "expires_at": null,      "created_at": "2026-10-20T16:00:00.000Z",      "created_by": {        "type": "user",        "id": "usr_01m5t3jv4b5sappg7vzv1rwx6x"      },      "last_used_at": "2026-10-25T20:59:12.000Z",      "revoked_at": null,      "metadata": {}    }  ],  "next_cursor": null}
Ask a question... ⌘I