YUYU_M6 Image to Video
YUYU_M6 needs just 1 image. The video starts from this image and brings the person in it to life according to the prompt: the face, hairstyle, and clothing match the image from the very first frame, and the scene is carried over from the image too. Use the prompt mainly to describe motion, expressions, and dialogue. The video length can be 5 or 10 seconds, and you can choose from 6 aspect ratios with aspect_ratio; if you don't choose one, the video follows the input image. This model suits short, single-character videos with simple specs.
To change the scene or clothing, use YUYU_M6 Reference to Video instead: it is the same model, but the image is used only as a character reference, the shot is recomposed according to the prompt, and the video does not necessarily start from this image.
POST /api/tasks/video-generation
X-Api-Key: sk-live-xxxx
Content-Type: application/json
Idempotency-Key: optional, see Image to Video
Full example
images takes a base64 data URI. PNG, JPEG, and WebP are supported. The actual base64 content is omitted in the example. duration must be 5 or 10 and is required:
curl -X POST https://yuyuvideo.com/api/tasks/video-generation \
-H "X-Api-Key: sk-live-xxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-20261001-00043" \
-d '{
"model": "YUYU_M6",
"prompt": "she walks along the beach at sunset, the wind gently blowing her hair, cinematic",
"images": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."],
"duration": 5,
"seed": 1234567,
"payload": { "external_order_id": "order-20261001-00043" },
"callback_url": "https://example.com/webhooks/yuyu-video"
}'
On success, the API returns 201 Created with the task data. At this point the task is still queued and files is empty. credits is the number of credits charged for this request; the number in the example is for reference only:
{
"public_id": "01K6A1B2C3D4E5F6G7H8J9K0LN",
"type": 1,
"status": 0,
"credits": 10,
"params": {
"model": "YUYU_M6",
"prompt": "she walks along the beach at sunset, the wind gently blowing her hair, cinematic",
"images": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."],
"duration": 5,
"seed": 1234567,
"prompt_enhance": false,
"payload": { "external_order_id": "order-20261001-00043" },
"callback_url": "https://example.com/webhooks/yuyu-video"
},
"error_code": null,
"error_message": null,
"created_at": "2026-10-01T08:00:00.000000Z",
"finished_at": null,
"files_expire_at": null,
"files_expired": false,
"files": []
}
To learn how to check progress and download the video, see Query Tasks and Download Results.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Set to YUYU_M6 |
prompt |
string | Yes | Video description, up to 10000 characters |
images |
string[] | Yes | Exactly 1 image; 0 images or 2 or more return 422. Format is a base64 data URI (data:image/{png|jpeg|webp};base64,...) |
duration |
integer | Yes | Video length in seconds. Must be 5 or 10 and cannot be omitted; any other value returns 422. 10 seconds counts as 2 billing units and costs twice the credits of 5 seconds |
seed |
integer | No | Random seed, 1–2147483647. If omitted, a random seed is used each time |
aspect_ratio |
string | No | Aspect ratio. The actual video size (width×height) is in parentheses: 9:16 (448×768, portrait), 16:9 (768×448, landscape), 1:1 (640×640), 3:4 (576×768), 4:3 (768×576), 2:3 (512×768). If omitted, the video follows the input image; see Video dimensions below |
prompt_enhance |
boolean | No | Prompt enhancement, default false. When set to true, the system first expands your prompt into a full description of camera, motion, and sound before generating the video, which is especially useful when your prompt is brief. Dialogue inside quotation marks is kept word for word. This costs additional credits; the actual amount is the credits value in the response |
payload |
object | No | Custom data, such as your order number. The system does not read or modify it, and returns it as-is when you query the task and in webhook notifications |
callback_url |
string | No | URL to notify when the task finishes. Must start with https://, up to 2000 characters. See Callbacks (Webhook) |
YUYU_M6 does not support resolution or audio; sending either returns 422. The resolution is fixed at about 480p (long edge up to 768), and the price is the same for all aspect ratios.
Video dimensions:
- With
aspect_ratio: the video is the size shown in parentheses in the table above. The input image is scaled proportionally until it just covers that size, then center-cropped to remove the excess, and the video's first frame is the cropped image. If the input image is smaller than that size, it is upscaled first, so the first frame may look blurry; we recommend using a sufficiently large image - Without it: the video follows the input image. The input image's long edge is scaled down to 768 or less (downscaling only, never upscaling), and the width and height are then rounded down to multiples of 32. For example, a 1080×1920 input image produces a 416×768 video. A small input image produces a small video: for example, a 400×600 input image produces only a 384×576 video, and faces tend to look blurry
If model is set to a model that does not exist, the API returns 422: Unknown model alias: {model}.
Parameters not listed in the table (except age_declared; see Pre-generation Age Check) return 422 if sent. They are not ignored.
Writing prompts without prompt enhancement
When prompt_enhance is false or omitted, your prompt is sent to generation as-is, and you can write it in the format below. Write everything in English, keeping only dialogue, lyrics, and on-screen text in their original language. Do not turn on prompt_enhance when you use this format.
Format
- The first line is always:
For the target video, at 0.00 seconds into the target video, <Picture 1> (from [Shot 1]) is fully referenced. - Leave a blank line.
- Write three sections in order. The field names and their order cannot be changed:
| Field | What to write |
|---|---|
integrated_multimodal_description |
Start with [Shot 1], write the style first, then the visuals, motion, camera, and dialogue in time order: start from the photo's frame, then the action begins, develops, and concludes |
overall_soundscape |
Ambient sound, action sounds, and non-verbal vocal sounds, 1–4 sentences |
non_diegetic_music |
Background music only the audience can hear, 1–3 sentences; write N/A if there is none |
Markers
| Marker | Description |
|---|---|
<Picture 1> |
The image you passed in images; the frame at second 0 of the video |
[Shot 1] |
The first shot, with no timestamp; start by writing the style, e.g. Cinematic, live-action. |
(S1) |
The speaker. Describe the voice the first time they appear (e.g. an adult woman with a soft, clear voice) |
<d>…</d> |
Dialogue. Inside, write the language first, then the original text: <d>[Chinese] 你來啦.</d>. End sentences with half-width . ? ! |
Writing rules
- Write the content in time order: start from the photo's frame, then describe the action beginning, the action developing, and the final result.
- Describe camera movement as English sentences within the content. You can add amplitude and speed, e.g.
The camera pushes in with small amplitude at slow speed. overall_soundscapecovers only ambient sound, action sounds, and non-verbal vocal sounds, not dialogue.non_diegetic_musicdescribes instruments, tempo, rhythm, and dynamics, not abstract emotional adjectives. Music that characters in the scene can hear goes in the shot content.
Full example
For the target video, at 0.00 seconds into the target video, <Picture 1> (from [Shot 1]) is fully referenced.
integrated_multimodal_description: [Shot 1] Cinematic, live-action. The video opens on the exact frame of <Picture 1>: a young woman with long wavy light-gray hair and a gray sweatshirt sits at a wooden desk in a dark room, one hand on the mouse and the other on the keyboard, looking toward the camera under warm lamplight. She lets go of the mouse, straightens up and breaks into a warm smile. The camera pushes in with small amplitude at slow speed. The woman (S1), an adult woman with a soft, clear voice at a relaxed pace, says: <d>[Chinese] 你來啦.</d> She keeps her eyes on the camera after speaking.
overall_soundscape: A soft click of the mouse, then quiet room tone with the faint hum of the computer.
non_diegetic_music: N/A
Errors
| Status code | Cause | Response |
|---|---|---|
422 |
Invalid parameters, such as a missing required field, wrong type, images not containing exactly 1 image, duration not being 5 or 10, aspect_ratio not one of the allowed values, or seed out of range |
The errors field lists the error for each field |
422 |
prompt_enhance: true was set, but prompt enhancement is temporarily unavailable |
{ "message": "Prompt enhancement is temporarily unavailable", "errors": { "prompt_enhance": ["Prompt enhancement is temporarily unavailable"] } }. No task is created and no credits are charged. Set it to false or omit the parameter and send the request again |
422 |
model is set to a model that does not exist |
{ "message": "Unknown model alias: {model}" } |
402 |
Insufficient credits | { "message": "Insufficient credits to complete this charge." } |
429 |
Too many queued image-to-video tasks | { "message": "Too many pending tasks of this type; please retry later." }. Use the Retry-After header in the response to decide when to retry |
For charging rules, see Credits and Billing.