/api/usage/requests/{request_id}リクエスト詳細
課金読み取り専用 API。モデル生成リクエストではありません。 料金とレーン ↗
完了したリクエストの使用量、請求明細、公開タイミングを確認します。
Path parameters
request_id同じ API Key が発行した request ID。別 key の request details は読めません。
Response fields
idrequested request ID。
modelrequested model または route name。
usage.measurement入力と出力それぞれの根拠です。provider は報告値、local_estimate はローカル推計、unavailable は不明です。過去の記録などでは省略されます。省略を実測値の証拠と解釈しないでください。
usage.dimensionsnormalized dimensions。例:input、output、
cache_read、cache_write_5m、
cache_miss。
billing.line_itemsprice、quantity、total charge を含む billable usage lines。
routing公開ステータスとタイミングのみ。内部ルーティング判断やプロバイダーの識別情報は公開しません。
Cache field guidance
OpenAI-compatible responses では cache read が
usage.prompt_tokens_details.cached_tokens または
usage.input_tokens_details.cached_tokens に出る場合があります。
billing と reconciliation では、この endpoint がより完全な source です。
See also
curl https://api.lazu.ai/api/usage/requests/req_lazu_01ABCDEF \-H "Authorization: Bearer $LAZU_API_KEY"
課金リクエストの完了後、ゲートウェイのリクエスト ID で使用量、課金項目、所要時間を確認できます。
実際のリクエスト明細を見る ↗{"object": "usage.request","id": "req_lazu_01ABCDEF","created_at": 1765980000,"model": "gpt-4o-mini","endpoint": "/v1/chat/completions","usage": {"prompt_tokens": 1200,"completion_tokens": 300,"total_tokens": 1500,"dimensions": [{ "name": "input", "quantity": 1200, "unit": "token" },{ "name": "cache_read", "quantity": 300, "unit": "token" },{ "name": "output", "quantity": 300, "unit": "token" }]},"billing": {"currency": "USD","amount_microusd": 480,"pricing_version": 3,"line_items": [{"dimension": "input","quantity": 1200,"unit_microusd": 150,"amount_microusd": 180}]},"routing": {"strategy_name": "default","requested_model": "gpt-4o-mini","resolved_model": "gpt-4o-mini","chose_provider": "openai","status_code": 200},"provider_usage": {"family": "openai","raw_fields": { "prompt_tokens": 1200, "completion_tokens": 300 }},"log_id": "log_01ABCDEF"}
{"error": {"type": "rate_limit_exceeded","message": "Per-key limit reached. Retry after 12s.","request_id": "req_01ABCDEF"}}
request_id の取得元
X-Lazu-Request-Id、error payload のrequest_id、または gateway response request ID。Calls api.lazu.ai directly. The key stays in this browser.