Skip to main content
Video generation is an asynchronous workflow. You submit a job, poll until it completes, then download the result.
StepMethodEndpoint
Submit jobPOST/api/v1/generate
Poll statusGET/api/v1/generate/status
Download resultGET/api/v1/generate/result
Content-Type (submission): multipart/form-data
Parameter support can differ depending on the model used. Check the Model Library for model-specific compatibility. Open Model Library.

Authentication

Send your API key in the Authorization header as a Bearer token.
Authorization: Bearer YOUR_API_KEY

Step 1 — Submit job

POST /api/v1/generate

Parameters

NameTypeRequiredDescription
modelstringRequiredThe model ID (e.g. wan2p2-i2v-14b-turbo).
promptstringRequiredText describing the desired video motion and animation.
imagefileOne of requiredSource image to animate (multipart file upload).
image_urlstringOne of requiredURL of the source image to animate.
infer_stepsintegerOptionalNumber of inference steps (default 5, range 1–20).
seedintegerOptionalRandom seed for reproducible results.

Response

{
  "task_id": "XXXX-XXXX-XXXX-XXXX-XXXX",
  "task_status": "pending"
}

Step 2 — Poll status

GET /api/v1/generate/status?jobId={task_id}&model={model} Poll this endpoint until status is completed or failed.

Response

{
  "task_id": "XXXX-XXXX-XXXX-XXXX-XXXX",
  "status": "completed",
  "start_time": "2024-01-01T00:00:00.000Z",
  "end_time": "2024-01-01T00:01:00.000Z",
  "error": null
}
FieldDescription
statuspending, processing, completed, or failed
errorError message if status is failed, otherwise null

Step 3 — Download result

GET /api/v1/generate/result?jobId={task_id}&model={model} Returns the generated MP4 file as binary content.

Examples

Full workflow

# Step 1: Submit job
curl -X POST https://api-web.eigenai.com/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=wan2p2-i2v-14b-turbo" \
  -F "prompt=A person waving hello" \
  -F "image=@/path/to/image.jpg" \
  -F "infer_steps=5" \
  -F "seed=42"

# Step 2: Poll status (replace TASK_ID)
curl "https://api-web.eigenai.com/api/v1/generate/status?jobId=TASK_ID&model=wan2p2-i2v-14b-turbo" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Step 3: Download result
curl "https://api-web.eigenai.com/api/v1/generate/result?jobId=TASK_ID&model=wan2p2-i2v-14b-turbo" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -o output.mp4