AI Gateway Usage

GET /ai/usage/conversations/{conversation_id}

Changed on

Request

  • Base URL
    /api (relative, and the document was published on a file host, not at the API’s origin)
  • Auth
    HTTP bearer

Path parameters

conversation_idstring required

Conversation ID

Query parameters

limitinteger

Max results (defaults to 100)

Response

Invocations within a conversation

cache_read_tokensinteger required

Part of input_tokens read from the provider's prompt cache.

cache_write_tokensinteger required

Part of input_tokens written to the provider's prompt cache.

conversation_idstring nullable
estimated_cost_microcentsinteger required
idinteger required
input_tokensinteger required
is_byokboolean required
is_streamingboolean required
latency_msinteger required
modelstring required
output_tokensinteger required
project_idinteger nullable

Project the call is attributed to (deployment-token callers only)

providerstring required
request_idstring nullable
statusinteger required
tagsstring[] required
timestampstring required
token_idinteger nullable

Deployment token the call is attributed to

trace_idstring nullable
unpricedboolean required

The request used tokens but no known price gave its cost, so estimated_cost_microcents (zero) is not a price: show it as unknown, not as free.

Changes

    • info

      added the required property items/unpriced to the response with the status

    • breaking

      removed the required property extensions from the response with the status

    • breaking

      removed the required property extensions from the response with the status