AI Gateway Usage
get/ai/usage/recent
Request
- Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
- URL: /api/ai/usage/recent
- Auth: HTTP bearer
Query parameters
limitinteger
Page size (defaults to 20, max 50)
offsetinteger
Number of results to skip for pagination (defaults to 0)
providerstring
Filter by provider name
modelstring
Filter by model name
statusinteger
Filter by HTTP status code (exact match)
cost_gteinteger
Cost greater-than-or-equal, in microcents
cost_gtinteger
Cost strictly greater-than, in microcents
cost_lteinteger
Cost less-than-or-equal, in microcents
cost_ltinteger
Cost strictly less-than, in microcents
tokens_gteinteger
Total tokens greater-than-or-equal
tokens_gtinteger
Total tokens strictly greater-than
tokens_lteinteger
Total tokens less-than-or-equal
tokens_ltinteger
Total tokens strictly less-than
Response
Page of recent usage log entries
Changes
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info
- warning
removed the optional property
from the response with the status - warning
removed the optional property
from the response with the status
- warning