> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List gateway token keys

> List gateway token keys within the authenticated Telnyx account. Foreign and unknown resource IDs return the same 404 response.



## OpenAPI

````yaml /openapi/source/external/inference/ai-gateway-resources.json get /llm_token_gateway/token_keys
openapi: 3.1.0
info:
  title: AI Gateway configuration
  version: 1.0.0
  description: >-
    Manage account-scoped AI Gateway groups and inference keys. All mutations
    require Idempotency-Key; updates and deletes require the current resource
    ETag in If-Match. Nullable fields clear on null and omitted PATCH fields are
    preserved.
servers:
  - url: https://api.telnyx.com/v2
security: []
paths:
  /llm_token_gateway/token_keys:
    get:
      tags:
        - AI Gateway
      summary: List gateway token keys
      description: >-
        List gateway token keys within the authenticated Telnyx account. Foreign
        and unknown resource IDs return the same 404 response.
      operationId: list_token_keys
      parameters:
        - $ref: '#/components/parameters/PageNumber'
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/Snapshot'
        - name: token_group_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: ''
        - name: token_user_id
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: ''
      responses:
        '200':
          description: OK
          headers:
            X-Request-ID:
              schema:
                type: string
                format: uuid
              description: Server-generated correlation ID.
            Cache-Control:
              schema:
                const: no-store
              description: All API responses; application cache is server-side only.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenKeyList'
              example:
                data: []
                meta:
                  page_number: 1
                  page_size: 1
                  has_more: false
                  snapshot: synthetic_snapshot
        '400':
          $ref: '#/components/responses/GatewayError400'
        '401':
          $ref: '#/components/responses/GatewayError401'
        '403':
          $ref: '#/components/responses/GatewayError403'
        '404':
          $ref: '#/components/responses/GatewayError404'
        '409':
          $ref: '#/components/responses/GatewayError409'
        '412':
          $ref: '#/components/responses/GatewayError412'
        '428':
          $ref: '#/components/responses/GatewayError428'
        '429':
          $ref: '#/components/responses/GatewayError429'
        '502':
          $ref: '#/components/responses/GatewayError502'
        '503':
          $ref: '#/components/responses/GatewayError503'
        '504':
          $ref: '#/components/responses/GatewayError504'
      security:
        - telnyxApiKey: []
