Organization keys.
Your organization’s API keys are created and managed through the keys API at https://api.uncensoredllm.ai/v1, and every route here authenticates with an admin key, which is minted in the console rather than through the API. A key you create carries its own scope: which models it may call, the rate and spend limits it runs under, and an optional prepaid budget carved out of the organization balance.
Create a key
POST /v1/keys returns 201 with the secret in key, shown this one time. The body accepts:
| Field | Type | Notes |
|---|---|---|
name | string, required | 1 to 64 characters. |
environment | string | live or test; live unless set. |
format | string | The shape the secret is minted in: native (sk-ullm-live-…), or claude, gpt, gemini, deepseek, glm. |
allowed_models | array or null | Up to 100 model ids; the key may call nothing else. Null allows every model. |
allowed_ips | array or null | Up to 50 addresses or CIDRs the key may be used from. |
rpm, tpm | integer | Requests per minute (1 to 600, default 200) and tokens per minute. |
concurrency | integer | Requests in flight at once, 1 to 50. |
monthly_cap_usd | number | A spend cap per spend_limit_period (daily, weekly or monthly). |
budget_usd | number | The key’s own prepaid budget, carved from the organization balance. |
session_max_requests, session_max_spend_usd | number | Per-session ceilings. |
user_budget_usd, user_budget_period | mixed | A ceiling per end user, identified by the customer id sent in the request headers or the body’s user. |
routing | string | cheapest, fastest or throughput. |
redact | string | off, secrets or secrets_pii, applied before a request is forwarded. |
retain_bodies, loop_guard, response_cache_ttl, context_overflow, fallback_models, expires_at | mixed | Per-key defaults for replay retention, repeated-call refusal, the response cache, overflow handling, a fallback list and an expiry. |
scope | string | api only here; an admin key is created in the console. |
Read, change and revoke
GET /v1/keys lists the organization’s keys, newest first, and GET /v1/keys/{key_id} returns one. PATCH /v1/keys/{key_id} changes any field above, where sending null on a limit clears it; a budget cannot be set below what the key has already spent. DELETE /v1/keys/{key_id} revokes the key, and a revoked key cannot be changed afterward. GET /v1/keys/{key_id}/usage returns the key’s request count and spend for today, this month and the key’s lifetime.
The key object never returns the full secret again, only key_prefix, the safe-to-show part such as sk-ullm-live-k7m2…; reveal_available tells you whether the console can still show the whole secret. The key reports money in micro-dollars (a million to the dollar): budget_micro, budget_spent_micro, budget_remaining_micro, month_spend_micro and monthly_spend_limit_micro.
Example
curl https://api.uncensoredllm.ai/v1/keys \ -H "Authorization: Bearer sk-ullm-live-ADMIN…" \ -H "Content-Type: application/json" \ -d '{"name": "prod-worker", "allowed_models": ["claude-sonnet-5-5"], "monthly_cap_usd": 100, "budget_usd": 25}'The response holds the new key once under key; store it before you move on.
Status codes
201 on create; 200 on list, read, patch and revoke. A field out of range is 400 invalid_request, and a budget under the amount already spent is 400 budget_below_spent. No credential, or a bad one, returns 401 invalid_api_key; a key that is not an admin key, or an admin key asking for a scope it may not grant, is 403 forbidden. An unknown key id is 404 not_found. Fifty active keys already is 409 limit_reached, and changing a revoked key is 409 key_deleted.
Keys: questions
How do I limit a key to certain models?
Set allowed_models to the list of ids it may call; the key is refused for anything else. Leave it null and the key can call every model your organization has.
What is the difference between a key budget and the organization balance?
budget_micro is a prepaid amount carved out of the balance for that one key. The key stops when its budget is spent, even if the organization still has balance elsewhere.
Can I see a key’s secret again after I create it?
Through the API, only the prefix. The full secret is returned once at creation; reveal_available says whether the console can re-show it, and if not, revoke the key and create another.