API 參考
查詢文字執行
GET
/v1/text-runs/{id}使用普通 GloopAPI Key。支援純文字 Chat Completions 模型及可選流式輸出;不支援 Responses、工具呼叫或多模態。相同 Key 與 request_id 的重複提交返回原執行,不再次生成;不同內容返回 409。unknown 不代表免費或失敗,應查詢原請求。已結算且完整儲存的結果才會返回 output;正文七天到期,刪除或到期後仍保留請求 ID 和賬務記錄。
鑑權與許可權
使用當前 GloopAPI Key。模型、功能與許可權以當前 Key 的目錄及介面說明為準。
Authorization: Bearer $GLOOP_API_KEY鑑權方案: BearerAuth
請求
路徑引數
idstring必填
響應與錯誤
HTTP 200
讀取成功。
application/json
- 型別
- object
- 必填欄位
idrequest_idmodelstateversionexpires_atresult_deleted
idstring必填request_idstring必填modelstring必填statestring必填- 列舉
["pending","unknown","succeeded","failed"]
versioninteger必填- 列舉
[1]
expires_atinteger必填結果正文到期的 Unix 秒時間;正文最多保留七天。
result_deletedboolean必填outputobject選填output 子欄位(4)
textstring必填input_tokensinteger必填output_tokensinteger必填usage_sourcestring必填- 列舉
["reported"]
billingobject選填billing 子欄位(5)
statusstring必填- 列舉
["settled","refunded"]
currencystring必填- 列舉
["USD"]
final_amountstring選填权威最终钱包实收;缺失不代表零费用。
pricing_versionstring選填quote_idstring選填
HTTP 202
執行中或狀態待確認。
application/json
- 型別
- object
- 必填欄位
idrequest_idmodelstateversionexpires_atresult_deleted
idstring必填request_idstring必填modelstring必填statestring必填- 列舉
["pending","unknown","succeeded","failed"]
versioninteger必填- 列舉
[1]
expires_atinteger必填結果正文到期的 Unix 秒時間;正文最多保留七天。
result_deletedboolean必填outputobject選填output 子欄位(4)
textstring必填input_tokensinteger必填output_tokensinteger必填usage_sourcestring必填- 列舉
["reported"]
billingobject選填billing 子欄位(5)
statusstring必填- 列舉
["settled","refunded"]
currencystring必填- 列舉
["USD"]
final_amountstring選填权威最终钱包实收;缺失不代表零费用。
pricing_versionstring選填quote_idstring選填
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 403
IP、賬戶、模型或工具許可權不足。
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 409
請求 ID 內容衝突,或在途執行不能刪除。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 429
請求/佇列限流。
application/json
- 型別
- object
- 必填欄位
error
errorobject必填error 子欄位(4)
codestring選填messagestring選填typestring選填request_idstring選填
HTTP 500
鑑權或資料儲存內部失敗。
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選填