透過 ID 取得已完成生成的詳細元數據。使用此端點可以查看任何歷史請求的費用和用量。Documentation Index
Fetch the complete documentation index at: https://docs.arouter.ai/llms.txt
Use this file to discover all available pages before exploring further.
端點
查詢參數
| 參數 | 類型 | 必需 | 描述 |
|---|---|---|---|
id | string | 是 | 來自聊天補全回應 id 欄位的生成 ID |
請求範例
回應範例
回應欄位
| 欄位 | 類型 | 描述 |
|---|---|---|
id | string | 生成 ID |
model | string | 生成回應的模型 |
provider | string | 處理請求的提供商 |
created_at | string | ISO 8601 時間戳 |
latency_ms | integer | 請求總延遲(毫秒) |
usage.prompt_tokens | integer | 輸入 Token 數 |
usage.completion_tokens | integer | 輸出 Token 數 |
usage.total_tokens | integer | 總 Token 數 |
usage.cost | number | 總費用(USD) |
usage.is_byok | boolean | 是否使用了使用者提供的 key |
說明
- 生成元數據通常在請求完成後數秒內即可取得
- 生成 ID 在每個聊天補全回應的
id欄位中回傳 - 歷史資料保留 90 天