components:
  parameters:
    PageNumber:
      name: page[number]
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        default: 1
      description: ''
    PageSize:
      name: page[size]
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
        maximum: 100
        default: 20
      description: ''
    Snapshot:
      name: page[snapshot]
      in: query
      required: false
      schema:
        type: string
        minLength: 1
        maxLength: 256
        pattern: ^[^\u0000-\u001f\u007f]+$
      description: >-
        Required after page 1; account/filter-bound 15-minute stable snapshot;
        expired/mismatch 409.
  schemas:
    TokenKeyList:
      type: object
      additionalProperties: false
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/TokenKey'
        meta:
          $ref: '#/components/schemas/PageMeta'
      required:
        - data
        - meta
    TokenKey:
      type: object
      additionalProperties: false
      properties:
        record_type:
          const: token_key
        id:
          type: string
          format: uuid
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        version:
          type: integer
          minimum: 1
        max_parallel_requests:
          anyOf:
            - type: integer
              minimum: 1
              maximum: 1000
              description: >-
                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.
            - type: 'null'
        name:
          type: string
          minLength: 1
          maxLength: 256
          pattern: ^[^\u0000-\u001f\u007f]+$
        token_group_id:
          type: string
          format: uuid
        token_user_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        max_budget:
          anyOf:
            - $ref: '#/components/schemas/Money'
            - type: 'null'
          description: >-
            Stored key limit; set to the maximum when the key was written
            without one (on a blocked key, null is kept until the key is
            unblocked).
        budget_duration:
          $ref: '#/components/schemas/BudgetDuration'
        tpm_limit:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          description: >-
            Stored key limit; set to the maximum when the key was written
            without one (on a blocked key, null is kept until the key is
            unblocked).
        rpm_limit:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
          description: >-
            Stored key limit; set to the maximum when the key was written
            without one (on a blocked key, null is kept until the key is
            unblocked).
        allowed_models:
          anyOf:
            - type: array
              items:
                type: string
                minLength: 1
                maxLength: 256
                pattern: ^[^\u0000-\u001f\u007f]+$
              uniqueItems: true
              maxItems: 1000
            - type: 'null'
        expires_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        blocked:
          type: boolean
        required_end_user_id:
          type: boolean
          default: false
          description: >-
            Require a nonempty caller-asserted end-user ID; not proof of
            identity.
        spend:
          $ref: '#/components/schemas/Money'
        reserved_spend:
          $ref: '#/components/schemas/Money'
        budget_started_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        resets_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        provisioning:
          type: string
          enum:
            - ready
            - pending
            - unavailable
            - inactive
            - unsupported
            - unknown
          description: >-
            Provisioning state of the key's current policy. `pending`: retry
            readiness with bounded backoff (treat `unknown` the same).
            `inactive` and `unsupported` are terminal until the key, group, user
            or catalog changes. `unavailable` means provisioning is stuck and is
            retried slowly; surface it. Absent while the gateway runs in
            compatibility mode.
      required:
        - record_type
        - id
        - created_at
        - updated_at
        - version
        - name
        - token_group_id
        - token_user_id
        - max_budget
        - budget_duration
        - tpm_limit
        - rpm_limit
        - allowed_models
        - expires_at
        - blocked
        - required_end_user_id
        - spend
        - reserved_spend
        - budget_started_at
        - resets_at
    PageMeta:
      type: object
      additionalProperties: false
      properties:
        page_number:
          type: integer
          minimum: 1
        page_size:
          type: integer
          minimum: 1
          maximum: 100
        has_more:
          type: boolean
        snapshot:
          type: string
          minLength: 1
          maxLength: 256
          pattern: ^[^\u0000-\u001f\u007f]+$
      required:
        - page_number
        - page_size
        - has_more
        - snapshot
    Error:
      type: object
      additionalProperties: false
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorItem'
          minItems: 1
      required:
        - errors
    Money:
      type: number
      minimum: 0
      maximum: 1000000000
      multipleOf: 0.000001
      description: >-
        USD, decimal precision at most 6 places; parse exactly to integer
        micro-USD, never binary float accounting.
    BudgetDuration:
      type:
        - string
        - 'null'
      enum:
        - 1d
        - 7d
        - 30d
        - null
    ErrorItem:
      type: object
      additionalProperties: false
      properties:
        code:
          type: string
          enum:
            - invalid_request
            - invalid_token_key
            - unauthorized
            - token_key_blocked
            - resource_blocked
            - budget_exceeded
            - end_user_budget_exceeded
            - model_not_in_catalog
            - rate_limit_exceeded
            - concurrency_limit_exceeded
            - not_found
            - conflict
            - idempotency_conflict
            - precondition_failed
            - precondition_required
            - enforcement_unavailable
            - upstream_error
            - upstream_timeout
            - limit_out_of_range
            - prompt_blocked
            - response_blocked
            - invalid_metadata
            - cursor_expired
        title:
          type: string
        detail:
          type: string
        meta:
          type: object
          additionalProperties: false
          properties:
            scope:
              $ref: '#/components/schemas/Scope'
            resets_at:
              anyOf:
                - type: string
                  format: date-time
                - type: 'null'
            request_id:
              type: string
              format: uuid
          required:
            - request_id
      required:
        - code
        - title
        - detail
        - meta
    Scope:
      type: string
      enum:
        - token_group
        - token_user
        - token_key
        - end_user
  responses:
    GatewayError400:
      description: >-
        Invalid fields or values (invalid_request), or token-key budget/rate
        limits outside their supported range (limit_out_of_range).
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: invalid_request
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError401:
      description: Wrong/missing credential for this plane.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
        WWW-Authenticate:
          schema:
            type: string
          description: >-
            Bearer challenge for this plane; no provider/master credential
            disclosure.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: unauthorized
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError403:
      description: >-
        Blocked/expired, exhausted budget or disallowed model; scope identifies
        exhausted level.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: unauthorized
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError404:
      description: Absent or foreign-account resource (indistinguishable).
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: not_found
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError409:
      description: Membership, idempotency or snapshot conflict.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
        Retry-After:
          schema:
            type: integer
            minimum: 1
          description: Seconds; retrying inference is not idempotent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: idempotency_conflict
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError412:
      description: ETag mismatch.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: precondition_failed
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError428:
      description: If-Match required.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: precondition_required
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError429:
      description: Rate limited.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
        Retry-After:
          schema:
            type: integer
            minimum: 1
          description: Seconds; retrying inference is not idempotent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: rate_limit_exceeded
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError502:
      description: >-
        upstream_error: every admitted provider attempt, including configured
        group retries and fallbacks, failed before the first provider event;
        streams return this real status instead of 200 plus an SSE error.
        Retrying is not idempotent.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
        Retry-After:
          schema:
            type: integer
            minimum: 1
          description: Seconds; retrying inference is not idempotent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: invalid_request
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError503:
      description: Enforcement/secret/managed route unavailable; fail closed.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
        Retry-After:
          schema:
            type: integer
            minimum: 1
          description: Seconds; retrying inference is not idempotent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: enforcement_unavailable
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
    GatewayError504:
      description: >-
        upstream_timeout: as 502 upstream_error, but the last admitted attempt
        timed out waiting for the provider (connect, read or write timeout, the
        attempt deadline, or x-ltg-request-timeout) before its first event.
        Retrying is not idempotent.
      headers:
        X-Request-ID:
          schema:
            type: string
            format: uuid
          description: Server-generated correlation ID.
        Cache-Control:
          schema:
            const: no-store
          description: All API responses; application cache is server-side only.
        Retry-After:
          schema:
            type: integer
            minimum: 1
          description: Seconds; retrying inference is not idempotent.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            errors:
              - code: invalid_request
                title: Request could not be completed
                detail: Check the request and the documented handling for this error.
                meta:
                  request_id: 11111111-1111-4111-8111-111111111111
  securitySchemes:
    telnyxApiKey:
      type: http
      scheme: bearer
      description: Management-only Telnyx account credential.

````