YUYU_N1 Reference to Video
YUYU_N1 accepts up to 5 reference images (characters, scenes, or objects) and generates entirely new footage based on your prompt. You can choose a video length of 3–10 seconds and set the aspect ratio and whether the video has audio. It works well for putting multiple characters in the same shot, or when you need portrait or landscape footage.
Note: the specs on this page differ from YUYU_N1 Image to Video. For example, the minimum video length is 3 seconds (2 seconds for Image to Video). Don't mix up the parameters between the two pages.
POST /api/tasks/reference2video
X-Api-Key: sk-live-xxxx
Content-Type: application/json
Idempotency-Key: optional, see Reference to Video
Full example
images takes base64 data URIs and supports PNG, JPEG, and WebP. The actual base64 content is omitted in the example.
The order of the images is the order of the characters: image 1 is the first character, image 2 is the second character, and your prompt can describe who does what in that order:
curl -X POST https://yuyuvideo.com/api/tasks/reference2video \
-H "X-Api-Key: sk-live-xxxx" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-20261001-00042" \
-d '{
"model": "YUYU_N1",
"prompt": "the woman from image 1 and the man from image 2 walk side by side on a beach at sunset, cinematic lighting",
"images": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ..."
],
"duration": 5,
"resolution": "540p",
"aspect_ratio": "9:16",
"audio": true,
"payload": { "external_order_id": "order-20261001-00042" },
"callback_url": "https://example.com/webhooks/yuyu-video"
}'
On success, you get 201 Created with the task data. At this point the task is still queued and files is empty; any fields you didn't send are filled in with their defaults in params. credits is the number of credits charged for this request; the number in the example is for reference only:
{
"public_id": "01K6A1B2C3D4E5F6G7H8J9K0LM",
"type": 4,
"status": 0,
"credits": 20,
"params": {
"model": "YUYU_N1",
"prompt": "the woman from image 1 and the man from image 2 walk side by side on a beach at sunset, cinematic lighting",
"images": [
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQ..."
],
"duration": 5,
"resolution": "540p",
"aspect_ratio": "9:16",
"audio": true,
"payload": { "external_order_id": "order-20261001-00042" },
"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 check progress and download the video next, see Query Tasks and Download Results.
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Set to YUYU_N1 |
prompt |
string | Yes | Video description, up to 1500 characters |
images |
string[] | No | 0–5 reference images, mapped to characters in order, as base64 data URIs (data:image/{png|jpeg|webp};base64,...) |
duration |
integer | No | Video length of 3–10 seconds, default 5. Each 5 seconds is one billing unit, and anything shorter than 5 seconds counts as 5 seconds. See Credits and Billing |
resolution |
string | No | Only 540p (default) for now. Any other value returns 422 |
aspect_ratio |
string | No | Aspect ratio: 16:9 / 9:16 / 1:1 / 3:4 / 4:3, default 16:9 |
audio |
boolean | No | Whether the video has audio, default true |
payload |
object | No | Custom data, such as your order number. The system never reads or modifies it, and returns it as-is when you query the task and in webhook notifications |
callback_url |
string | No | The URL to notify when the task finishes. Must start with https://, up to 2000 characters. See Callbacks (Webhook) |
YUYU_N1 in this API doesn't support seed; sending it returns 422.
If model is a model that doesn't exist, you get 422: Unknown model alias: {model}.
Parameters not listed in the table (except age_declared; see Pre-generation Age Check) return 422; they are not ignored.
Errors
| Status code | Cause | Response |
|---|---|---|
422 |
Invalid parameters, such as a missing required field, a wrong type, more than 5 images, a prompt over 1500 characters, or duration / resolution / aspect_ratio / audio outside the allowed range |
The errors field lists the reason for each field |
422 |
model is a model that doesn't exist |
{ "message": "Unknown model alias: {model}" } |
402 |
Not enough credits | { "message": "Insufficient credits to complete this charge." } |
429 |
Too many Reference to Video tasks waiting in the queue | { "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.