Request Generation Details API
The Request Generations Details API lets you retrieve detailed usage and performance metrics for a previously made generation request using its generation_id
.
This is useful for auditing, debugging, or cost analysis — especially in BYOK and multi-team environments.
Track cost per request
Get the model and provider used for a generation
See token usage
Identify if a request used a BYOK (Bring Your Own Key)
Request Format
curl --location --request POST 'https://go.fastrouter.ai/api/v1/generation' \
--header 'Authorization: Bearer API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"generation_id": "GEN-ID"
}'
Response Format
{
"id": "GEN-ID",
"model": "openai/gpt-3.5-turbo",
"provider_name": "openai",
"api_key": "API-KEY-HASH",
"credits_used": 0.000609,
"query_time": "2025-05-06T13:51:02.889Z",
"avg_response_time_minutes_per_transaction": 0.03524546428333333,
"avg_tokens_per_nano": 1.5866666666666667,
"input_token_size": 14,
"output_token_size": 105,
"is_byok": false
}
Last updated