---
title: Vidu Image-to-Video | RunAPI
description: Animate a first-frame image with Vidu Q4 at 540p to 4K, with optional
  generated audio.
url: https://runapi.ai/docs/api/vidu/image-to-video.md
canonical: https://runapi.ai/docs/api/vidu/image-to-video
locale: en
---

> HTML version: https://runapi.ai/docs/api/vidu/image-to-video
> Site index for agents: https://runapi.ai/llms.txt

# Vidu Image-to-Video

## Overview

Use the image to video endpoint with a supported model. Use the returned Task ID to retrieve its state, or provide callback_url for the deliveries documented below.

### Quick start

1. Create an API key and set it as RUNAPI_API_KEY.
2. Choose a supported model and send a POST request whose body matches that model's schema.
3. Store the returned task ID, then poll until a terminal state or handle the callbacks documented below.

## Endpoint

POST /api/v1/vidu/image_to_video

Base URL: https://runapi.ai

API version: v1

Authentication: Authorization: Bearer YOUR_API_TOKEN

## Supported models

Open a model page for current pricing, rate limits, and commercial-usage details.

- [vidu-q4-image-to-video](https://runapi.ai/models/vidu/q4-image-to-video)

## Request schema

Fields and allowed values depend on the selected model. When supplied, callback_url receives the Task deliveries documented below.

### vidu-q4-image-to-video

```json
{
  "audio": {
    "default": true,
    "description": "Generate synchronized audio. False produces a silent video.",
    "type": "boolean"
  },
  "callback_url": {
    "description": "RunAPI customer callback URL for the terminal task result.",
    "type": "string"
  },
  "duration_seconds": {
    "default": 5,
    "description": "Video duration in seconds.",
    "max": 16,
    "min": 3,
    "type": "integer"
  },
  "first_frame_image_url": {
    "description": "HTTP(S) URL of a JPG, JPEG, PNG or WEBP first frame, up to 50 MB. The provider validates the remote file.",
    "required": true,
    "type": "string"
  },
  "model": {
    "description": "Vidu Q4 image-to-video model.",
    "required": true,
    "type": "string"
  },
  "output_resolution": {
    "default": "720p",
    "description": "Output video resolution.",
    "enum": [
      "540p",
      "720p",
      "1080p",
      "2k",
      "4k"
    ],
    "type": "string"
  },
  "prompt": {
    "description": "Optional video description, up to 20,000 characters.",
    "length": true,
    "max": 20000,
    "type": "string"
  }
}
```

## Create acceptance

HTTP 202 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    },
    "task_replayed": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Polling processing

HTTP 200 - GET /api/v1/vidu/image_to_video/:id

### Response schema

```json
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "processing"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "id": "tsk_reference_demo",
  "status": "processing"
}
```

## Polling completed

HTTP 200 - GET /api/v1/vidu/image_to_video/:id

### Response schema

```json
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "usage": {
      "properties": {
        "cost": {
          "type": "number"
        }
      },
      "required": [
        "cost"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "videos": {
      "items": {
        "properties": {
          "url": {
            "type": "string",
            "x-runapi-generated-media": true
          }
        },
        "required": [
          "url"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "status",
    "videos",
    "usage"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "id": "tsk_reference_demo",
  "status": "completed",
  "usage": {
    "cost": 0.05
  },
  "videos": [
    {
      "url": "https://file.runapi.ai/reference-video.mp4"
    }
  ]
}
```

## Polling failed

HTTP 200 - GET /api/v1/vidu/image_to_video/:id

### Response schema

