Skip to main content
GET
/
api
/
v1
/
generation
Get generation metadata
curl --request GET \
  --url https://api.myrouter.example/api/v1/generation \
  --header 'Authorization: Bearer <token>'
{
  "data": {
    "id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "endpoint": "<string>",
    "status": "<string>",
    "model": "<string>",
    "api_key_hash": "<string>",
    "latency_ms": 1,
    "usage": {
      "input_tokens": 1,
      "output_tokens": 1,
      "total_tokens": 1,
      "cache_read_tokens": 1,
      "cache_write_tokens": 1,
      "reasoning_tokens": 1
    },
    "charged_amount": "<string>",
    "currency": "<string>",
    "error": {}
  },
  "request_id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

x-request-id
string

Optional caller request id.

Query Parameters

id
string
required

Generation/request id.

Response

Get generation metadata response.

data
object
required
request_id
string

Request id.