/docs/ai/keys-and-tokens
The AI Gateway uses three credential types. This page covers how to obtain and
manage them programmatically. All endpoints here live at
ai.hep.gg and are authenticated with your master token.
The three credentials
master token/me, /keys, /sync/*). Issued once per account. Treat it like a password.API keyproxy tokenYour account
https://ai.hep.gg/meAuth requiredSend Authorization: Bearer hyd_.... Returns { user: { id, name, email }, machines: [...] }.
API keys
https://ai.hep.gg/modelsAuth requiredA key serves one model, chosen at creation, so list the available slugs first.
qwen3-8b is generally available; cf-gpt-oss-20b is admin only. See
Usage and quotas for plan access and the per-account allowance.
If your plan offers more than one model, you can point an existing key at a different one later from the LLM Keys page in the dashboard. The secret, its prefix and its usage counters stay the same, so nothing in your client changes; the next request simply goes to the new model.
https://ai.hep.gg/keysAuth requirednamemodelGET /models (for example qwen3-8b). An unknown slug returns 400; a model that is not available on your plan (for example cf-gpt-oss-20b on a non-admin account) returns 403.The response contains the full key (sk-hyd-...) exactly once, plus a short
prefix. The secret is hashed at rest, so store it now; afterwards only the
prefix is retrievable.
https://ai.hep.gg/keysAuth requiredReturns keys[] with id, name, model_slug, key_prefix,
request_count, prompt_tokens, completion_tokens, last_used_at,
disabled, and created_at.
https://ai.hep.gg/keys/:idAuth requiredReturns { "ok": true }. You can only delete keys you own.
Registering a machine (for the Claude proxy)
https://ai.hep.gg/sync/machinesAuth requiredhostnameosplanReturns { id, proxy_token }. The proxy_token (pt_...) goes in the path of
the Claude proxy. In practice the
ccas CLI registers the machine and wires the proxy token for
you, so you rarely call this by hand.