---
title: "Look up a request's settled cost"
method: GET
path: "/generation"
tags: ["Cost"]
---

# Look up a request's settled cost

`GET /generation`

## Request

- Base URL: `https://api.orcarouter.ai/v1`
- URL: `https://api.orcarouter.ai/v1/generation`
- Auth: HTTP bearer

Returns 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](/operations/per-request-cost) for the full
contract.

## Query parameters

- `id` string, required

## Response `200`

The settled cost record.

- GenerationLookupResponse
  - `data` object
    - `id` string: The request id that was looked up.
    - `model` string
    - `created_at` integer: Unix timestamp of the request.
    - `streamed` boolean
    - `token_name` string: Name of the API key that made the request.
    - `tokens_prompt` integer
    - `tokens_completion` integer
    - `tokens_total` integer
    - `total_cost` number: The settled charge, in USD.
    - `cost_currency` string
    - `quota` integer: Internal integer unit `total_cost` was converted from. Compare this when reconciling against the Console.
    - `latency_ms` integer: Total latency. Second-granular; omitted for sub-second requests.
    - `ttft_ms` integer: Time to first token, millisecond-precise.

## Other responses

- `400`: Invalid request parameters.
- `401`: Missing or invalid API key.
- `403`: Key restricted to another scope, or the caller's IP is not on the key's allowlist.
- `404`: Not found, not yet settled, or belongs to another tenant.
- `429`: Rate limit exceeded. Retry after the delay in `Retry-After` header.

## Changes

- **2026-11-03** `80ba8288c51d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/orcarouter/apis/orcarouter-api/changes/generation/get.md)

---

[API](https://skmtc.dev/orcarouter/apis/orcarouter-api.md) - [All operations](https://skmtc.dev/orcarouter/apis/orcarouter-api/llms.txt) - [OpenAPI document](https://skmtc.dev/orcarouter/apis/orcarouter-api/revisions/80ba8288c51d?raw)
