對話與補全
本頁彙總 OpenAI Chat Completions、OpenAI Responses、Anthropic Claude 原生格式與 Google Gemini 原生格式相關接口。
Apifox 覆蓋範圍補充
- OpenAI / ChatCompletions:基礎文本對話、流式響應、圖片理解、函數調用、Logprobs、內容補全、聯網搜索、PDF 文件分析、Codex、
response_format、N 測試、Token Usage - OpenAI / Responses:基礎文本響應、圖像分析響應、網絡搜索工具、文件搜索工具、Computer use、流式響應、deep-research、函數調用、推理能力、推理總結、xAI 聯網搜索
- Anthropic Claude:原生格式、OpenAI 兼容格式、強制返回思考、多輪函數調用、Web search
- Google Gemini:原生文本聊天/媒體識別,OpenAI 兼容格式下的強制思考、自定義思考預算、聯網搜索、TTS、音頻理解、視頻理解
模型接口/聊天(Chat)/OpenAI/ChatCompletions格式
POST Completions舊格式
POST /completions
Body 請求參數
{
"model": "gpt-3.5-turbo-instruct",
"prompt": "Write a tagline for an ice cream shop."
}
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| Content-Type | header | string | 否 | none |
| Accept | header | string | 否 | none |
| Authorization | header | string | 否 | none |
| body | body | object | 否 | none |
| » messages | body | [object] | 是 | 以聊天格式生成聊天完成的消息。 |
| »» role | body | string | 否 | none |
| »» content | body | string | 否 | none |
| » model | body | string | 是 | 要使用的模型 ID。有關哪些模型適用於 Chat API 的詳細信息,請參閱模型端點兼容性表。 |
| » store | body | boolean¦null | 否 | 是否存儲此聊天補全請求的輸出以用於我們的模型蒸餾或評估產品。 |
| » reasoning_effort | body | string¦null | 否 | 僅適用於 o系列 的模型 |
| » metadata | body | object¦null | 否 | 可以附加到對象的16個鍵值對集合。這對於以結構化格式存儲對象的其他信息很有用,並可以通過 API 或儀錶板查詢對象。 |
| » modalities | body | [string]¦null | 否 | 您希望模型為此請求生成的輸出類型。大多數模型都能生成文本,這是默認設置: ["text"] |
| » prediction | body | object | 否 | 預測輸出的配置,當提前知道模型響應的大部分內容時,可以大大提高響應時間。這在您只對文件進行微小更改時最常見。 |
| » audio | body | object¦null | 否 | 音頻輸出的參數。當使用 modalities: ["audio"] 請求音頻輸出時需要。 |
| » temperature | body | number¦null | 否 | 要使用的採樣溫度,介於 0 和 2 之間。較高的值(如0.8)會使輸出更加隨機,而較低的值(如0.2)會使其更加集中和確定性。我們通常建議更改此值或 top_p,但不要同時更改。 |
| » top_p | body | number¦null | 否 | 一種替代採樣溫度的方法,稱為核採樣,其中模型考慮具有 top_p 概率質量的標記結果。因此,0.1 意味著只考慮包含前 10% 概率質量的標記。 |
| » n | body | integer¦null | 否 | 為每個輸入消息生成多少個聊天補全選擇。請注意,您將根據所有選擇生成的標記數量收費。保持 n 為 1 可最大限度地降低成本。 |
| » stop | body | string¦null | 否 | 不支持最新的推理模型和 .o3、o4-mini |
| » max_tokens | body | integer¦null | 否 | 聊天補全中可以生成的最大標記數。此值可用於控制通過 API 生成的文本成本。 |
| » max_completion_tokens | body | integer¦null | 否 | 補全中可以生成的標記數的上限,包括可見輸出標記和推理標記。 |
| » presence_penalty | body | number¦null | 否 | 介於 -2.0 和 2.0 之間的數字。正值根據新標記到目前為止在文本中出現的情況來懲罰它們,從而增加模型討論新主題的可能性。 |
| » frequency_penalty | body | number¦null | 否 | 介於 -2.0 和 2.0 之間的數字。正值根據新標記到目前為止在文本中的現有頻率來懲罰它們,從而降低模型逐字重複同一行的可能性。 |
| » logit_bias | body | null | 否 | 修改指定標記出現在補全中的可能性。 |
| » logprobs | body | boolean¦null | 否 | 是否返回輸出標記的對數概率。如果為 true,則返回 message.content 中每個輸出標記的對數概率。 |
| » user | body | string | 否 | 表示最終用戶的唯一標識符,可以幫助 OpenAI 監控和檢測濫用行為。 |
| » service_tier | body | string¦null | 否 | 指定用於處理請求的延遲層級。此參數與訂閱了 scale tier 服務的客戶相關: |
| » stream_options | body | object¦null | 否 | 流式響應的選項。僅在設置 stream: true 時使用。 |
| »» include_usage | body | boolean | 否 | 如果設置,將在 data: [DONE] 消息之前流式傳輸一個附加塊。該塊上的 usage 字段顯示整個請求的令牌使用統計信息,choices 字段始終為空數組。所有其他塊也將包含 usage 字段,但值為 null。注意:如果流被中斷,您可能不會收到包含請求總令牌使用量的最終使用塊。 |
| » response_format | body | object | 否 | 指定模型必須輸出的格式。 |
| » seed | body | integer¦null | 否 | Beta 功能。如果指定,我們的系統將盡最大努力進行確定性採樣,使得具有相同 seed 和參數的重複請求應返回相同的結果。不保證確定性,您應參考響應參數的 system_fingerprint 以監控後端的變化。 |
| » tools | body | [string] | 否 | 模型可能調用的工具列表。目前僅支持函數作為工具。使用此參數提供模型可能生成 JSON 輸入的函數列表。最多支持 128 個函數。 |
| » functions | body | [string] | 否 | 注意:已棄用,推薦使用 tools |
| » tool_choice | body | string | 否 | 控制模型調用哪個工具(如果有): - none:模型不會調用任何工具,而是生成消息 - auto:模型可以在生成消息或調用一個或多個工具之間選擇 - required:模型必須調用一個或多個工具 - {"type": "function", "function": {"name": "my_function"}}:強制模型調用特定工具 |
| » function_call | body | string | 否 | 注意:已棄用,推薦使用 tool_choice |
| » parallel_tool_calls | body | boolean | 否 | 是否在工具使用期間啟用並行函數調用。 |
| » stream | body | boolean | 否 | 如果設置為 true,模型響應數據將在生成時通過服務器發送事件流式傳輸到客戶端。請參閱下方的流式響應部分獲取更多信息,以及流式響應指南瞭解如何處理流式事件。 |
| » top_logprobs | body | integer | 否 | 0 到 20 之間的整數,指定在每個標記位置返回的最可能標記的數量,每個標記都有關聯的對數概率。如果使用此參數,必須將 logprobs 設置為 true。 |
| » web_search_options | body | object | 否 | 此工具搜索網絡以獲取相關結果用於回覆。瞭解更多關於網絡搜索工具的信息。 |
詳細說明
» reasoning_effort: 僅適用於 o系列 的模型 約束推理模型的推理工作。當前支持的值為 low、medium 和 high。減少推理工作可以加快響應速度並減少響應中用於推理的標記數。
» metadata: 可以附加到對象的16個鍵值對集合。這對於以結構化格式存儲對象的其他信息很有用,並可以通過 API 或儀錶板查詢對象。
鍵是最大長度為64個字符的字符串。值是最大長度為512個字符的字符串。
» modalities: 您希望模型為此請求生成的輸出類型。大多數模型都能生成文本,這是默認設置: ["text"]
該模型還可以用於生成音頻。要請求此模型同時生成文本和音頻響應,您可以使用: ["text", "audio"]
» top_p: 一種替代採樣溫度的方法,稱為核採樣,其中模型考慮具有 top_p 概率質量的標記結果。因此,0.1 意味著只考慮包含前 10% 概率質量的標記。
我們通常建議更改此值或 temperature,但不要同時更改。
» stop: 不支持最新的推理模型和 .o3、o4-mini API 將停止生成更多標記的最多 4 個序列。返回的文本不會包含停止序列。
» max_tokens: 聊天補全中可以生成的最大標記數。此值可用於控制通過 API 生成的文本成本。
該值現已棄用,取而代之的是 max_completion_tokens,並且與 o1 系列模型不兼容。
» logit_bias: 修改指定標記出現在補全中的可能性。
接受一個 JSON 對象,該對象將標記(由分詞器中的標記 ID 指定)映射到從 -100 到 100 的關聯偏差值。在數學上,偏差被添加到模型在採樣之前生成的對數中。確切的效果會因模型而異,但介於 -1 和 1 之間的值應該會減少或增加選擇的可能性;像 -100 或 100 這樣的值應該導致相關標記被禁止或獨佔選擇。
» service_tier: 指定用於處理請求的延遲層級。此參數與訂閱了 scale tier 服務的客戶相關:
如果設置為 'auto',且項目啟用了 Scale tier,系統將使用 scale tier 信用直到用完 如果設置為 'auto',且項目未啟用 Scale tier,請求將使用默認服務層級處理,具有較低的正常運行時間 SLA 且無延遲保證 如果設置為 'default',請求將使用默認服務層級處理,具有較低的正常運行時間 SLA 且無延遲保證 如果設置為 'flex',請求將使用 Flex Processing 服務層級處理。詳情請參閱文檔。 未設置時,默認行為為 'auto' 當設置此參數時,響應體將包含使用的 service_tier
» response_format: 指定模型必須輸出的格式。
設置為 { "type": "json_schema", "json_schema": {...} } 啟用結構化輸出,確保模型將匹配您提供的 JSON schema。 設置為 { "type": "json_object" } 啟用 JSON 模式,確保模型生成的消息是有效的 JSON。 重要提示:使用 JSON 模式時,您還必須通過系統或用戶消息自行指示模型生成 JSON。否則,模型可能會生成無盡的空白直到生成達到令牌限制。
» tool_choice: 控制模型調用哪個工具(如果有): - none:模型不會調用任何工具,而是生成消息 - auto:模型可以在生成消息或調用一個或多個工具之間選擇 - required:模型必須調用一個或多個工具 - {"type": "function", "function": {"name": "my_function"}}:強制模型調用特定工具
當沒有工具時默認為 none,有工具時默認為 auto
» function_call: 注意:已棄用,推薦使用 tool_choice 控制模型調用哪個函數(如果有):
none:模型不會調用函數,而是生成消息 auto:模型可以在生成消息或調用函數之間選擇 {"name": "my_function"}:強制模型調用特定函數
返回示例
200 Response
{
"id": "string",
"object": "string",
"created": 0,
"choices": [
{
"index": 0,
"message": {
"role": "string",
"content": "string"
},
"finish_reason": "string"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回數據結構
狀態碼 200
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » id | string | true | none | none | |
| » object | string | true | none | none | |
| » created | integer | true | none | none | |
| » choices | [object] | true | none | none | |
| »» index | integer | false | none | none | |
| »» message | object | false | none | none | |
| »»» role | string | true | none | none | |
| »»» content | string | true | none | none | |
| »» finish_reason | string | false | none | none | |
| » usage | object | true | none | none | |
| »» prompt_tokens | integer | true | none | none | |
| »» completion_tokens | integer | true | none | none | |
| »» total_tokens | integer | true | none | none |
GET 令牌用量查詢(Token Usage)
GET /api/usage/token
通過認證查詢當前 Bearer Token 的額度使用情況:授予總量、已用、剩餘、是否無限、模型限額及到期時間。
字段說明(data) object: 固定為 token_usage name: 令牌名稱 total_granted: 授予總量(= 已用 + 剩餘) total_used: 已使用額度 total_available: 可用剩餘額度 unlimited_quota: 是否為無限額度 model_limits: 允許使用的模型列表 model_limits_enabled: 是否啟用模型限額 expires_at: 到期時間的 Unix 時間戳(秒)。若永不過期返回 0(由後端將 -1 歸一化為 0)
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| Authorization | header | string | 否 | none |
返回示例
200 Response
{
"data": [
{
"id": "string",
"object": "string",
"owned_by": "string",
"permission": [
"string"
]
}
],
"object": "string"
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回數據結構
狀態碼 200
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » data | [object] | true | none | none | |
| »» id | string | true | none | none | |
| »» object | string | true | none | none | |
| »» owned_by | string | true | none | none | |
| »» permission | [oneOf] | true | none | none |
oneOf
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| »»» anonymous | string | false | none | none |
xor
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| »»» anonymous | integer | false | none | none |
xor
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| »»» anonymous | boolean | false | none | none |
xor
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| »»» anonymous | array | false | none | none |
xor
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| »»» anonymous | object | false | none | none |
xor
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| »»» anonymous | number | false | none | none |
continued
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » object | string | true | none | none |
模型接口/聊天(Chat)/OpenAI/Responses格式
POST xAI聯網搜索
POST /responses
Body 請求參數
{
"model": "grok-4-1-fast-reasoning",
"input": [
{
"role": "user",
"content": "最近 xAI 有哪些最新動態?"
}
],
"tools": [
{
"type": "web_search"
},
{
"type": "x_search"
}
]
}
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| Content-Type | header | string | 是 | none |
| Accept | header | string | 是 | none |
| Authorization | header | string | 否 | none |
| body | body | object | 否 | none |
| » model | body | string | 是 | 要使用的模型的 ID。有關哪些模型適用於聊天 API 的詳細信息,請參閱模型端點兼容性表。 |
| » messages | body | [object] | 是 | 以聊天格式生成聊天完成的消息。 |
| »» role | body | string | 否 | none |
| »» content | body | string | 否 | none |
| » temperature | body | integer | 否 | 使用什麼採樣溫度,介於 0 和 2 之間。較高的值(如 0.8)將使輸出更加隨機,而較低的值(如 0.2)將使輸出更加集中和確定。 我們通常建議改變這個或top_p但不是兩者。 |
| » top_p | body | integer | 否 | 一種替代溫度採樣的方法,稱為核採樣,其中模型考慮具有 top_p 概率質量的標記的結果。所以 0.1 意味著只考慮構成前 10% 概率質量的標記。 我們通常建議改變這個或temperature但不是兩者。 |
| » n | body | integer | 否 | 為每個輸入消息生成多少個聊天完成選項。 |
| » stream | body | boolean | 否 | 如果設置,將發送部分消息增量,就像在 ChatGPT 中一樣。當令牌可用時,令牌將作為純數據服務器發送事件data: [DONE]發送,流由消息終止。有關示例代碼,請參閱 OpenAI Cookbook 。 |
| » stop | body | string | 否 | API 將停止生成更多令牌的最多 4 個序列。 |
| » max_tokens | body | integer | 否 | 聊天完成時生成的最大令牌數。 輸入標記和生成標記的總長度受模型上下文長度的限制。 |
| » presence_penalty | body | number | 否 | -2.0 和 2.0 之間的數字。正值會根據到目前為止是否出現在文本中來懲罰新標記,從而增加模型談論新主題的可能性。 查看有關頻率和存在懲罰的更多信息。 |
| » frequency_penalty | body | number | 否 | -2.0 和 2.0 之間的數字。正值會根據新標記在文本中的現有頻率對其進行懲罰,從而降低模型逐字重複同一行的可能性。 查看有關頻率和存在懲罰的更多信息。 |
| » logit_bias | body | null | 否 | 修改指定標記出現在完成中的可能性。 接受一個 json 對象,該對象將標記(由標記器中的標記 ID 指定)映射到從 -100 到 100 的關聯偏差值。從數學上講,偏差會在採樣之前添加到模型生成的 logits 中。確切的效果因模型而異,但 -1 和 1 之間的值應該會減少或增加選擇的可能性;像 -100 或 100 這樣的值應該導致相關令牌的禁止或獨佔選擇。 |
| » user | body | string | 否 | 代表您的最終用戶的唯一標識符,可以幫助 OpenAI 監控和檢測濫用行為。瞭解更多。 |
返回示例
200 Response
{
"id": "string",
"object": "string",
"created": 0,
"choices": [
{
"index": 0,
"message": {
"role": "string",
"content": "string"
},
"finish_reason": "string"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回數據結構
狀態碼 200
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » id | string | true | none | none | |
| » object | string | true | none | none | |
| » created | integer | true | none | none | |
| » choices | [object] | true | none | none | |
| »» index | integer | false | none | none | |
| »» message | object | false | none | none | |
| »»» role | string | true | none | none | |
| »»» content | string | true | none | none | |
| »» finish_reason | string | false | none | none | |
| » usage | object | true | none | none | |
| »» prompt_tokens | integer | true | none | none | |
| »» completion_tokens | integer | true | none | none | |
| »» total_tokens | integer | true | none | none |
模型接口/聊天(Chat)/Anthropic Claude/原生Claude格式(推薦)
POST Web search / 聯網搜索
POST /messages
支持官方原生格式,模型名稱和官方一致
Body 請求參數
{
"model": "claude-sonnet-4-6",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "今天幾號?用一句話總結今天北京的天氣,並給出信息來源"
}
],
"tools": [
{
"type": "web_search_20250305",
"name": "web_search",
"max_uses": 3
}
],
"tool_choice": {
"type": "auto"
}
}
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| Content-Type | header | string | 是 | none |
| Accept | header | string | 是 | none |
| x-api-key | header | string | 否 | none |
| body | body | object | 否 | none |
| » model | body | string | 是 | 要使用的模型的 ID。有關哪些模型適用於聊天 API 的詳細信息,請參閱模型端點兼容性表。 |
| » messages | body | [object] | 是 | 以聊天格式生成聊天完成的消息。 |
| »» role | body | string | 否 | none |
| »» content | body | string | 否 | none |
| » temperature | body | integer | 否 | 使用什麼採樣溫度,介於 0 和 2 之間。較高的值(如 0.8)將使輸出更加隨機,而較低的值(如 0.2)將使輸出更加集中和確定。 我們通常建議改變這個或top_p但不是兩者。 |
| » top_p | body | integer | 否 | 一種替代溫度採樣的方法,稱為核採樣,其中模型考慮具有 top_p 概率質量的標記的結果。所以 0.1 意味著只考慮構成前 10% 概率質量的標記。 我們通常建議改變這個或temperature但不是兩者。 |
| » n | body | integer | 否 | 為每個輸入消息生成多少個聊天完成選項。 |
| » stream | body | boolean | 否 | 如果設置,將發送部分消息增量,就像在 ChatGPT 中一樣。當令牌可用時,令牌將作為純數據服務器發送事件data: [DONE]發送,流由消息終止。有關示例代碼,請參閱 OpenAI Cookbook 。 |
| » stop | body | string | 否 | API 將停止生成更多令牌的最多 4 個序列。 |
| » max_tokens | body | integer | 否 | 聊天完成時生成的最大令牌數。 輸入標記和生成標記的總長度受模型上下文長度的限制。 |
| » presence_penalty | body | number | 否 | -2.0 和 2.0 之間的數字。正值會根據到目前為止是否出現在文本中來懲罰新標記,從而增加模型談論新主題的可能性。 查看有關頻率和存在懲罰的更多信息。 |
| » frequency_penalty | body | number | 否 | -2.0 和 2.0 之間的數字。正值會根據新標記在文本中的現有頻率對其進行懲罰,從而降低模型逐字重複同一行的可能性。 查看有關頻率和存在懲罰的更多信息。 |
| » logit_bias | body | null | 否 | 修改指定標記出現在完成中的可能性。 接受一個 json 對象,該對象將標記(由標記器中的標記 ID 指定)映射到從 -100 到 100 的關聯偏差值。從數學上講,偏差會在採樣之前添加到模型生成的 logits 中。確切的效果因模型而異,但 -1 和 1 之間的值應該會減少或增加選擇的可能性;像 -100 或 100 這樣的值應該導致相關令牌的禁止或獨佔選擇。 |
| » user | body | string | 否 | 代表您的最終用戶的唯一標識符,可以幫助 OpenAI 監控和檢測濫用行為。瞭解更多。 |
返回示例
200 Response
{
"id": "string",
"object": "string",
"created": 0,
"choices": [
{
"index": 0,
"message": {
"role": "string",
"content": "string"
},
"finish_reason": "string"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回數據結構
狀態碼 200
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » id | string | true | none | none | |
| » object | string | true | none | none | |
| » created | integer | true | none | none | |
| » choices | [object] | true | none | none | |
| »» index | integer | false | none | none | |
| »» message | object | false | none | none | |
| »»» role | string | true | none | none | |
| »»» content | string | true | none | none | |
| »» finish_reason | string | false | none | none | |
| » usage | object | true | none | none | |
| »» prompt_tokens | integer | true | none | none | |
| »» completion_tokens | integer | true | none | none | |
| »» total_tokens | integer | true | none | none |
模型接口/聊天(Chat)/Google Gemini/原生Gemini格式
POST Gemini文本聊天
POST /v1beta/models/gemini-3-flash-preview:generateContent
代理 Gemini API 請求。 路徑格式: /v1beta/models/{model_name}:{action} 例如: /v1beta/models/gemini-2.5-pro:generateContent /v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse
Body 請求參數
{
"contents": [
{
"parts": [
{
"text": "Hello"
}
]
}
]
}
請求參數
| 名稱 | 位置 | 類型 | 必選 | 說明 |
|---|---|---|---|---|
| key | query | string | 是 | none |
| Content-Type | header | string | 是 | none |
| body | body | object | 否 | none |
| » contents | body | [object] | 是 | none |
| »» parts | body | [object] | 否 | none |
| »»» text | body | string | 否 | none |
返回示例
200 Response
{
"id": "string",
"object": "string",
"created": 0,
"choices": [
{
"index": 0,
"message": {
"role": "string",
"content": "string"
},
"finish_reason": "string"
}
],
"usage": {
"prompt_tokens": 0,
"completion_tokens": 0,
"total_tokens": 0
}
}
返回結果
| 狀態碼 | 狀態碼含義 | 說明 | 數據模型 |
|---|---|---|---|
| 200 | OK | none | Inline |
返回數據結構
狀態碼 200
| 名稱 | 類型 | 必選 | 約束 | 中文名 | 說明 |
|---|---|---|---|---|---|
| » id | string | true | none | none | |
| » object | string | true | none | none | |
| » created | integer | true | none | none | |
| » choices | [object] | true | none | none | |
| »» index | integer | false | none | none | |
| »» message | object | false | none | none | |
| »»» role | string | true | none | none | |
| »»» content | string | true | none | none | |
| »» finish_reason | string | false | none | none | |
| » usage | object | true | none | none | |
| »» prompt_tokens | integer | true | none | none | |
| »» completion_tokens | integer | true | none | none | |
| »» total_tokens | integer | true | none | none |