API 参考
取得持久图像报价
POST
/v1/image-quotes只校验输入与权限,不锁定图片。报价有效 60 秒,创建时重新核验路由/价格/请求;服务开关关闭返回 503。
鉴权与权限
使用当前 GloopAPI Key。模型、功能与权限以当前 Key 的目录及接口说明为准。
Authorization: Bearer $GLOOP_API_KEY鉴权方案: BearerAuth
请求
请求体 · application/json
- 类型
- object
- 必填字段
modelpromptsize- 额外属性
- false
请求体必填
modelstring必填当前 Key 目录中的公开模型 ID。
- 最长长度
191
promptstring必填非空,按 UTF-8 字节最多 32000;OpenAPI maxLength 是字符,故不伪造字符上限。
sizestring必填所选 image-models 返回的尺寸值;能力及尺寸按模型分别校验。
ninteger选填省略或 0 归一为 1。实际上限取 image-models 的 max_n,不能将全局上限当模型能力。
- 默认值
1- 最小值
1- 最大值
6
referencesarray选填每项仅选 file_id、asset_id、url 之一;实际数量取 max_references。
- 最多项数
14
source_task_idstring选填可选的同 Key 来源任务,仅追溯来源,不代替 references。
- 最长长度
64
quote_idstring选填创建任务时必须是有效且匹配请求的报价;报价请求中忽略。
响应与错误
HTTP 200
取得持久图像报价成功
application/json
- 类型
- object
- 必填字段
pricing_noteidexpires_atreserved_quotaestimated_costcurrency
pricing_notestring必填模型计价说明;最终按确认计量结算。
idstring必填该对象的公开标识符;用于对应详情路径。
expires_atinteger必填Unix 秒有效期,0 表示不按固定时间到期。
reserved_quotainteger必填以平台 quota 单位表示的预留额度,不是美元数。
estimated_costnumber必填报价货币中的预估销售费用。
currencystring必填报价/账务币种。
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
幂等/报价冲突、对象未准备或仍被引用。
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选填