API 参考
列出已保存的聊天结果
GET
/v1/chat/completions仅能操作当前 Key 显式 store=true 保存的已结算完整结果,正文保留七天。查询无结果不表示原请求未执行,不得据此自动退款或重发。store 和 metadata 不提供请求幂等保证。
鉴权与权限
使用当前 GloopAPI Key。模型、功能与权限以当前 Key 的目录及接口说明为准。
Authorization: Bearer $GLOOP_API_KEY鉴权方案: BearerAuth
请求
查询参数
响应与错误
HTTP 200
成功
application/json
- 类型
- object
objectstring选填- 枚举
["list"]
dataarray选填data 子字段(1)
[]object选填- 额外属性
false
[] 子字段(9)
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必填调用者最终美元费用的十进制字符串。
first_idstring选填last_idstring选填has_moreboolean选填
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选填