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選填