AI Gateway

Update gateway token group

Changed on

Update gateway token group within the authenticated Telnyx account. Foreign and unknown resource IDs return the same 404 response. Omitted fields are preserved. Null clears the optional concurrency, fallback and retry settings. A stale If-Match returns 412; read the resource again before updating.

patch/llm_token_gateway/token_groups/{id}

Request

  • Base URL: https://api.telnyx.com/v2
  • URL: https://api.telnyx.com/v2/llm_token_gateway/token_groups/{id}
  • 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.

If-Matchstring required

Exact quoted resource-version ETag; an exact intermediary-weakened echo W/"n" is accepted. Wildcard, combined and malformed validators are rejected; stale 412; missing 428. HTTP field names are case-insensitive. Replayed idempotent result is checked first.

Request body

namestring
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
rpm_limitinteger nullable
allowed_modelsstring[]
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.

cache_ttlinteger nullable
provider_key_idsstring[]
fallbacksobject nullable

Per-group model fallbacks: primary alias -> ordered list of 1..3 other aliases. Every key and listed alias must be in allowed_models (a PATCH removing a referenced alias is 400); a chain never lists its own key; wildcards are rejected. Chains are one level deep (a step's own chain is not expanded). Fallback is attempted only for managed routes, only before the first provider event is forwarded, and only to steps the key may use; each attempt is reserved and recorded. {} and null both disable fallbacks.

blockedboolean

Response

OK

Changes