---
title: "Submit an image-to-video generation job"
method: POST
path: "/api/image-to-video"
tags: ["Image to Video"]
---

# Submit an image-to-video generation job

`POST /api/image-to-video`

## Request

- Base URL: `https://open.eternalai.org`
- URL: `https://open.eternalai.org/api/image-to-video`
- Auth: one of:
  - HTTP bearer
  - API key in header `api-key`

Submit a generation job. Returns a `request_id` which you poll with `GET /api/image-to-video/{request_id}/status` until the job is `completed` or `failed`.

## Request body

- SubmitRequest
  - `prompt` string, required: Text description of the desired video. Keep concise for best results.
  - `image_url` string, required: Starting still (jpg/png/webp). Accepts a publicly reachable URL or a base64-encoded data URI (e.g. `data:image/jpeg;base64,...`). Maximum image file size is 15 MB.
  - `model_id` 'wan-ai/wan2.2-i2v-a14b-lightning', required: Generation model. **Use the literal string `wan-ai/wan2.2-i2v-a14b-lightning`** — this is currently the only supported model. Any other value returns 400.
  - `end_image_url` string, nullable: Optional end frame for two-image conditioning. URL or base64 data URI.
  - `duration` '1' | '2' | '3' | '4' | '5': Output length in seconds. **Send as a string, not a number.** `"3"` works; `3` returns `{"error": "invalid JSON body"}` even though the JSON parses fine — the failure is schema-type validation. UIs that bind to `<input type="number">` must `String(value)` before sending.
  - `aspect_ratio` 'auto' | '16:9' | '9:16' | '1:1' | '4:3' | '3:4': Output aspect ratio.
  - `resolution` '480p' | '580p' | '720p': Output resolution.
  - `negative_prompt` string: Things to avoid.
  - `cfg_scale` number: CFG scale. Higher values follow the prompt more strictly.
  - `seed` integer: Deterministic seed. Omit for a random seed each call.

## Response `200`

Job accepted.

- SubmitResponse
  - `status` boolean
  - `error` string, nullable
  - `result` object
    - `request_id` string, uuid

## Other responses

- `400`: Invalid request body, unsupported model_id, or bad parameters.
- `401`: Missing, invalid, or inactive API key.
- `402`: Insufficient credit balance.
- `500`: Failed to persist the request.
- `502`: Generation backend rejected the submission. Credit is refunded automatically.

---

[API](https://skmtc.dev/eternalai/apis/eternal-ai-image-to-video-api.md) - [All operations](https://skmtc.dev/eternalai/apis/eternal-ai-image-to-video-api/llms.txt) - [OpenAPI document](https://skmtc.dev/eternalai/apis/eternal-ai-image-to-video-api/revisions/a47c64304004?raw)
