- Run an AI Image Generator task V2 for image to image.
AI tasks are asynchronous. Prefer webhook-based completion handling when the feature supports webhooks. Configure your webhook endpoint, verify webhook signatures, and use the received task_id to query the task result after a success or error notification. See the webhook integration guide for setup and verification details.
If webhooks are not supported or cannot be used in your integration, implement polling. After submitting an AI task, poll the status endpoint at regular intervals (e.g., every 10 seconds) until the task status is success or error.
The image editing instruction (positive prompt) that describes the elements and visual features you want in the generated image.
This parameter supports Chinese and English with a maximum length of 800 characters. Each Chinese character or English letter counts as one character.
The negative prompt, describing content you do not want in the generated image.
This parameter supports Chinese and English with a maximum length of 500 characters. Each Chinese character or English letter counts as one character.
Specifies the resolution of the output image in the width*height format, such as "1024*1536".
- The width and height must each be in the range of [512, 2048] pixels.
- By default, the total number of pixels is approximately 1024*1024, with an aspect ratio similar to the input image (or the last image in a multi-image request).
When you specify the size parameter, the system uses the width and height specified by size as the target and adjusts the width and height of the actual output image to the nearest multiple of 16. For example, if you specify 1033*1032, the output image dimensions are 1040*1024.
Recommended resolutions for common aspect ratios:
- 1:1: 1024*1024, 1536*1536
- 2:3: 768*1152, 1024*1536
- 3:2: 1152*768, 1536*1024
- 3:4: 960*1280, 1080*1440
- 4:3: 1280*960, 1440*1080
- 9:16: 720*1280, 1080*1920
- 16:9: 1280*720, 1920*1080
- 21:9: 1344*576, 2048*872
Enable smart prompt rewriting. The model optimizes the positive prompt. Does not affect the negative prompt.
| Enum Value | Description |
|---|---|
| true | Enables rewriting. Use this for more diverse image content; the model adds details. |
| false | Disables rewriting. Use this for tighter control over image details. |
- Run task with src_file_urls
- Run task with 3 angle src file IDs
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/image-to-image/youcam \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"src_file_urls": [
"https://example.com/selfie.jpg",
"https://example.com/selfie.jpg",
"https://example.com/selfie.jpg"
],
"model": "youcam-image-v2",
"prompt": "Make the girl from Image 1 wear the black dress from Image 2 and sit in the pose from Image 3. Keep her clothing, hairstyle, and expression unchanged, and ensure the action is natural and smooth.",
"negative_prompt": "low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions.",
"size": "1024*1024",
"prompt_extend": true
}'{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }