Generation
Look up the model, provider, token usage and cost of a single EUrouter request by the x-request-id header it returned.
Get generation
Look up the recorded usage and cost of a single request by its id — the x-request-id response header returned by the original request. Usage is recorded asynchronously after the response is flushed, so a lookup made immediately after a request may return 404 for a short period; retry after a moment. Only requests you made are visible; anything else returns 404.
Authorization
bearerAuth AuthorizationBearer <token>
API key in format: eur_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Query Parameters
id*string
The request id — the x-request-id response header of the original request
Length
1 <= lengthResponse Body
application/json
curl -X GET "https://api.eurouter.ai/api/v1/generation?id=string"{
"data": {
"id": "string",
"created_at": "string",
"request_method": "string",
"model": "string",
"provider": "string",
"status": "success",
"usage": {
"tokens_in": -9007199254740991,
"tokens_out": -9007199254740991,
"cache_read_tokens": -9007199254740991,
"cache_write_tokens": -9007199254740991,
"audio_in_seconds": -9007199254740991,
"audio_out_seconds": -9007199254740991,
"characters": -9007199254740991
},
"cost_eur": "string",
"cost_native": "string",
"native_currency": "string",
"exchange_rate": "string",
"is_byok": true,
"latency_ms": -9007199254740991,
"error_category": "string",
"error_status_code": -9007199254740991
}
}