AI Gateway Usage
get/ai/usage/by-project
Request
- Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
- URL: /api/ai/usage/by-project
- Auth: HTTP bearer
Query parameters
fromstring
ISO 8601 start time (defaults to 24h ago)
tostring
ISO 8601 end time (defaults to now)
limitinteger
Max projects (defaults to 50, max 100)
Response
Spend and volume per project, most expensive first
Changes
- info
endpoint added
- info