Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
エンドポイント / Usage
GEThttps://api.lazu.ai/api/usage/requests/{request_id}

リクエスト詳細

完了したリクエストの使用量、請求明細、公開タイミングを確認します。

課金読み取り専用 API。モデル生成リクエストではありません。 料金とレーン ↗

Path parameters

request_idstringrequired

同じ API Key が発行した request ID。別 key の request details は読めません。

Response fields

idstring

requested request ID。

modelstring

requested model または route name。

usage.measurementobjectnullable

入力と出力それぞれの根拠です。provider は報告値、local_estimate はローカル推計、unavailable は不明です。過去の記録などでは省略されます。省略を実測値の証拠と解釈しないでください。

usage.dimensionsobject[]

normalized dimensions。例:input、output、 cache_read、cache_write_5m、 cache_miss。

billing.line_itemsobject[]

price、quantity、total charge を含む billable usage lines。

routingobjectnullable

公開ステータスとタイミングのみ。内部ルーティング判断やプロバイダーの識別情報は公開しません。

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

RequestGET /api/usage/requests/{request_id}
curl https://api.lazu.ai/api/usage/requests/req_lazu_01ABCDEF \
  -H "Authorization: Bearer $LAZU_API_KEY"
ResponseExample
{
  "object": "usage.request",
  "id": "req_lazu_01ABCDEF",
  "created_at": 1765980000,
  "model": "gpt-6-luna",
  "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": {
    "status_code": 200,
    "total_duration_ms": 1840,
    "ttft_ms": 420,
    "was_streaming": true
  },
  "provider_usage": {
    "family": "openai",
    "raw_fields": { "prompt_tokens": 1200, "completion_tokens": 300 }
  },
  "log_id": "log_01ABCDEF"
}
リクエスト明細

課金リクエストの完了後、ゲートウェイのリクエスト ID で使用量、課金項目、所要時間を確認できます。

実際のリクエスト明細を見る →

request_id の取得元

X-Lazu-Request-Id、error payload のrequest_id、または gateway response request ID。