API console
GET/v1/generation/gen-xxxxxxxx
Bash
curl https://spro.hridaai.com/v1/generation/20261018-abc123 \ -H "Authorization: Bearer spro-xxxxxxxxxxxxxxxx"JSON
{ "generation_id": "20261018-abc123", "request_id": "20261018-abc123", "provider": "openai", "model": "openai/gpt-oss-120b", "input_tokens": 12, "output_tokens": 48, "total_tokens": 60, "total_cost": 0.00003, "currency": "USD", "latency_ms": 812, "execution_time_ms": 790, "ttft_ms": 230, "finish_reason": "stop", "created_at": "2026-10-18T10:00:02Z"}GET https://spro.hridaai.com/v1/generation/{generation_id}
Returns the settled result for one past request. Use the id you got back in the x-spro-request-id response header. The result matches the usage log for that call, so you can reconcile billing or latency from your own code without opening the dashboard.
Only generations owned by the API key's account are returned. An id from another account returns 404, the same as an unknown id.
Path parameters
| Name | Type | Description |
|---|---|---|
generation_id | string | The request id of the call to look up, from the x-spro-request-id header. |
Response fields
| Field | Type | Description |
|---|---|---|
generation_id | string | Same as request_id. |
request_id | string | The request id of the original call. |
provider | string or null | The provider that served the call. |
model | string or null | The canonical model slug that served the call. |
input_tokens | integer | Prompt tokens billed for the call. |
output_tokens | integer | Completion tokens billed for the call. |
total_tokens | integer | input_tokens + output_tokens. |
total_cost | number | Billed cost for the call, in currency. |
currency | string | Always USD. |
latency_ms | integer or null | Total time from request to final byte. |
execution_time_ms | integer or null | Time spent on the provider call. |
ttft_ms | integer or null | Time to first token. Null when it wasn't recorded. |
finish_reason | string or null | Why generation stopped, such as stop or length. |
created_at | string | ISO timestamp when the call was recorded. |
Errors
| Status | Code | When |
|---|---|---|
401 | Invalid Credentials | The bearer token is missing, malformed, or invalid. See Error Codes. |
404 | generation_not_found | No generation with that id exists for your account. |
Behavior
- Settled results only: the lookup reads the final usage record. A call that is still running is not returned yet.
- Latest match wins: if a request id appears more than once, the most recent record is returned.
- Scoped to your account: results from other accounts are never returned, even when the id is correct.
