- Run an AI Image Generator task V2 for text 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.
A positive prompt describing the image content, style, and composition you want.
Supports Chinese and English. Maximum length is 800 characters. Each Chinese character, letter, digit, or symbol counts as one character.
A negative prompt describing what you do not want in the image.
Supports Chinese and English. Maximum length is 500 characters.
Output image resolution, formatted as width*height.
Supported resolutions and their aspect ratios:
- 1664*928 (default): 16:9
- 1472*1104: 4:3
- 1328*1328: 1:1
- 1104*1472: 3:4
- 928*1664: 9:16
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. |
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/text-to-image/youcam \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"model": "youcam-image-v2",
"prompt": "A sitting orange cat with a joyful expression, lively and adorable, highly realistic.",
"negative_prompt": "Low resolution, low quality, distorted limbs, malformed fingers, oversaturated colors, wax-like appearance, no facial details, overly smooth surfaces, AI-generated look. Chaotic composition. Blurry or distorted text.",
"size": "1664*928",
"prompt_extend": true
}'{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }