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