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