Query Generation
GET /v1/generation
Every request accepted by the gateway receives a gen- prefixed generation ID. Use it to query request-level billing and usage details.
Request
terminal
bash
curl "https://api.chuizi.ai/v1/generation?id=gen-abc123def456" \ -H "Authorization: Bearer ck-your-key"
Response
config.json
json
{ "data": { "id": "gen-abc123def456", "model": "anthropic/claude-sonnet-4-6", "provider": "anthropic", "streamed": false, "input_tokens": 1250, "output_tokens": 830, "cached_tokens": 1000, "reasoning_tokens": 0, "native_input_tokens": null, "native_output_tokens": null, "cost": "0.01557000", "upstream_cost": "0.01482857", "latency_ms": 2450, "generation_time_ms": null, "finish_reason": "stop", "created_at": "2026-05-12T10:15:00.000Z" } }
You can only query generations owned by the authenticated account. Unknown or unauthorized IDs return 404.