API 參考
讀取已儲存的聊天結果
GET
/v1/chat/completions/{completion_id}僅能操作當前 Key 顯式 store=true 儲存的已結算完整結果,正文保留七天。查詢無結果不表示原請求未執行,不得據此自動退款或重發。store 和 metadata 不提供請求冪等保證。
鑑權與許可權
使用當前 GloopAPI Key。模型、功能與許可權以當前 Key 的目錄及介面說明為準。
Authorization: Bearer $GLOOP_API_KEY鑑權方案: BearerAuth
請求
路徑引數
completion_idstring必填
響應與錯誤
HTTP 200
成功
application/json
- 型別
- object
- 額外屬性
- false
idstring選填objectstring選填createdinteger選填modelstring選填choicesarray選填choices 子欄位(1)
[]object選填- 額外屬性
false
[] 子欄位(3)
indexinteger選填messageobject選填- 額外屬性
false
finish_reasonstring選填- 列舉
["stop","length","tool_calls","content_filter"]
usageobject選填usage 子欄位(5)
prompt_tokensinteger選填提示詞 Token 數
completion_tokensinteger選填補全 Token 數
total_tokensinteger選填總 Token 數
prompt_tokens_detailsobject選填prompt_tokens_details 子欄位(4)
cached_tokensinteger選填text_tokensinteger選填audio_tokensinteger選填image_tokensinteger選填
completion_tokens_detailsobject選填completion_tokens_details 子欄位(3)
text_tokensinteger選填audio_tokensinteger選填reasoning_tokensinteger選填
system_fingerprintstring選填metadata 子欄位(1)
[key]string選填
gloop_billingobject選填GloopAPI 扩展:已存储回复的 GET/列表查询返回调用者已结算的美元费用。不是 OpenAI 标准字段;生成响应可省略。缺失时不能推断费用为零。
gloop_billing 子欄位(3)
statusstring必填- 列舉
["settled"]
currencystring必填- 列舉
["USD"]
final_amountstring必填调用者最终美元费用的十进制字符串。
HTTP 400
引數無效
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 401
Key 無效
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 404
結果不存在、已刪除、已過期或尚不可交付
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 503
暫時不可用
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填