Single Call
GET https://modelgo-web-api.modelgo.ai/api/openapi/v1/generations/{id}
GET https://modelgo-web-api.modelgo.ai/api/openapi/v1/requests/{id} # alias
GET https://modelgo-web-api.modelgo.ai/api/openapi/v1/generations/by-billing-session/{session_id}
Authorization: Bearer mgpat_xxxxxxxx{id} is the gateway's X-Request-Id response header (gw_...), not the chatcmpl-... value in the body.
Call logs are ingested by observer asynchronously, typically within 15–60 seconds. Until then the API returns
401 unauthorized / not_visible; clients should treat that as "not queryable yet" and retry with backoff.
Fields
| Group | Fields |
|---|---|
| Identity | id / request_id / generation_id / trace_id / created_at / completed_at |
| Call | model_requested / vendor / protocol / streamed / status / http_status / finish_reason |
| Error | error_class / error_reason |
| Usage | input_tokens / output_tokens / cached_tokens / cache_write_tokens / reasoning_tokens / total_tokens / media_units |
| Latency | ttft_ms / generation_ms / total_latency_ms |
| Billing | billing_status / estimated_amount / settled_amount / currency / price_version / billing_items |
| Ownership | workspace_id / api_key_id |
| Retries | provider_attempts / retry_count |
billing_items contains input / output / cache / addon / other components whose sum equals settled_amount.
route_summary is a sanitized routing summary: attempts / retries / failovers / final_status, with no supplier, instance or route IDs. model_used is returned only when the service switch openapi.expose_model_used is on; it is hidden by default (qa#582 supplier-identity redaction).
generation_id is the billing session id. If that is all you kept, resolve the same call with /generations/by-billing-session/{generation_id}.
Payloads (optional)
GET https://modelgo-web-api.modelgo.ai/api/openapi/v1/generations/{id}/content?kind=request
GET https://modelgo-web-api.modelgo.ai/api/openapi/v1/generations/{id}/content?kind=responseReadable only if the workspace had input/output logging enabled at call time; otherwise 200 {"available":false,"reason":"not_stored"}. Bodies are base64.
An unknown id and an id outside your visibility both return 401 unauthorized / not_visible, with no existence oracle.