- Run an AI Image Generator task.
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.
ID of the template. List predefined templates first, and use the id of a template.
Steps affect image quality and time of processing.
Recommended Step Counts
10-15 Steps: Ideal for quick prompt testing and making broad tweaks.
15–20 Steps: The community sweet spot. Most models hit their ideal quality-to-time ratio in this range.
20–30 Steps: Best for generating highly detailed subjects, like faces, fur, or architectural elements.
The CFG (Classifier-Free Guidance) scale is a mathematical setting that dictates how strictly an AI model adheres to your text prompt.
Low CFG (1 – 4): The AI has high creative freedom. It loosely interprets your prompt, which can lead to abstract, painterly results, or images that wander off-topic entirely.
Medium CFG (5 – 10): The ideal sweet spot. The generator follows your text closely while still maintaining natural, high-quality visuals.
High CFG (11+): The AI clings to every single word in your prompt. While details become sharper and more literal, pushing the scale too high often results in over-saturated colors, noise, and unnatural artifacts.
Each image is generated with a unique seed. Using same seed to recreate the same image. Only accept 1 seed.
[ 3843718472198472 ]
curl -i -X POST \
https://yce-api-01.makeupar.com/s2s/v2.0/task/text-to-image \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"prompt": "A little cat",
"negative_prompt": "dog",
"template_id": "good_template_001",
"steps": 10,
"cfg_scale": 4,
"seed": [
3843718472198472
],
"width_ratio": 3,
"height_ratio": 4
}'{ "status": 200, "data": { "task_id": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe" } }