```json
{
  "properties": {
    "error": {
      "type": "string"
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "Task processing failed.",
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Customer callback: completed

HTTP 200 - POST callback_url

### Response schema

```json
{
  "properties": {
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "completed"
      ],
      "type": "string"
    },
    "usage": {
      "properties": {
        "cost": {
          "type": "number"
        }
      },
      "required": [
        "cost"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    "videos": {
      "items": {
        "properties": {
          "url": {
            "type": "string",
            "x-runapi-generated-media": true
          }
        },
        "required": [
          "url"
        ],
        "type": "object",
        "unevaluatedProperties": false
      },
      "type": "array"
    }
  },
  "required": [
    "id",
    "status",
    "videos",
    "usage"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "id": "tsk_reference_demo",
  "status": "completed",
  "usage": {
    "cost": 0.05
  },
  "videos": [
    {
      "url": "https://file.runapi.ai/reference-video.mp4"
    }
  ]
}
```

## Customer callback: failed

HTTP 200 - POST callback_url

### Response schema

```json
{
  "properties": {
    "error": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "properties": {
            "code": {
              "type": "string"
            },
            "limit_cents": {
              "type": "integer"
            },
            "message": {
              "type": "string"
            },
            "reset_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "used_cents": {
              "type": "integer"
            },
            "window": {
              "enum": [
                "1h",
                "1d",
                "7d",
                "daily",
                "weekly",
                "monthly",
                "lifetime"
              ],
              "type": "string"
            }
          },
          "required": [
            "code",
            "message"
          ],
          "type": "object",
          "unevaluatedProperties": false
        }
      ]
    },
    "id": {
      "type": "string"
    },
    "status": {
      "enum": [
        "failed"
      ],
      "type": "string"
    }
  },
  "required": [
    "id",
    "status",
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": {
    "code": "generation_failed",
    "message": "Task processing failed."
  },
  "id": "tsk_reference_demo",
  "status": "failed"
}
```

## Errors

HTTP 401 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "Authentication required"
}
```

## Errors

HTTP 401 - GET /api/v1/vidu/image_to_video/:id

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "Authentication required"
}
```

## Errors

HTTP 400 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "oneOf": [
    {
      "properties": {
        "error": {
          "description": "Human-readable error message.",
          "type": "string"
        }
      },
      "required": [
        "error"
      ],
      "type": "object",
      "unevaluatedProperties": false
    },
    {
      "properties": {
        "error": {
          "description": "Human-readable validation summary.",
          "type": "string"
        },
        "errors": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "description": "Validation messages keyed by public request field, with an array of human-readable strings for each field.",
          "type": "object"
        }
      },
      "required": [
        "error",
        "errors"
      ],
      "type": "object",
      "unevaluatedProperties": false
    }
  ]
}
```

### Response example

```json
{
  "error": "model must be one of: vidu-q4-image-to-video"
}
```

## Errors

HTTP 402 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "Insufficient balance"
}
```

## Errors

HTTP 429 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "API key credit limit exceeded"
}
```

## Errors

HTTP 409 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "The request uses features that are not supported for the selected model"
}
```

## Errors

HTTP 429 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "Rate limit reached. Please retry later."
}
```

## Errors

HTTP 503 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "Service under maintenance, please try again later"
}
```

## Errors

HTTP 504 - POST /api/v1/vidu/image_to_video

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "The request timed out"
}
```

## Errors

HTTP 404 - GET /api/v1/vidu/image_to_video/:id

### Response schema

```json
{
  "properties": {
    "error": {
      "description": "Human-readable error message.",
      "type": "string"
    }
  },
  "required": [
    "error"
  ],
  "type": "object",
  "unevaluatedProperties": false
}
```

### Response example

```json
{
  "error": "Task with id 'tsk_reference_demo' not found"
}
```

## Generated Code Samples

Use cURL directly, or install an SDK for your language. Each sample submits the validated request shown in this reference.

### curl

```curl
curl -X POST https://runapi.ai/api/v1/vidu/image_to_video \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"model":"vidu-q4-image-to-video","first_frame_image_url":"https://file.runapi.ai/first-frame.png","prompt":"The camera slowly moves forward.","audio":false,"duration_seconds":5,"output_resolution":"720p"}'
```

### javascript

#### Install

```bash
npm install @runapi.ai/vidu
```

```javascript
import { ViduClient } from "@runapi.ai/vidu";

const client = new ViduClient({ apiKey: process.env.RUNAPI_API_KEY });
const task = await client.imageToVideo.create({
  "model": "vidu-q4-image-to-video",
  "first_frame_image_url": "https://file.runapi.ai/first-frame.png",
  "prompt": "The camera slowly moves forward.",
  "audio": false,
  "duration_seconds": 5,
  "output_resolution": "720p"
});
```

### python

#### Install

```bash
pip install runapi-vidu
```

```python
import os
from runapi.vidu import ViduClient

client = ViduClient(api_key=os.environ["RUNAPI_API_KEY"])
task = client.image_to_video.create(
  model="vidu-q4-image-to-video",
  first_frame_image_url="https://file.runapi.ai/first-frame.png",
  prompt="The camera slowly moves forward.",
  audio=False,
  duration_seconds=5,
  output_resolution="720p"
)
```

