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选填