Generation
Look up the model, provider, measured 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.
Authentication: Requires an API key or a management key. Read-only management keys are accepted.
AuthorizationBearer <token>
API key used for model requests. Format: eur_<public-id>.<secret>.
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,
"measurements": {
"quantities": {
"inputTokens": 0,
"inputTextTokens": 0,
"inputImageTokens": 0,
"cachedInputTokens": 0,
"uncachedInputTokens": 0,
"outputTokens": 0,
"outputTextTokens": 0,
"outputImageTokens": 0,
"outputReasoningTokens": 0,
"totalTokens": 0,
"imagesIn": 0,
"imagesOut": 0,
"inputPixels": [
1
],
"outputPixels": [
1
],
"totalInputPixels": 0,
"totalOutputPixels": 0,
"requests": 0
},
"imageDimensions": {
"input": [
{
"width": 1,
"height": 1
}
],
"output": [
{
"width": 1,
"height": 1
}
]
}
}
},
"cost_eur": "string",
"cost_native": "string",
"native_currency": "string",
"exchange_rate": "string",
"latency_ms": -9007199254740991,
"error_category": "string",
"error_status_code": -9007199254740991
}
}