Managing keys
Mint and revoke sk-hyd- API keys and register machines for the Claude proxy, using your account master token.
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 is pinned to one model at creation, so list the available slugs first.
Returns the model catalog (for example cf-gpt-oss-20b).
https://ai.hep.gg/keysAuth requirednamemodelGET /models (for example cf-gpt-oss-20b). An unknown slug returns 400.curl -X POST https://ai.hep.gg/keys \
-H "Authorization: Bearer hyd_..." \
-H "Content-Type: application/json" \
-d '{"name":"my-script","model":"cf-gpt-oss-20b"}'const res = await fetch("https://ai.hep.gg/keys", {
method: "POST",
headers: {
Authorization: "Bearer hyd_...",
"Content-Type": "application/json",
},
body: JSON.stringify({ name: "my-script", model: "cf-gpt-oss-20b" }),
});
const { key } = await res.json(); // sk-hyd-... shown onceThe 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.