API 參考

取得文字最高费用报价

POST/v1/cost-quotes

Versioned 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)

響應與錯誤

HTTP 200

已验证的文字最高费用;不生成、不预留。

application/json

型別
object
必填欄位
versionidquote_tokenmodelprotocolcurrencymaximum_amountinput_fingerprintpricing_versionexpires_at

HTTP 400

輸入無效。

application/json

型別
object
必填欄位
error

HTTP 401

Key 缺失、無效、過期或已撤銷。

application/json

型別
object
必填欄位
error

HTTP 403

IP、賬戶、模型或工具許可權不足。

application/json

型別
object
必填欄位
error

HTTP 404

未找到本人執行;不能據此判斷未知生成沒有計費。

application/json

型別
object
必填欄位
error

HTTP 409

請求 ID 內容衝突,或在途執行不能刪除。

application/json

型別
object
必填欄位
error

HTTP 422

当前无法证明费用上限,或输入无效/已改变;未派发模型执行。

application/json

型別
object
必填欄位
error

HTTP 429

請求/佇列限流。

application/json

型別
object
必填欄位
error

HTTP 500

鑑權或資料儲存內部失敗。

application/json

型別
object
必填欄位
error

HTTP 503

暫不可用;已提交結果不確定時查詢原請求。

application/json

型別
object
必填欄位
error