提交视频生成任务
POST/runwayml/v1/image_to_video 提交视频生成任务
通过 Vortap 提交 RunwayML 图生视频生成任务。该接口会创建一个异步视频生成任务,并返回任务 ID 与当前排队/生成状态。
接口地址
POST https://www.vortapapi.com/v1/runwayml/v1/image_to_video
认证方式
请在请求头中携带 Vortap API Key:
Authorization: Bearer sk-***
请求头
| 名称 | 必填 | 说明 |
|---|---|---|
Content-Type | 是 | 请求体类型,通常为 application/json |
Accept | 是 | 响应类型,通常为 application/json |
Authorization | 是 | 使用 Bearer Token 进行鉴权,格式为 Bearer sk-*** |
请求示例
curl -X POST "https://www.vortapapi.com/v1/runwayml/v1/image_to_video" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer sk-***" \
-d '{
"prompt": "A cinematic shot of a futuristic city at sunset",
"image": "https://example.com/input-image.png"
}'
具体请求字段请以当前模型/能力支持的参数为准。提交成功后,接口会返回任务信息,视频结果通常需要通过任务查询接口异步获取。
响应示例
{
"id": "4665a07c-7641-4809-a133-10786201bb56",
"prompt": "",
"state": "pending",
"queue_state": null,
"created_at": "2024-12-22T13:38:40.139409Z",
"batch_id": "",
"video": null,
"video_raw": null,
"liked": null,
"estimate_wait_seconds": null,
"thumbnail": null,
"last_frame": null
}
响应字段说明
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 视频生成任务 ID,可用于后续查询任务状态或结果 |
prompt | string | 本次任务使用的提示词 |
state | string | 当前任务状态,例如 pending 表示任务已创建并等待处理 |
queue_state | object | null | 队列相关状态信息,未返回时为 null |
created_at | string | 任务创建时间,采用 ISO 8601 时间格式 |
batch_id | string | 批处理 ID;非批量任务可能为空字符串 |
video | string | null | 生成后的视频地址;任务未完成时通常为 null |
video_raw | string | null | 原始视频资源地址;任务未完成时通常为 null |
liked | boolean | null | 用户反馈状态,未设置时为 null |
estimate_wait_seconds | number | null | 预估等待时间,单位为秒;不可用时为 null |
thumbnail | string | null | 视频缩略图地址;任务未完成时通常为 null |
last_frame | string | null | 视频最后一帧图片地址;任务未完成时通常为 null |