Phantom tokens
A phantom token is the short-lived capability token your application presents on the data plane to call an agent — your app never holds a raw provider API key. These endpoints manage the tokens for one agent over the/v1 control plane. See the control-plane overview for authentication and the response envelope.
Token format and environment
Tokens are formattedkc_<env>_<kind>_<random>_<crc>, e.g. kc_live_a_1a2b3c…. The prefix field is the first 12 characters (kc_live_a_ plus two characters), safe to display and store for identification.
The environment segment is derived from the key you mint with — a test key mints a kc_test_… token, a live key mints a kc_live_… token. There is no environment parameter on the request.
List tokens
page, per_page), newest first. Requires the read capability. Never returns plaintext. Returns 404 not_found if the agent does not belong to your tenant or is a system agent.
Mint a token
mint capability on ai_gateway.
Request body — all fields optional.
The token’s capability scope (providers and models) is derived automatically from the agent’s
default_model. It is not accepted from the request body.expires_at is null when expires_in_seconds is omitted. If dpop_required is true but dpop_jkt is missing, the request returns 400 validation — a DPoP-bound token is unusable without the key thumbprint. See Tokens & DPoP for generating the thumbprint and sending DPoP proofs.
Revoke a token
write capability. Returns 404 not_found if the token does not exist or is already revoked.