Overview
Convert a still image into an AI-animated video. Control motion intensity, duration, and aspect ratio to produce smooth, high-quality video clips from a single reference image.
Primary Endpoint
/api/v1/userImage2Video/startConvert an image to video using AI generation with custom prompts. For API-token requests, an upstream minor-content rejection is reported in the task result as `current_status: failed` with `failed_code: "1003"`. ### Request - Send a valid bearer token. The server evaluates the operation in the authenticated caller's access context. - Send an `application/json` body when using the optional controls documented in the request schema. - API-token callers may include `webhook_url` and `webhook_token` for best-effort terminal-state notifications; ordinary JWT/cookie calls ignore these fields. ### Behavior - This is an asynchronous operation: a successful submission creates a task and returns before processing finishes. - Persist the returned task identifier and use the corresponding detail or list operation to observe progress. - Treat the detail endpoint as the source of truth even when webhook delivery is enabled. ### Response - A `200` response confirms task acceptance; it does not by itself mean media generation has completed. - Retain the returned identifier and wait for a documented terminal status before using output URLs. - JSON object responses, including error responses, normally carry a top-level `trace_id` string for this request; include it when contacting support. It is not a task identifier. - Do not infer undocumented fields or statuses; clients should tolerate additional response properties. ### Errors - `400` — Bad Request - Invalid parameters. - `401` — Unauthorized - Invalid or missing JWT token. - `403` — API token requests with unlimited=true are rejected with code UNLIMITED_WEB_ONLY; unlimited generation is available on the web app only. - `422` — Content moderation rejected the request. Code 1003 means content involving a minor was detected. ### Related Operations - `GET /api/v1/userImage2Video/allRecords` — List image to video tasks. - `GET /api/v1/userImage2Video/{_id}` — Get image to video task detail. - `DELETE /api/v1/userImage2Video/{_id}` — Delete an image to video task. Authentication: set header Authorization: Bearer <token> (supports user JWT or sk_ API token).
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| ai_sharing_consent | object | No | Consent receipt for newer native apps. Legacy native requests may omit this field and continue without a consent record. If present, null, malformed, expired or incomplete receipts return AI_SHARING_CONSENT_REQUIRED before generation. Valid receipts cover all actual AI recipients, including safety providers and intermediaries, and constrain later fallback. Content safety checks remain required for native requests. Web and legacy API behavior is unchanged. |
| ai_sharing_consent.version | enum: 2026-11-12 | Yes | - |
| ai_sharing_consent.recipients | array<string> | Yes | - |
| name | string | No | Name of the image to video task |
| starting_video_url | string | No | Existing video to extend; the server validates its duration and I2V-compatible parameters. |
| unlimited | boolean | No | Web-only legacy plan-waiver option for a2e; unavailable for V2 models. API token requests with unlimited=true return HTTP 403 with code UNLIMITED_WEB_ONLY. |
| easy_mode | boolean | No | Compatibility easy-mode option for the original a2e image-to-video model; unavailable for V2 and reference modes. |
| image_url | string | No | URL of the source image. Required for image-to-video; omit for text-to-video and reference-to-video. |
| prompt | string | No | Generation prompt |
| negative_prompt | string | No | Optional negative prompt to avoid unwanted features. If omitted, generation service defaults apply. An empty string is accepted. |
| lora | string | No | Lora ID. If provided, prompt/negative_prompt can be omitted (prompt will be overwritten by lora preset on backend). |
| generation_mode | enum: image-to-video | text-to-video | reference-to-video | No | Generation mode. Text and reference modes require a2e-v2 or a2e-v2-flash and a nonempty prompt up to 2000 characters. Reference mode accepts video_time of 3, 4, 5, 10 or 15; text mode accepts 5, 10 or 15.; default: "image-to-video" |
| generation_params | object | No | Text/reference parameters. Omit for image-to-video. Reference mode requires at least one asset; text mode accepts none. |
| generation_params.aspect_ratio | enum: 1:1 | 2:3 | 3:2 | 3:4 | 4:3 | 9:16 | 16:9 | 21:9 | No | default: "16:9" |
| generation_params.reference_assets | array<object> | No | At most 9 images, 3 videos and 3 audio files. Video and audio clips must each last 2–15 seconds, with at most 15 seconds total per type.; maxItems: 12 |
| generation_params.reference_assets[].asset_id | string | Yes | Unique reference identifier, such as image_1, video_1 or audio_1. |
| generation_params.reference_assets[].type | enum: image | video | audio | Yes | - |
| generation_params.reference_assets[].url | string | Yes | - |
| generation_params.reference_assets[].duration_seconds | number | No | Required for audio. Video duration is measured by the server.; minimum: 2; maximum: 15 |
| model_type | enum: GENERAL | FLF2V | No | Model type for generation; default: "GENERAL" |
| model_version | enum: a2e | a2e-v2 | a2e-v2-flash | No | Algorithm model version. When omitted, Ultra users default to a2e-v2 and other roles default to a2e. a2e-v2 costs more per second; a2e-v2-flash uses a2e pricing. V2 models are not covered by plan waivers. |
| auto_add_audio | boolean | No | Whether to add audio. Defaults to false for a2e (paid ThinkSound post-processing) and true for a2e-v2/a2e-v2-flash (native audio with no ThinkSound surcharge). |
| end_image_url | string | No | End image URL (required for FLF2V model) |
| extend_prompt | boolean | No | Whether to extend the prompt automatically; default: true |
| number_of_images | integer | No | Number of videos to generate at once; minimum: 1; maximum: 8; default: 1 |
| video_time | integer | No | Video time in integer seconds. Image to video and first-last-frame (FLF2V) accept any integer from 3 to 20; video extension (starting_video_url) supports 5 to 20. Reference mode supports 3, 4, 5, 10 or 15 seconds; text mode supports 5, 10 or 15. Billing uses the effective duration: in image to video, first-last-frame and video extension, a non-zero video_length takes precedence over video_time and is converted to whole seconds by dividing by the model frame rate (16 fps for a2e, 24 fps for a2e-v2 and a2e-v2-flash) and rounding down, then clamped to the mode minimum (3 seconds, or 5 for video extension) and to 20 seconds (for example, 107 frames on a2e-v2 bills 4 seconds, 1 frame bills 3 seconds and 1000 frames bills 20 seconds); otherwise video_time is used. Text and reference modes accept only video_time and reject video_length with HTTP 400. a2e 3- and 4-second videos use 49/65 frames at 16 fps; above 5 seconds a2e generates in 5-second segments, so its output is rounded up to the next multiple of 5 seconds (for example, 6 seconds yields about 10 seconds). a2e-v2 and a2e-v2-flash generate one continuous 24 fps clip whose frame count is rounded up to the next supported 17k+5 frame count, so the output is up to about 0.7 seconds longer than the requested time (for example, 3 seconds yields about 3.04 seconds and 4 seconds yields about 4.46 seconds).; minimum: 3; maximum: 20; default: 5 |
| video_length | integer | No | (Deprecated) Video length in frames. Prefer video_time. Backend converts frames to seconds internally.; minimum: 1; maximum: 1000 |
| skip_face_enhance | boolean | No | Whether to skip face similarity enhancement. Defaults to false (enhancing face similarity).; default: false |
| mask_face | boolean | No | Web NSFW preflight result. Set true only after the user confirms masking a detected human face. |
| minor_suspected_skip | boolean | No | Accepted for backward compatibility only. This flag has no effect on generation or content moderation.; default: false |
| watermark_url | string | No | API only. Public http(s) URL of your own watermark image (any common image format; a PNG with a transparent background looks best), overlaid in the lower-right corner of the generated video. It replaces the default watermark for paid accounts; for free accounts it is ignored and the standard platform watermark rules apply. The image is copied to temporary platform storage and reused for up to 24 hours for the same URL, so changes to the image behind the same URL may take up to 24 hours to apply. If the image cannot be read or applied, the video is still generated without the custom watermark. Omit or send an empty string for no custom watermark. Ignored for web app requests.; maxLength: 2048 |
| webhook_url | string | No | HTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.; maxLength: 2048 |
| webhook_token | string | No | Optional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.; maxLength: 256 |
Request schema and conditional rules
{
"allOf": [
{
"type": "object",
"properties": {
"ai_sharing_consent": {
"type": "object",
"description": "Consent receipt for newer native apps. Legacy native requests may omit this field and continue without a consent record. If present, null, malformed, expired or incomplete receipts return AI_SHARING_CONSENT_REQUIRED before generation. Valid receipts cover all actual AI recipients, including safety providers and intermediaries, and constrain later fallback. Content safety checks remain required for native requests. Web and legacy API behavior is unchanged.",
"required": [
"version",
"recipients"
],
"properties": {
"version": {
"type": "string",
"enum": [
"2026-11-12"
]
},
"recipients": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"A2E",
"Alibaba Cloud"
]
}
}
},
"name": {
"type": "string",
"description": "Name of the image to video task",
"example": "My Image Animation"
},
"starting_video_url": {
"type": "string",
"description": "Existing video to extend; the server validates its duration and I2V-compatible parameters."
},
"unlimited": {
"type": "boolean",
"description": "Web-only legacy plan-waiver option for a2e; unavailable for V2 models. API token requests with unlimited=true return HTTP 403 with code UNLIMITED_WEB_ONLY."
},
"easy_mode": {
"type": "boolean",
"description": "Compatibility easy-mode option for the original a2e image-to-video model; unavailable for V2 and reference modes."
},
"image_url": {
"type": "string",
"description": "URL of the source image. Required for image-to-video; omit for text-to-video and reference-to-video.",
"example": "https://example.com/image.jpg"
},
"prompt": {
"type": "string",
"description": "Generation prompt",
"example": "Make the person in the image wave their hand"
},
"negative_prompt": {
"type": "string",
"description": "Optional negative prompt to avoid unwanted features. If omitted, generation service defaults apply. An empty string is accepted.",
"example": "blurry, distorted, static"
},
"lora": {
"type": "string",
"description": "Lora ID. If provided, prompt/negative_prompt can be omitted (prompt will be overwritten by lora preset on backend)."
},
"generation_mode": {
"type": "string",
"enum": [
"image-to-video",
"text-to-video",
"reference-to-video"
],
"default": "image-to-video",
"description": "Generation mode. Text and reference modes require a2e-v2 or a2e-v2-flash and a nonempty prompt up to 2000 characters. Reference mode accepts video_time of 3, 4, 5, 10 or 15; text mode accepts 5, 10 or 15."
},
"generation_params": {
"type": "object",
"description": "Text/reference parameters. Omit for image-to-video. Reference mode requires at least one asset; text mode accepts none.",
"properties": {
"aspect_ratio": {
"type": "string",
"enum": [
"1:1",
"2:3",
"3:2",
"3:4",
"4:3",
"9:16",
"16:9",
"21:9"
],
"default": "16:9"
},
"reference_assets": {
"type": "array",
"maxItems": 12,
"description": "At most 9 images, 3 videos and 3 audio files. Video and audio clips must each last 2–15 seconds, with at most 15 seconds total per type.",
"items": {
"type": "object",
"required": [
"asset_id",
"type",
"url"
],
"properties": {
"asset_id": {
"type": "string",
"description": "Unique reference identifier, such as image_1, video_1 or audio_1."
},
"type": {
"type": "string",
"enum": [
"image",
"video",
"audio"
]
},
"url": {
"type": "string",
"format": "uri"
},
"duration_seconds": {
"type": "number",
"minimum": 2,
"maximum": 15,
"description": "Required for audio. Video duration is measured by the server."
}
}
}
}
}
},
"model_type": {
"type": "string",
"enum": [
"GENERAL",
"FLF2V"
],
"default": "GENERAL",
"description": "Model type for generation"
},
"model_version": {
"type": "string",
"enum": [
"a2e",
"a2e-v2",
"a2e-v2-flash"
],
"description": "Algorithm model version. When omitted, Ultra users default to a2e-v2 and other roles default to a2e. a2e-v2 costs more per second; a2e-v2-flash uses a2e pricing. V2 models are not covered by plan waivers."
},
"auto_add_audio": {
"type": "boolean",
"description": "Whether to add audio. Defaults to false for a2e (paid ThinkSound post-processing) and true for a2e-v2/a2e-v2-flash (native audio with no ThinkSound surcharge)."
},
"end_image_url": {
"type": "string",
"description": "End image URL (required for FLF2V model)",
"example": "https://example.com/end_image.jpg"
},
"extend_prompt": {
"type": "boolean",
"default": true,
"description": "Whether to extend the prompt automatically"
},
"number_of_images": {
"type": "integer",
"minimum": 1,
"maximum": 8,
"default": 1,
"description": "Number of videos to generate at once",
"example": 1
},
"video_time": {
"type": "integer",
"minimum": 3,
"maximum": 20,
"default": 5,
"description": "Video time in integer seconds. Image to video and first-last-frame (FLF2V) accept any integer from 3 to 20; video extension (starting_video_url) supports 5 to 20. Reference mode supports 3, 4, 5, 10 or 15 seconds; text mode supports 5, 10 or 15. Billing uses the effective duration: in image to video, first-last-frame and video extension, a non-zero video_length takes precedence over video_time and is converted to whole seconds by dividing by the model frame rate (16 fps for a2e, 24 fps for a2e-v2 and a2e-v2-flash) and rounding down, then clamped to the mode minimum (3 seconds, or 5 for video extension) and to 20 seconds (for example, 107 frames on a2e-v2 bills 4 seconds, 1 frame bills 3 seconds and 1000 frames bills 20 seconds); otherwise video_time is used. Text and reference modes accept only video_time and reject video_length with HTTP 400. a2e 3- and 4-second videos use 49/65 frames at 16 fps; above 5 seconds a2e generates in 5-second segments, so its output is rounded up to the next multiple of 5 seconds (for example, 6 seconds yields about 10 seconds). a2e-v2 and a2e-v2-flash generate one continuous 24 fps clip whose frame count is rounded up to the next supported 17k+5 frame count, so the output is up to about 0.7 seconds longer than the requested time (for example, 3 seconds yields about 3.04 seconds and 4 seconds yields about 4.46 seconds).",
"example": 5
},
"video_length": {
"type": "integer",
"minimum": 1,
"maximum": 1000,
"description": "(Deprecated) Video length in frames. Prefer video_time. Backend converts frames to seconds internally.",
"example": 81
},
"skip_face_enhance": {
"type": "boolean",
"default": false,
"description": "Whether to skip face similarity enhancement. Defaults to false (enhancing face similarity)."
},
"mask_face": {
"type": "boolean",
"description": "Web NSFW preflight result. Set true only after the user confirms masking a detected human face."
},
"minor_suspected_skip": {
"type": "boolean",
"default": false,
"description": "Accepted for backward compatibility only. This flag has no effect on generation or content moderation."
},
"watermark_url": {
"type": "string",
"maxLength": 2048,
"description": "API only. Public http(s) URL of your own watermark image (any common image format; a PNG with a transparent background looks best), overlaid in the lower-right corner of the generated video. It replaces the default watermark for paid accounts; for free accounts it is ignored and the standard platform watermark rules apply. The image is copied to temporary platform storage and reused for up to 24 hours for the same URL, so changes to the image behind the same URL may take up to 24 hours to apply. If the image cannot be read or applied, the video is still generated without the custom watermark. Omit or send an empty string for no custom watermark. Ignored for web app requests.",
"example": "https://example.com/my_logo.png"
}
},
"required": []
},
{
"$ref": "#/components/schemas/WebhookInput"
}
]
}Response Fields
- code: integer
- data: object
- data.refund_pending: boolean
- Whether the refund is pending resolution; when true, it takes precedence over hasRefundCoin. Omitted for legacy records without a stored flag.
- data.generation_mode: enum: image-to-video | text-to-video | reference-to-video
- data.generation_params: object
- Text/reference parameters. Omit for image-to-video. Reference mode requires at least one asset; text mode accepts none.
- data.generation_params.aspect_ratio: enum: 1:1 | 2:3 | 3:2 | 3:4 | 4:3 | 9:16 | 16:9 | 21:9
- default: "16:9"
- data.generation_params.reference_assets: array<object>
- At most 9 images, 3 videos and 3 audio files. Video and audio clips must each last 2–15 seconds, with at most 15 seconds total per type.; maxItems: 12
- data.generation_params.reference_assets[].asset_id: string
- Unique reference identifier, such as image_1, video_1 or audio_1.
- data.generation_params.reference_assets[].type: enum: image | video | audio
- data.generation_params.reference_assets[].url: string
- data.generation_params.reference_assets[].duration_seconds: number
- Required for audio. Video duration is measured by the server.; minimum: 2; maximum: 15
- data.model_version: enum: a2e | a2e-v2 | a2e-v2-flash
- data.starting_video_url: string
- data._id: string
- data.name: string
- data.image_url: string
- data.current_status: string
- data.result_url: string
- data.cover_url: string
- data.mask_face: boolean
- Whether clients should display the privacy-processed input image as the task cover
- data.model_type: string
- data.end_image_url: string
- data.extend_prompt: boolean
- data.lora: string
- data.video_time: number
- data.video_length: number
- data.coins: number
- data.remainingDays: number
- data.expirationDate: string
- data.isExpired: boolean
- data.expirationDays: number
- data.total_videos: number
- Present only when number_of_images > 1
- data.all_records: array<object>
- Present only when number_of_images > 1
- data.all_records[]._id: string
- Task ID for detail and batch polling.
- data.all_records[].name: string
- data.all_records[].prompt: string
- data.all_records[].is_downloaded: boolean
- data.all_records[].is_previewed: boolean
- data.all_records[].current_status: string
- Persisted task state; use the concrete task family schema for its allowed values and terminal states.
- data.all_records[].createdAt: string
- data.all_records[].updatedAt: string
- data.all_records[].expirationDate: string
- data.all_records[].remainingDays: number
- data.all_records[].isExpired: boolean
- data.all_records[].coins: number
- data.all_records[].hasRefundCoin: boolean
- Whether charged credits were refunded.
- data.all_records[].failed_code: string
- data.all_records[].failed_message: string
- data.all_records[].failed_reason: string
- Public failure category when available.
- data.all_records[].image_url: string
- data.all_records[].image_urls: array<string>
- data.all_records[].result_url: string
- data.all_records[].video_url: string
- data.all_records[].result_video_url: string
- data.all_records[].cover_url: string
- data.all_records[].result_cover: string
- data.all_records[].hd_video_url: string
- data.all_records[].video_time: number
- data.all_records[].duration_seconds: number
- data.all_records[].refund_pending: boolean
- Whether the refund is pending resolution. When true, do not treat hasRefundCoin as confirmation of a completed refund. Omitted for legacy records without a stored flag.
- data.all_records[].generation_mode: enum: image-to-video | text-to-video | reference-to-video
- data.all_records[].generation_params: object
- Text/reference parameters. Omit for image-to-video. Reference mode requires at least one asset; text mode accepts none.
- data.all_records[].generation_params.aspect_ratio: enum: 1:1 | 2:3 | 3:2 | 3:4 | 4:3 | 9:16 | 16:9 | 21:9
- default: "16:9"
- data.all_records[].generation_params.reference_assets: array<object>
- At most 9 images, 3 videos and 3 audio files. Video and audio clips must each last 2–15 seconds, with at most 15 seconds total per type.; maxItems: 12
- data.all_records[].generation_params.reference_assets[].asset_id: string
- Unique reference identifier, such as image_1, video_1 or audio_1.
- data.all_records[].generation_params.reference_assets[].type: enum: image | video | audio
- data.all_records[].generation_params.reference_assets[].url: string
- data.all_records[].generation_params.reference_assets[].duration_seconds: number
- Required for audio. Video duration is measured by the server.; minimum: 2; maximum: 15
- data.all_records[].model_version: enum: a2e | a2e-v2 | a2e-v2-flash
- data.all_records[].starting_video_url: string
- trace_id: string
- Trace ID of this HTTP request. Include it when contacting support about this request. It is generated per request and is not a task identifier; use the returned task `_id` to query results.
Request Example
curl -X POST "https://www.a2e.com.cn/api/v1/userImage2Video/start" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Image Animation",
"image_url": "https://example.com/image.jpg",
"prompt": "Make the person in the image wave their hand",
"negative_prompt": "blurry, distorted, static",
"model_type": "GENERAL",
"extend_prompt": true,
"number_of_images": 1,
"video_time": 5,
"skip_face_enhance": false,
"mask_face": false
}'Related Endpoints
/api/v1/userImage2Video/{_id}Get image to video task detail
/api/v1/userImage2Video/startStart image to video conversion
/api/v1/userImage2Video/allRecordsList image to video tasks
/api/v1/userImage2Video/batchDetailBatch query task details
/api/v1/userImage2Video/avgProcessingTimeGet image-to-video processing estimates
/api/v1/userImage2Video/unlimitedQueueLevelGet image-to-video unlimited queue level
/api/v1/userImage2Video/{_id}Delete an image to video task
/api/v1/userImage2Video/prompt_extensionExtend prompt for image to video
/api/v1/userImage2Video/flf2v_prompt_extensionExtend prompt for FLF2V image to video
Responses
Image to video task started successfully
Bad Request - Invalid parameters
Unauthorized - Invalid or missing bearer token
API token requests with unlimited=true are rejected with code UNLIMITED_WEB_ONLY; unlimited generation is available on the web app only.
Content moderation rejected the request. Code 1003 means content involving a minor was detected.