API 参考
上传多模态输入文件
POST
/v1/video-inputs仅接受 multipart 的一个 file 部分。支持 MP4(最多 512 MiB)、WAV/MP3(最多 15 MiB、30 秒)及 PDF(最多 100 MiB),并受当前文件额度限制。返回 file_id,不触发生成或模型扣费。
鉴权与权限
使用当前 GloopAPI Key。模型、功能与权限以当前 Key 的目录及接口说明为准。
Authorization: Bearer $GLOOP_API_KEY鉴权方案: BearerAuth
请求
请求头
Idempotency-Keystring必填- 最短长度
1- 最长长度
128- 匹配规则
"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"
请求体 · multipart/form-data
- 类型
- object
- 必填字段
file- 额外属性
- false
请求体必填
filestring必填唯一文件部分;不接受额外表单字段。
- 格式
"binary"
响应与错误
HTTP 200
文件上传成功
application/json
- 类型
- object
- 必填字段
file_idstatuscontent_typesize_bytes- 额外属性
- false
file_idstring必填statusstring必填- 枚举
["ready"]
content_typestring必填- 枚举
["video/mp4","audio/wav","audio/mpeg","application/pdf"]
size_bytesinteger必填- 最小值
1- 最大值
536870912
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选填