API 參考
取得持久影片報價
/v1/video-quotesretention=persistent,按目錄支援模式與託管幀報價;開關關閉路由直接 404。報價到期或價格變化須重新確認。
鑑權與許可權
使用當前 GloopAPI Key。模型、功能與許可權以當前 Key 的目錄及介面說明為準。
Authorization: Bearer $GLOOP_API_KEY鑑權方案: BearerAuth
請求
請求體 · application/json
- 型別
- object
- 必填欄位
modelprompt- 額外屬性
- false
請求體必填
modestring選填persistent 必填。
- 列舉
["text_to_video","image_to_video"]
retentionstring選填persistent 使用持久工作區;省略為普通任務。
quote_idstring選填persistent 新請求須先確認 video-quotes 返回的有效報價。
start_frameobject選填persistent 圖生影片必填,同 Key 的託管檔案;文生影片禁止。
start_frame 子欄位(1)
file_idstring必填同賬戶同 Key 的託管檔案公開 ID。
end_frameobject選填persistent 可選尾幀,能力必須支援。
end_frame 子欄位(1)
file_idstring必填同賬戶同 Key 的託管檔案公開 ID。
webhook_endpoint_idstring選填普通任務可引用控制檯已配置的接收端;persistent 禁止。
modelstring必填來自當前 Key 目錄的公開模型 ID,歷史模型是否可用以當前目錄為準。
promptstring必填生成提示詞。
- 最短長度
1- 最長長度
2500
durationinteger選填模型相關秒數,使用 video-models mode.presets 的完整組合,不能作笛卡爾積。Wan Turbo 不支援此欄位;無統一預設。
image_urlstring選填HTTPS首幀或PNG/JPEG Data URL;與input_reference互斥。
end_image_urlstring選填僅普通任務模型相關 HTTPS 尾幀;persistent 禁止。
resolutionstring選填模型 preset 中的解析度值。
aspect_ratiostring選填模型 preset 中的寬高比值。
generate_audioboolean選填模型相關,使用模式的音訊策略和 presets;禁止假定所有模型生成音訊。
secondsunion選填正整數秒數,與duration須一致,並符合模型預設組合。
oneOf 分支 1
型別: string
匹配規則:
"^[1-9][0-9]*$"oneOf 分支 2
型別: integer
最小值:
1sizestring選填精確尺寸須符合模型預設組合;與 resolution/aspect_ratio 衝突則拒絕。
- 列舉
["1280x720","720x1280","720x720","1920x1080","1080x1920","1080x1080"]
input_referenceobject選填file_id與image_url只選一個;內部報價,不可混傳其他首幀、retention或quote_id。
- 額外屬性
false
fpsinteger選填可選精確影格率限制;僅解析到 Seedance 2.0 text-to-video/image-to-video 執行路由時支援 24,其他模型拒絕,不會靜默忽略。
- 列舉
[24]
響應與錯誤
HTTP 200
取得持久影片報價成功
application/json
- 型別
- object
- 必填欄位
idexpires_atrequest_hashpricing_kindcurrencyreserved_quotareserved_amountestimated_final_amountsettlement_note
idstring必填該物件的公開識別符號;用於對應詳情路徑。
expires_atinteger必填Unix 秒有效期,0 表示不按固定時間到期。
request_hashstring必填規範化請求摘要,報價與建立繫結,不是冪等請求鍵。
pricing_kindstring必填該報價實際使用的計價方式。
currencystring必填報價/賬務幣種。
reserved_quotainteger必填以平臺 quota 單位表示的預留額度,不是美元數。
reserved_amountstring必填報價幣種中的最大預留金額字串。
預估最終金額字串;null 表示生成前無法確定。
settlement_notestring必填實際計量與結算說明。
以 maximum_currency 表示的真实最高钱包费用;仅可证明上限的冻结价格提供,使用量估算省略。
maximum_currencystring選填已认证 maximum_amount 的币种,与 reserved_amount 的参考币种分开。
- 列舉
["USD"]
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選填
介面說明
這些引數僅為完整預設的說明值。請從當前 Key 的 video-models 目錄為所選 model/mode 複製整個 preset(duration、resolution、aspect_ratio、generate_audio),不要僅替換模型或拼接預設。