Skip to content

Vidu Q4 Image To Video ​

This page is generated from the upstream official OpenAPI documentation. Endpoints, parameters and examples match the official docs; brand and API domain are replaced with ModelFold.

Endpoint ​

POST /jobs/createTask

Full URL: https://ai.modelfold.online/v1/jobs/createTask

Authentication: every request must include the Authorization: Bearer <API_KEY> header.

Query Task Status ​

After submitting the task, you can check the progress of the task and obtain the generated results through the unified query endpoint:

  • Get Task Details — Learn how to check the task status and obtain the generated results

TIP

In the production environment, it is recommended to use the "callBackUrl" parameter to receive the automatic notification upon completion of the generation, rather than polling the status endpoint.

Related resources

Request Parameters ​

Body (application/json) ​

ParameterTypeRequiredDescription
modelstringYesThe model name used for generation. This endpoint must use vidu-q4/image-to-video. Default:"vidu-q4/image-to-video"。 Allowed values:vidu-q4/image-to-video。 示例:vidu-q4/image-to-video。
callBackUrlstringNoThe URL to receive generation task completion updates. Optional but recommended for production use. The system POSTs the task status and results to this URL when generation completes. 示例:https://your-domain.com/api/callback。
inputobjectYesInput parameters for the generation task.
  input.promptstringNoText description of the motion and scene. Optional. Up to 20,000 characters.
  input.durationintegerNoVideo length in seconds. Integer from 3 to 16. Default:5。 示例:5。
  input.resolutionstringNoOutput resolution. Default:"720p"。 Allowed values:540p / 720p / 1080p / 2k / 4k。 示例:720p。
  input.audiobooleanNoGenerate synchronized audio (dialogue and sound effects). Set false for a silent video. Default:true。 示例:true。
  input.image_urlstringYesFirst-frame image URL (http/https). JPG, JPEG, PNG or WEBP, up to 50 MB. The video inherits this image's aspect ratio.

Request Example ​

bash
curl -X POST "https://ai.modelfold.online/v1/jobs/createTask" \
  -H "Authorization: Bearer $MODELFOLD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "vidu-q4/image-to-video",
  "callBackUrl": "https://your-domain.com/api/callback",
  "input": {
    "image_url": "https://static.aiquickdraw.com/tools/example/vidu-q4-i2v.png",
    "prompt": "The astronaut waves and the camera slowly moves up.",
    "duration": 5,
    "resolution": "720p",
    "audio": true
  }
}'
json
{
  "model": "vidu-q4/image-to-video",
  "callBackUrl": "https://your-domain.com/api/callback",
  "input": {
    "image_url": "https://static.aiquickdraw.com/tools/example/vidu-q4-i2v.png",
    "prompt": "The astronaut waves and the camera slowly moves up.",
    "duration": 5,
    "resolution": "720p",
    "audio": true
  }
}

Response ​

200 — Request successful ​

参数类型必填说明
codeinteger否Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying). 可选值:200 / 400 / 401 / 402 / 404 / 422 / 429 / 455 / 500 / 501 / 505。 示例:200。
msgstring否Error message when code != 200 示例:success。
dataobject否—
  data.taskIdstring否Task ID, can be used with Get Task Details endpoint to query task status 示例:task_abcdef123456。
json
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "task_abcdef123456"
  }
}

500 — Server error. ​

参数类型必填说明
codeinteger是Response status code
- 200: Success - Request has been processed successfully
- 401: Unauthorized - Authentication credentials are missing or invalid
- 402: Insufficient Credits - Account does not have enough credits to perform the operation
- 404: Not Found - The requested resource or endpoint does not exist
- 408: Timeout - No result has been returned for over 10 minutes.
- 422: Validation Error - The request parameters failed validation checks
- 429: Rate Limited - Request limit has been exceeded for this resource
- 455: Service Unavailable - System is currently undergoing maintenance
- 500: Server Error - An unexpected error occurred while processing the request
- 501: Generation Failed - Content generation task failed
- 505: Feature Disabled - The requested feature is currently disabled
msgstring是Response message, error description when failed
dataobject是—
json
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}

Callback ​

videoTaskCompleted ​

Callback URL: {$request.body#/callBackUrl} (the callBackUrl in the request body).

The system sends this callback when the vidu-q4/image-to-video task succeeds or fails.

Callback body parameters

参数类型必填说明
codeinteger是Unified callback code: 200 for success, 501 for failure. Allowed values:200 / 501。 示例:200。
msgstring是Unified callback message.
dataobject是—
  data.taskIdstring是The unique task identifier.
  data.modelstring是The model used for the task. Allowed values:vidu-q4/image-to-video。 示例:vidu-q4/image-to-video。
  data.statestring是Terminal task state. Allowed values:success / fail。 示例:success。
  data.paramstring是JSON string containing the submitted task parameters.
  data.resultJsonstring,null否JSON string containing resultUrls when successful. Present only when state is success.
  data.failCodestring,null否Failure code. Present only when state is fail.
  data.failMsgstring,null否Failure reason. Present only when state is fail.
  data.costTimeinteger否Processing time in seconds.
  data.completeTimeinteger否Task completion timestamp.
  data.createTimeinteger否Task creation timestamp.
json
{
  "code": 200,
  "msg": "",
  "data": {
    "taskId": "",
    "model": "vidu-q4/image-to-video",
    "state": "success",
    "param": "",
    "costTime": 0,
    "completeTime": 0,
    "createTime": 0
  }
}

ModelFold — one API for all the best AI models.