API 参考
上传参考图
POST
/v1/image-assetsmultipart 第一且唯一部分为 file,需文件名;非动画 JPEG/PNG/WebP,上传和重新编码后各不超过 10 MiB。
鉴权与权限
使用当前 GloopAPI Key。模型、功能与权限以当前 Key 的目录及接口说明为准。
Authorization: Bearer $GLOOP_API_KEY鉴权方案: BearerAuth
请求
请求头
Idempotency-Keystring必填同 Key 保存原请求意图;网络中断先恢复查询,未知状态禁止盲重发。
- 最短长度
1- 最长长度
191
请求体 · multipart/form-data
- 类型
- object
- 必填字段
file- 额外属性
- false
请求体必填
filestring必填唯一图片部分,带 filename;JPEG/PNG/WebP <=10MiB,非动画。
- 格式
"binary"
响应与错误
HTTP 200
上传参考图成功
application/json
- 类型
- object
- 必填字段
idmime_typesize_byteswidthheightexpires_at
file_idstring选填同账户同 Key 的托管文件公开 ID。
idstring必填该对象的公开标识符;用于对应详情路径。
mime_typestring必填已核验文件 MIME 类型。
size_bytesinteger必填文件字节数。
widthinteger必填图片像素宽度。
heightinteger必填图片像素高度。
expires_atinteger必填Unix 秒;0 表示无固定过期时间。上传关联托管文件;读取必须使用同账户同 Key。
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选填