Look up a request's settled cost
Changed onReturns the amount actually billed for one request, keyed by the X-Orca-Request-Id header every OrcaRouter response carries. This is the authoritative cost surface: the settled record, read back after the fact.
Scoped to the calling key's owner and workspace — another tenant's id returns 404. The settlement record is written after the response completes, so an immediate lookup can 404; treat that as "not settled yet" and retry briefly.
One request id can cover several upstream attempts; the lookup returns the terminal attempt. A request that never succeeded reports total_cost: 0. Async video / task jobs settle without the request id and are not resolvable here.
Rate limited at 120 requests/minute per user, separately from the relay. See Per-request cost for the full contract.
Request
- Base URLhttps://api.orcarouter.ai/v1
- URLhttps://api.orcarouter.ai/v1/generation
- AuthHTTP bearer
Query parameters
The X-Orca-Request-Id returned on the original response.
Response
The settled cost record.
Example response
{
"data": {
"id": "20260810120000-abc123",
"model": "openai/gpt-4o",
"created_at": 1786360000,
"token_name": "prod-key",
"tokens_prompt": 1100,
"tokens_completion": 420,
"tokens_total": 1520,
"total_cost": 0.00123,
"cost_currency": "USD",
"quota": 615,
"latency_ms": 3000,
"ttft_ms": 210
}
}Changes
- info
endpoint added
- info