Skip to content

PixVerse V6 视频扩展 ​

本页由 ModelFold 文档站根据上游官方 OpenAPI 文档同步生成。接口路径、参数、示例与官方保持一致;品牌与 API 域名已替换为 ModelFold。

接口 ​

POST /jobs/createTask

完整 URL: https://ai.modelfold.online/v1/jobs/createTask

鉴权:所有请求都需要 Authorization: Bearer <API_KEY> 请求头。

查询任务状态 ​

    提交任务后,可通过统一的查询接口查看任务进度并获取结果:

    - [Get Task Details](/market/common/get-task-detail) — 了解如何查询任务状态并获取生成结果

TIP

生产环境中,建议使用 callBackUrl 参数接收生成完成的自动通知,而非轮询状态接口。

TIP

只按新增秒数计费。当前价格见 ai.modelfold.online/pricing。

    ## 相关资源

    
      - [Market Overview](/market/quickstart) — 浏览所有可用模型
      - [Common API](/common-api/get-account-credits) — 查看账户积分与使用情况

请求参数 ​

请求体 (application/json) ​

参数类型必填说明
modelstring是生成任务的模型名称。必填字段。 默认值:"pixverse-v6/extend"。 可选值:pixverse-v6/extend。 示例:pixverse-v6/extend。
callBackUrlstring否用于在生成任务完成时接收通知的回调 URL。选填,但建议在生产环境中使用。
- 任务生成后,系统将通过 POST 请求将任务状态和结果推送到此 URL
- 回调内容包括生成内容的 URL 和任务相关信息
- 您的回调 API 必须支持 POST 请求和 JSON 格式的请求体
- 或者,您可以通过调用任务详情 API 主动轮询任务状态 示例:https://example.com/callback。
input`objectobject`是

请求示例 ​

bash
curl -X POST "https://ai.modelfold.online/v1/jobs/createTask" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "pixverse-v6/extend",
  "input": {
    "prompt": "Continue the same camera motion and extend the scene naturally",
    "taskId": "parent_task_id_from_previous_success_video",
    "duration": 5,
    "quality": "720p",
    "generate_audio_switch": false,
    "seed": 123456
  },
  "callBackUrl": "https://example.com/ModelFold/callback"
}'
json
{
  "model": "pixverse-v6/extend",
  "input": {
    "prompt": "Continue the same camera motion and extend the scene naturally",
    "taskId": "parent_task_id_from_previous_success_video",
    "duration": 5,
    "quality": "720p",
    "generate_audio_switch": false,
    "seed": 123456
  },
  "callBackUrl": "https://example.com/ModelFold/callback"
}

响应 ​

200 — 请求成功 ​

参数类型必填说明
codeinteger是请求状态码。请求失败时 HTTP 状态仍为 200,请始终以本字段判断:200 表示成功,其他值均表示失败,原因见 msg。常见值:401 API key 无效或缺失;402 积分不足;429 超出频率限制;422 或 500 请求未能处理(请先查看 msg、检查参数,再决定是否重试)。 可选值:200 / 401 / 402 / 404 / 422 / 429 / 433 / 455 / 500 / 501 / 505。 示例:200。
msgstring是响应消息,失败时的错误描述
dataobject是—
  data.taskIdstring是可以使用任务 ID 与“获取任务详细信息”端点一起查询任务状态。
json
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_bytedance_1765186743319"
  }
}

回调 ​

videoTaskCompleted ​

回调地址:{request.body#/callBackUrl}(即请求体里的 callBackUrl)。

当 pixverse-v6/extend 任务成功或失败时,系统会发送此回调。

回调体参数

参数类型必填说明
codeinteger是统一回调状态码:成功为 200,失败为 501。 可选值:200 / 501。 示例:200。
msgstring是统一回调消息。 可选值:Playground task completed successfully. / Playground task failed.。 示例:Playground task completed successfully.。
dataobject是—
  data.taskIdstring是任务唯一标识符。
  data.modelstring是任务使用的模型。 可选值:pixverse-v6/extend。 示例:pixverse-v6/extend。
  data.statestring是任务最终状态。 可选值:success / fail。 示例:success。
  data.paramstring是包含已提交任务参数的 JSON 字符串。
  data.resultJsonstring否任务成功时,包含 resultUrls、firstFrameUrl、lastFrameUrl 或 resultObject 的 JSON 字符串。仅在 state 为 success 时出现。
  data.failCodestring否失败码,数字字符串,如 "400"、"500"。仅在 state 为 fail 时出现。
  data.failMsgstring否失败原因,仅在 state 为 fail 时出现。
  data.costTimeinteger否处理耗时(秒),成功和失败回调都会返回。
  data.completeTimeinteger否任务完成时间戳。
  data.createTimeinteger否任务创建时间戳。
  data.updateTimeinteger否完成时间请以 completeTime 为准;updateTime 可能与 createTime 相同。
  data.creditsConsumednumber否本任务消耗的积分;失败任务为 0。

任务成功完成

json
{
  "code": 200,
  "msg": "Playground task completed successfully.",
  "data": {
    "taskId": "task_example_video_webhook_001",
    "model": "pixverse-v6/extend",
    "state": "success",
    "param": "{\"input\":\"{\\\"prompt\\\":\\\"Continue the same camera motion and extend the scene naturally\\\",\\\"taskId\\\":\\\"parent_task_id_from_previous_success_video\\\",\\\"duration\\\":5,\\\"quality\\\":\\\"720p\\\",\\\"generate_audio_switch\\\":false,\\\"seed\\\":123456}\",\"callBackUrl\":\"https://example.com/callback\",\"model\":\"pixverse-v6/extend\"}",
    "resultJson": "{\"resultUrls\":[\"https://example.com/generated-video.mp4\"]}",
    "costTime": 12,
    "completeTime": 1234567890,
    "createTime": 1234560000,
    "updateTime": 1234567890,
    "creditsConsumed": 1.23
  }
}

任务失败

json
{
  "code": 501,
  "msg": "Playground task failed.",
  "data": {
    "taskId": "task_example_video_webhook_001",
    "model": "pixverse-v6/extend",
    "state": "fail",
    "param": "{\"input\":\"{\\\"prompt\\\":\\\"Continue the same camera motion and extend the scene naturally\\\",\\\"taskId\\\":\\\"parent_task_id_from_previous_success_video\\\",\\\"duration\\\":5,\\\"quality\\\":\\\"720p\\\",\\\"generate_audio_switch\\\":false,\\\"seed\\\":123456}\",\"callBackUrl\":\"https://example.com/callback\",\"model\":\"pixverse-v6/extend\"}",
    "failCode": "400",
    "failMsg": "<error detail>",
    "costTime": 12,
    "creditsConsumed": 0
  }
}

ModelFold — 一个 API,接入所有主流 AI 模型。