Report usage
POST/v1/route/:decision_id/usage
Report what the provider answered for a request your app served: the candidate it called, and the provider's usage object as the provider returned it (Anthropic Messages, OpenAI Chat Completions or OpenAI Responses). The decision is then priced, with its savings against the router's most expensive model, and shown with its cost on the dashboard.
A decision's usage is recorded once. A repeated report is still accepted (202) and changes nothing, so retrying is always safe.
Request
Responses
- 202
- 400
- 401
- 403
- 404
Recorded, or recorded already
The report isn't a JSON object, model is missing, or usage isn't a usage object
Unauthorized error
The API key is not valid
No decision of yours has this id