invalid_parameter means a usage request carried a time window, a ledger limit or a run id that OpenType cannot read. Read this page when a usage or reporting call fails with a 400.
What happened
Routes:GET /v1/usageGET /v1/usage/ledgerGET /v1/usage/dailyGET /v1/usage/runs/{run_id}
The accepted forms:
An unknown query parameter, or a value that is not a number where one is expected, is refused before these checks. The answer is a plain-text 400 whose body begins
Failed to deserialize query string, not a JSON error. Fall back to the HTTP status when the body is not JSON.How to fix
- Match the message in the table above.
- Format timestamps in UTC with a
Zand no fractional seconds, for example2026-09-01T00:00:00Z. - Send
start_atandend_attogether, withstart_atfirst in time. - For daily series, split windows longer than 92 days into several calls.
- Use a
run_idexactly as the API returned it.
Example
Related
- Usage reporting - the four usage routes and what they return.
- Pagination - ledger limits and narrowing a window.
- Conventions - timestamp and id formats across the API.
- Problem codes - every code, its status, and whether a retry can help.