查询视频报价
按模型、模式、参考素材、清晰度和时长查询所需积分及费率版本。报价不会创建任务或预扣积分。生成时将返回的 quote_id 和 rate_version 分别作为 quote_id 和 quote_version 传入;请求参数或参考素材变化后需重新报价。
认证
API Key:X-API-Key: <API Key> 或 Authorization: Bearer <API Key>。
示例中的凭证为占位值,请替换后在服务器端运行。
代码示例
curl -X POST 'https://shixux.com/api/v1/video/quote' \ -H 'X-API-Key: yb_xxx_yyy' \ -H 'Content-Type: application/json' \ -d '{"operation":"generate","request":{"model":"seedance-2.5-flash","mode":"t2va","prompt":"A lighthouse by the sea, a slow camera move.","duration":5,"ratio":"16:9","resolution":"720p","seed":42,"references":[]}}'{ "model": "example", "resolution": "example", "billable_seconds": 1, "credits_per_second": 1, "credits": 1, "rate_version": 1}application/json- body
estimated_reference_seconds?number可选,参考素材时长的预估值,用于提前估算费用。使用此字段的报价不返回 quote_id,不能用于提交生成。
范围
0 <= value <= 30operation*"generate"可选值
"generate"request*报价结果
application/json- response
estimated_tokens?integer按 Token 计费的模型预估的计费 Token 总数。
credits_per_million_tokens?number本次请求适用的 Token 单价(积分每百万 Token)。
model*string模型 ID。图片和视频模型的可用状态、清晰度和费率以对应配置接口的返回为准;语音合成和音频编排可选 indextts-2(默认)或 indextts-2.5。
resolution*string视频清晰度。minmax-h3-flash 和 minmax-h3-pro 支持 768p 和 2k(2k 输出会自动增强画质);其他模型的可用清晰度以 GET /v1/video/config 的返回为准。
billable_seconds*numbercredits_per_second*numbercredits*numberrate_version*integer费率版本。图片生成传入配置接口返回的 billing.version;费率变化后提交会被拒绝,需重新读取配置或报价。
quote_id?stringPOST /v1/video/quote 返回的报价 ID,绑定报价时的模型、素材、时长等请求参数。请求参数变化后须重新报价。
input_video_seconds?numberoutput_credits?numberinput_video_credits?number