AIAPIAIAPI API

Wan 2.2 I2V Spicy

Model ID alibaba/wan-2.2-i2v-spicy

Overview

Image-to-video generation from a required first-frame image, with optional last-frame interpolation.

Alibaba · image-to-video

Endpoint

POST /v1/video/generations

Authentication

Authorization: Bearer <AIAPIAIAPI_API_KEY>

Request Body

ParameterTypeRequiredNullableDefaultConstraintsDescription
modelstringYesNo-values: alibaba/wan-2.2-i2v-spicyModel ID used to route the request.
promptstringYesNo--Text prompt describing the desired output.
imagestringYesNo-accepts: HTTPS URL, Base64 data URL, Bare Base64Required first-frame image. Accepts an HTTP/HTTPS URL or Base64 image data.
end_imagestringNoNo-accepts: HTTPS URL, Base64 data URL, Bare Base64Optional last-frame image. When provided, the model interpolates from image to end_image.
durationintegerNoNo`5`values: 5, 8Video duration in seconds. Supported values are 5 and 8.
resolutionstringNoNo`480p`values: 480p, 720pOutput video resolution.
seedintegerNoNo-min: 0Random seed. Omit it or use 0 for random generation; use a positive integer for reproducible output.
prompt_extendbooleanNoNo`true`-Whether the upstream model should expand or enhance the prompt.

model

Type: string · Required: Yes · Nullable: No

Model ID used to route the request.

prompt

Type: string · Required: Yes · Nullable: No

Text prompt describing the desired output.

image

Type: string · Required: Yes · Nullable: No

Required first-frame image. Accepts an HTTP/HTTPS URL or Base64 image data.

end_image

Type: string · Required: No · Nullable: No

Optional last-frame image. When provided, the model interpolates from image to end_image.

duration

Type: integer · Required: No · Nullable: No

Video duration in seconds. Supported values are 5 and 8.

resolution

Type: string · Required: No · Nullable: No

Output video resolution.

seed

Type: integer · Required: No · Nullable: No

Random seed. Omit it or use 0 for random generation; use a positive integer for reproducible output.

prompt_extend

Type: boolean · Required: No · Nullable: No

Whether the upstream model should expand or enhance the prompt.

Request Example

curl --request POST \
  --url https://aiapiaiapi.com/v1/video/generations \
  --header 'Authorization: Bearer $AIAPIAIAPI_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
      "model": "alibaba/wan-2.2-i2v-spicy",
      "prompt": "A cinematic camera movement through a forest",
      "image": "https://example.com/reference.jpg",
      "duration": 5,
      "resolution": "480p"
    }'

JSON

{
  "model": "alibaba/wan-2.2-i2v-spicy",
  "prompt": "A cinematic camera movement through a forest",
  "image": "https://example.com/reference.jpg",
  "duration": 5,
  "resolution": "480p"
}

Response

{
  "id": "vid_01K2ABC123",
  "object": "video.generation",
  "model": "alibaba/wan-2.2-i2v-spicy",
  "status": "queued",
  "progress": null,
  "outputs": [],
  "created_at": 1786960800,
  "started_at": null,
  "completed_at": null,
  "error": null
}

Task Status

Use the id from the create response as task_id:

GET /v1/video/generations/{task_id}

{
  "id": "vid_01K2ABC123",
  "object": "video.generation",
  "model": "alibaba/wan-2.2-i2v-spicy",
  "status": "completed",
  "progress": 100,
  "outputs": [
    { "type": "video", "url": "https://cdn.example.com/videos/vid_01K2ABC123.mp4" }
  ],
  "created_at": 1786960800,
  "started_at": 1786960805,
  "completed_at": 1786960900,
  "error": null
}

Error Responses

Validation errors return HTTP 400 with a stable error code.

{
  "error": {
    "type": "invalid_request_error",
    "code": "unsupported_value",
    "message": "The parameter value is not supported by this model.",
    "param": "duration"
  }
}

Documentation Index

Fetch the complete documentation index at:

https://aiapiaiapi.com/llms.txt

Use this file to discover all available API documentation.