视频 API
ModelPort API 文档
使用说明
提交视频任务,使用任务 ID 查询生成结果。
查询视频报价
curl "https://api.apimodel.store/v1/video/quotes" \
-H "Authorization: Bearer $MODELPORT_API_KEY" \
-H "Content-Type: application/json" \
--data '{"model":"seedance-2.0-fast","prompt":"A low camera moves slowly along a misty river.","duration":5,"resolution":"720p","aspect_ratio":"16:9"}'提交视频生成
curl "https://apimodel.store/v1/video/generations" \
-H "Authorization: Bearer $MODELPORT_API_KEY" \
-H "Idempotency-Key: video-example-01" \
-H "Content-Type: application/json" \
--data '{"model":"seedance-2.0-fast","prompt":"A low camera moves slowly along a misty river.","duration":5,"resolution":"720p","aspect_ratio":"16:9"}'报价与提交使用相同的模型参数和参考素材。报价不创建任务或冻结余额。
提交返回 data.taskId。用相同密钥访问 GET /v1/video/generations?task_id=...,完成后从 data.resultUrls 下载文件。
先通过 POST /v1/files 上传参考素材。用 first_frame_file_id、last_frame_file_id 或 reference_image_file_ids、reference_video_file_ids、reference_audio_file_ids 传入文件 ID,支持的角色以所选模型为准。
也可用本站返回的素材链接填写 images: ["素材链接"] 或 video_list: [{"url": "素材链接"}]。指定首帧时使用 first_frame_file_id。需要视频片段时,先裁剪,再上传。