Skip to main content

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.
The raw token value is returned exactly once, in the mint response. KnoxCall stores only a hash — list responses never contain plaintext. Save the minted token to your secrets manager immediately.

Token format and environment

Tokens are formatted kc_<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

Returns the agent’s tokens, paginated (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.
Response

Mint a token

Mints a new phantom token for the agent and returns the plaintext once. Requires the 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.
Response
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

Immediately revokes the token. In-flight requests that have already passed auth complete; no new requests are accepted. Requires the write capability. Returns 404 not_found if the token does not exist or is already revoked.
Response