chart-simple-horizontalGenerations

Get Generation Details

post

Retrieves detailed usage and performance metrics for a past generation request. Returns cost breakdown, model/provider info, token counts, latency, throughput, and BYOK status.

Authorizations
AuthorizationstringRequired

FastRouter API Key. Get yours at https://fastrouter.ai

Format: Authorization: Bearer YOUR_API_KEY

Body
generation_idstringRequired

The generation ID returned in the API response. Can be chat_id, request_id, or similar ID field from any FastRouter API endpoint response.

Example: transaction_id
Responses
chevron-right
200

Generation details retrieved successfully

application/json
idstringOptional

Generation ID (same as requested)

Example: transaction_id
modelstringOptional

Model used for this generation in provider/model format

Example: openai/gpt-3.5-turbo
provider_namestringOptional

Provider that processed the request

Example: openai
api_keystringOptional

Hashed API key used for the request (for auditing)

Example: API-KEY-HASH
credits_usednumberOptional

Total credits consumed by this request

Example: 0.000609
query_timestring · date-timeOptional

ISO 8601 timestamp of when the request was made

Example: 2025-05-06T13:51:02.889Z
avg_response_time_minutes_per_transactionnumberOptional

Average response time in minutes per transaction

Example: 0.03524546428333333
avg_tokens_per_nanonumberOptional

Average tokens processed per nanosecond (throughput metric)

Example: 1.5866666666666667
input_token_sizeintegerOptional

Number of tokens in the input/prompt

Example: 14
output_token_sizeintegerOptional

Number of tokens in the generated output/completion

Example: 105
is_byokbooleanOptional

Whether this request used Bring Your Own Key (BYOK). True if customer's own API key was used.

Example: false
endpointstringOptional

API endpoint used for the request

Example: /v1/chat/completions
created_atintegerOptional

Unix timestamp of request creation

requestobjectOptional

Full request body that was sent (if available)

responseobjectOptional

Full response body that was returned (if available)

metadataobjectOptional

Additional metadata about the request

post
/api/v1/generation

Last updated