AI Gateway

Create gateway token key

Changed on

Create gateway token key within the authenticated Telnyx account. Foreign and unknown resource IDs return the same 404 response. The token secret is returned only on the original create response. A replay returns metadata without the secret. Provisioning is advisory; ready is not a guarantee of inference availability.

post/llm_token_gateway/token_keys

Request

  • Base URL: https://api.telnyx.com/v2
  • URL: https://api.telnyx.com/v2/llm_token_gateway/token_keys
  • Auth: HTTP bearer

Headers

Idempotency-Keystring required

24h, scoped by account+method+path. Same key/body returns same outcome; changed body 409; in-progress 409 with Retry-After. Token-create replay returns 200 metadata WITHOUT secret.

Request body

max_parallel_requestsinteger nullable

Optional maximum concurrent reserved/dispatched cache misses across replicas. Null means no concurrency cap. Cache hits do not consume slots; unknown usage retains its budget hold without a slot.

namestring required
token_group_idstring uuid required
token_user_idstring uuid nullable
max_budgetnumber

USD, decimal precision at most 6 places; parse exactly to integer micro-USD, never binary float accounting.

budget_duration'1d' | '7d' | '30d' | 'null' nullable
tpm_limitinteger nullable

Omitted or null defaults to the maximum (10000000) (on a blocked key, null is kept until the key is unblocked); a value below the minimum (1) or above the maximum is rejected with 400 limit_out_of_range; a malformed value (negative, wrong type or precision) is 400 invalid_request. Block the key (blocked: true) to deny it; blocking is always accepted.

rpm_limitinteger nullable

Omitted or null defaults to the maximum (6000) (on a blocked key, null is kept until the key is unblocked); a value below the minimum (1) or above the maximum is rejected with 400 limit_out_of_range; a malformed value (negative, wrong type or precision) is 400 invalid_request. Block the key (blocked: true) to deny it; blocking is always accepted.

allowed_modelsstring[] nullable
expires_atstring date-time nullable
blockedboolean
required_end_user_idboolean

Require a nonempty caller-asserted end-user ID; not proof of identity.

Response

Idempotency replay: metadata only; lost create response requires revoke/new create.

Changes