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
- Market Overview — View all available models
- General API — View account credits and usage
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The 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。 |
callBackUrl | string | No | The 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。 |
input | object | Yes | Input parameters for the generation task. |
input.prompt | string | No | Text description of the motion and scene. Optional. Up to 20,000 characters. |
input.duration | integer | No | Video length in seconds. Integer from 3 to 16. Default:5。 示例:5。 |
input.resolution | string | No | Output resolution. Default:"720p"。 Allowed values:540p / 720p / 1080p / 2k / 4k。 示例:720p。 |
input.audio | boolean | No | Generate synchronized audio (dialogue and sound effects). Set false for a silent video. Default:true。 示例:true。 |
input.image_url | string | Yes | First-frame image URL (http/https). JPG, JPEG, PNG or WEBP, up to 50 MB. The video inherits this image's aspect ratio. |
Request Example
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
}
}'{
"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
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 否 | 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。 |
msg | string | 否 | Error message when code != 200 示例:success。 |
data | object | 否 | — |
data.taskId | string | 否 | Task ID, can be used with Get Task Details endpoint to query task status 示例:task_abcdef123456。 |
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_abcdef123456"
}
}500 — Server error.
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | 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 |
msg | string | 是 | Response message, error description when failed |
data | object | 是 | — |
{
"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
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | Unified callback code: 200 for success, 501 for failure. Allowed values:200 / 501。 示例:200。 |
msg | string | 是 | Unified callback message. |
data | object | 是 | — |
data.taskId | string | 是 | The unique task identifier. |
data.model | string | 是 | The model used for the task. Allowed values:vidu-q4/image-to-video。 示例:vidu-q4/image-to-video。 |
data.state | string | 是 | Terminal task state. Allowed values:success / fail。 示例:success。 |
data.param | string | 是 | JSON string containing the submitted task parameters. |
data.resultJson | string,null | 否 | JSON string containing resultUrls when successful. Present only when state is success. |
data.failCode | string,null | 否 | Failure code. Present only when state is fail. |
data.failMsg | string,null | 否 | Failure reason. Present only when state is fail. |
data.costTime | integer | 否 | Processing time in seconds. |
data.completeTime | integer | 否 | Task completion timestamp. |
data.createTime | integer | 否 | Task creation timestamp. |
{
"code": 200,
"msg": "",
"data": {
"taskId": "",
"model": "vidu-q4/image-to-video",
"state": "success",
"param": "",
"costTime": 0,
"completeTime": 0,
"createTime": 0
}
}