> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tryvinci.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image to Video

> Animate a static image into a short video using motion described by a prompt.

Transform static images into dynamic videos with motion and effects.

```http title="Endpoint" theme={"system"}
POST /api/v1/generate/image-to-video
```

```http title="Authentication" theme={"system"}
Authorization: Bearer sk-your-api-key-here
```

## Request (multipart/form-data)

| Parameter         | Type | Description                      | Default  |
| ----------------- | ---- | -------------------------------- | -------- |
| image             | file | Input image (JPEG/PNG)           | Required |
| prompt            | text | Motion or behavioral description | Required |
| duration\_seconds | text | Length in seconds (1–10)         | 5        |

```json title="200 OK" theme={"system"}
{
  "request_id": "req_abc123...",
  "status": "pending",
  "estimated_cost_usd": 0.25,
  "estimated_duration_seconds": 5
}
```

## Code examples

<CodeGroup>
  ```curl cURL theme={"system"}
  curl -X POST "https://tryvinci.com/api/v1/generate/image-to-video" \
    -H "Authorization: Bearer sk-your-api-key-here" \
    -F "image=@portrait.jpg" \
    -F "prompt=The person starts smiling and waves at the camera" \
    -F "duration_seconds=6"
  ```

  ```python image_to_video.py theme={"system"}
  import requests

  url = "https://tryvinci.com/api/v1/generate/image-to-video"
  headers = {"Authorization": "Bearer sk-your-api-key-here"}
  files = {"image": open("portrait.jpg", "rb")}
  data = {
    "prompt": "The person starts smiling and waves at the camera",
    "duration_seconds": "6"
  }

  r = requests.post(url, headers=headers, files=files, data=data)
  r.raise_for_status()
  result = r.json()
  print(f"Request ID: {result['request_id']}")
  print(f"Estimated: ${result['estimated_cost_usd']}")
  ```

  ```javascript image_to_video.js theme={"system"}
  const input = document.getElementById("imageInput");
  const file = input.files?.[0];
  if (!file) throw new Error("Choose an image file first");

  const form = new FormData();
  form.append("image", file);
  form.append("prompt", "The person starts smiling and waves at the camera");
  form.append("duration_seconds", "6");

  const r = await fetch("https://tryvinci.com/api/v1/generate/image-to-video", {
    method: "POST",
    headers: { "Authorization": "Bearer sk-your-api-key-here" },
    body: form,
  });
  if (!r.ok) throw new Error(`HTTP ${r.status}`);
  const result = await r.json();
  console.log(`Request ID: ${result.request_id}`);
  console.log(`Estimated: $${result.estimated_cost_usd}`);
  ```
</CodeGroup>

## Next

After submitting the job, use [Status Checking](/docs/api-reference/status-checking) to poll progress and retrieve the final video.
