YUYU_C1 Image to Image

YUYU_C1 uses a template (preset_name) to determine the image style. You can include reference images and adjust quality with quality.

POST /api/tasks/image-generation
X-Api-Key: sk-live-xxxx
Content-Type: application/json
Idempotency-Key: optional, see below

Full example

images takes base64 data URIs; PNG, JPEG, and WebP are supported. The actual base64 content is omitted in this example:

curl -X POST https://yuyuvideo.com/api/tasks/image-generation \
  -H "X-Api-Key: sk-live-xxxx" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-20260716-00043" \
  -d '{
    "model": "YUYU_C1",
    "prompt": "a woman smiling at the camera, studio lighting",
    "images": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."],
    "preset_name": "some_preset",
    "quality": "high",
    "payload": { "external_order_id": "order-20260716-00043" },
    "callback_url": "https://example.com/webhooks/yuyu-image"
  }'

On success, you get 201 Created and the task data. At this point the task is still queued and files is empty. credits is the number of credits charged for this task; the number in the example is for reference only:

{
  "public_id": "01K1M2N3P4Q5R6S7T8V9W0XY13",
  "type": 2,
  "status": 0,
  "credits": 10,
  "params": {
    "model": "YUYU_C1",
    "prompt": "a woman smiling at the camera, studio lighting",
    "images": ["data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA..."],
    "preset_name": "some_preset",
    "quality": "high",
    "payload": { "external_order_id": "order-20260716-00043" },
    "callback_url": "https://example.com/webhooks/yuyu-image"
  },
  "error_code": null,
  "error_message": null,
  "created_at": "2026-07-16T08:00:00.000000Z",
  "finished_at": null,
  "files_expire_at": null,
  "files_expired": false,
  "files": []
}

To check progress and download the image, see Query Tasks and Download Results.

Parameters

Field Type Required Description
model string Yes Set to YUYU_C1
prompt string No Image description, up to 10000 characters
images string[] No Reference images. Up to 4 allowed, but only the first 2 are used. Format: base64 data URI (data:image/{png|jpeg|webp};base64,...)
preset_name string Yes Template name; see below
quality string Yes Quality: low / mid / high
seed — No Not supported; including it returns 422
resolution — No Not supported; including it returns 422
payload object No Custom data, such as your order number. The system never reads or modifies it, and returns it as-is in task queries and webhook notifications
callback_url string No URL to notify when the task finishes. Must start with https://, up to 2000 characters. See Callbacks (Webhook)

About preset_name

48 templates are available: anal_griping / bath_towel / bikini / blowjob_69 / blowjob_grand_slam / blowjob_pov / blowjob_sideview / bondage / breast_milk / bunny_suit / chain_leash / come_fuck_me / cum_on_body / cum_on_face / cunnilingus / custom / doggystyle_pov / doggystyle_sideview / fingering / handjob / jk_uniform / legsup / leopard_bikini / lingerie / masturbation / missionary_condoms / missionary_pov / missionary_sideview / remix_blowjob / remix_cowgirl / remix_doggystyle / remix_dress / remix_hold_dick / remix_kiss / remix_pronebone / remix_suck / remix_wear / remix_yoga / ride_on_dildo / sipping_condoms / squatting_cowgirl / tattoo / tentacles / titjob / topless / undress / used / xray.

The template name is not validated when you create a task. If you specify a template that doesn't exist, the task is still created successfully (201), but it fails during processing and the credits are refunded automatically.

Specifying a model that doesn't exist returns 422: Unknown model alias: {model}.

Including any parameter not listed in the table (except age_declared; see Pre-generation Age Check) returns 422; it is not ignored.

Idempotency-Key

Prevents duplicate tasks. Pass a custom string in this header; we recommend a unique value from your system, such as an order number:

Idempotency-Key: order-20260711-00043

If you send repeated requests with the same API key and the same Idempotency-Key within a short time, only one task is created and credits are charged only once. Subsequent duplicate requests return 200 OK with the original task.

Without this header, every request creates a new task.

Errors

Status code Cause Response
422 Invalid parameters, e.g. a missing required field, wrong type, or more than 4 images The errors field lists the error for each field
422 model doesn't exist { "message": "Unknown model alias: {model}" }
402 Insufficient credits { "message": "Insufficient credits to complete this charge." }
429 Too many queued image tasks { "message": "Too many pending tasks of this type; please retry later." }. Use the Retry-After response header to decide when to retry
— Template name doesn't exist Created successfully (201), but the task fails later (status = 30) and the credits are refunded automatically

For charging rules, see Credits and Billing.