API 参考
取得文字最高费用报价
/v1/cost-quotesVersioned GloopAPI extension for authenticated, read-only text cost quotes. Uses current model permission, routing, conversion and the same immutable pricing engine as execution. Binds exact explicit text input, output limit, input-token bound, identity, model, protocol, pricing version and expiry. All cache and tier branches are bounded conservatively; unsupported request-dependent expressions or unbounded tools are rejected. Does not generate, reserve or charge. Submit the returned quote_token as quote_id with the same native input to POST /v1/text-runs. Price/input changes or expiry reject new execution; existing request recovery remains valid. Excess actual cost is an accounting anomaly that remains unsettled, never silently capped or subsidized. Speech extension: protocol=speech accepts the standard model/input/voice/response_format/speed body, without max_input_tokens. Only immutable input-character pricing is certified; token or duration estimates are rejected. Submit that signed quote_token and exact input to POST /v1/audio-runs.
鉴权与权限
使用当前 GloopAPI Key。模型、功能与权限以当前 Key 的目录及接口说明为准。
Authorization: Bearer $GLOOP_API_KEY鉴权方案: BearerAuth
请求
请求体 · application/json
- 类型
- object
- 额外属性
- false
- 必填字段
protocolinput
请求体必填
protocolstring必填- 枚举
["chat_completions","responses","speech"]
inputobject必填Exact native text request or standard AudioSpeechInput for protocol=speech. Speech uses configured voice/format and character pricing; no implicit clone.
max_input_tokensinteger选填Required for text protocols. Omitted for character-priced speech.
- 最小值
1- 最大值
10000000
@oneOf:0object选填@oneOf:0 子字段(1)
protocolunknown选填- 枚举
["chat_completions","responses"]
@oneOf:1object选填@oneOf:1 子字段(1)
protocolunknown选填- 枚举
["speech"]
响应与错误
HTTP 200
已验证的文字最高费用;不生成、不预留。
application/json
- 类型
- object
- 必填字段
versionidquote_tokenmodelprotocolcurrencymaximum_amountinput_fingerprintpricing_versionexpires_at
versioninteger必填- 枚举
[1]
idstring必填quote_tokenstring必填绑定鉴权身份、完整输入、模型、协议、冻结价格与到期时间的接受令牌。
modelstring必填protocolstring必填- 枚举
["chat_completions","responses"]
currencystring必填- 枚举
["USD"]
maximum_amountstring必填从冻结价格及所有有界缓存/阶梯分支计算的真实最高 USD 客户费用。
input_fingerprintstring必填pricing_versionstring必填expires_atinteger必填
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 422
当前无法证明费用上限,或输入无效/已改变;未派发模型执行。
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选填