### go

#### Install

```bash
go get github.com/runapi-ai/vidu-sdk/go@latest
```

```go
package main

import (
  "context"
  "log"
  "os"

  "github.com/runapi-ai/core-sdk/go/option"
  vidu "github.com/runapi-ai/vidu-sdk/go/vidu"
)

func main() {
  client, err := vidu.NewClient(option.WithAPIKey(os.Getenv("RUNAPI_API_KEY")))
  if err != nil {
    log.Fatal(err)
  }

  task, err := client.ImageToVideo.Create(context.Background(), vidu.ImageToVideoParams{
    Model: vidu.ImageToVideoModel("vidu-q4-image-to-video"),
    FirstFrameImageURL: "https://file.runapi.ai/first-frame.png",
    Prompt: "The camera slowly moves forward.",
    Audio: func(value bool) *bool { return &value }(false),
    DurationSeconds: func(value int) *int { return &value }(5),
    OutputResolution: vidu.OutputResolution("720p"),
  })
  if err != nil {
    log.Fatal(err)
  }
  _ = task
}
```

### ruby

#### Install

```bash
gem install runapi-vidu
```

```ruby
require "runapi/vidu"

client = RunApi::Vidu::Client.new(api_key: ENV.fetch("RUNAPI_API_KEY"))
task = client.image_to_video.create(
  model: "vidu-q4-image-to-video",
  first_frame_image_url: "https://file.runapi.ai/first-frame.png",
  prompt: "The camera slowly moves forward.",
  audio: false,
  duration_seconds: 5,
  output_resolution: "720p"
)
```

### java

#### Install

```kotlin
implementation("ai.runapi:runapi-vidu")
```

```java
import ai.runapi.vidu.ViduClient;
import ai.runapi.vidu.types.ImageToVideoParams;
import ai.runapi.core.polling.TaskCreateResponse;

public final class Example {
  public static void main(String[] args) {
    ViduClient client = ViduClient.builder()
        .apiKey(System.getenv("RUNAPI_API_KEY"))
        .build();
    TaskCreateResponse task = client.imageToVideo().create(
        ImageToVideoParams.builder()
        .model("vidu-q4-image-to-video")
        .firstFrameImageUrl("https://file.runapi.ai/first-frame.png")
        .prompt("The camera slowly moves forward.")
        .audio(false)
        .durationSeconds(5)
        .outputResolution("720p")
            .build()
    );
  }
}
```

### php

#### Install

```bash
composer require runapi-ai/vidu
```

```php
<?php

require __DIR__ . '/vendor/autoload.php';

use RunApi\Core\ClientOptions;
use RunApi\Vidu\ViduClient;

$client = new ViduClient(new ClientOptions(apiKey: getenv('RUNAPI_API_KEY')));
$task = $client->imageToVideo->create([
  "model" => "vidu-q4-image-to-video",
  "first_frame_image_url" => "https://file.runapi.ai/first-frame.png",
  "prompt" => "The camera slowly moves forward.",
  "audio" => false,
  "duration_seconds" => 5,
  "output_resolution" => "720p"
]);
```

## Related Guides

- [Authentication](https://runapi.ai/docs/guides/authentication.md)
- [Quickstart](https://runapi.ai/docs/guides/task-api/quickstart.md)

---

## More from RunAPI

- [Home](https://runapi.ai/.md)
- [Model Catalog](https://runapi.ai/models.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Providers](https://runapi.ai/models)
- [Documentation](https://runapi.ai/docs/guides)
- [SDKs](https://runapi.ai/sdk.md)
- [CLI](https://runapi.ai/cli.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [x402](https://runapi.ai/x402.md)
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Cursor API Setup](https://runapi.ai/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/contact.md)
- [Contact](https://runapi.ai/contact.md)
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "TechArticle",
    "headline": "Vidu Image-to-Video",
    "description": "Animate a first-frame image with Vidu Q4 at 540p to 4K, with optional generated audio.",
    "url": "https://runapi.ai/docs/api/vidu/image-to-video",
    "mainEntityOfPage": "https://runapi.ai/docs/api/vidu/image-to-video"
  }
]
```
