or_generation
Retrieve detailed metrics for a single inference call by its generation ID: cost, tokens, latency, finish reason, and provider, to explain call-specific charges.
Instructions
Get details of a single inference call by its generation_id (returned by OpenRouter in completion responses, e.g. 'gen-abc123'). Returns cost, tokens, latency, finish reason, provider — useful when an agent needs to explain why a specific call cost what it did.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "or_generation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Generation ID returned by OpenRouter (e.g. 'gen-abc123') |