Routes to Alibaba Cloud's image generation service. Supports both synchronous and async task modes. Does not support SSE streaming.
Supported models
Synchronous mode
curl -X POST https://51kik.com/v1/image/v1/generations \
-H 'Authorization: Bearer sk-xxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "wanx-v1",
"prompt": "ancient chinese ink painting of mountains and clouds",
"upstream_options": { "n": 1, "resolution": "1024*1024", "watermark": false, "prompt_extend": true }
}'
Image-to-image
curl -X POST https://51kik.com/v1/image/v1/generations \
-H 'Authorization: Bearer sk-xxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "qwen-image-edit",
"prompt": "convert to oil painting style",
"image": "https://example.com/source.jpg",
"upstream_options": { "n": 1, "aspect_ratio": "16:9", "result_type": "image" }
}'
Async task
curl -X POST https://51kik.com/v1/image/v1/generations \
-H 'Authorization: Bearer sk-xxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"model": "wanx-v1",
"prompt": "a panoramic mountain landscape",
"task": true,
"upstream_options": { "resolution": "2048*1024", "n": 4 }
}'
Response contains only task_id; poll for results:
curl https://51kik.com/v1/image/v1/tasks/abc123-task-id \
-H 'Authorization: Bearer sk-xxxxxxxx'
Streaming limitation
Bailian does not support SSE streaming. Passing stream: true returns Bailian image generation does not support streaming.
Common upstream_options
| Parameter | Description |
|---|---|
n | Number of images |
resolution | Resolution, e.g. 1024*1024 |
aspect_ratio | Aspect ratio, e.g. 16:9 |
watermark | Toggle watermark |
prompt_extend | Auto-expand prompt |
negative_prompt | Negative prompt |
seed | Random seed |
result_type | Output type: image / url |
Don't pass both
task: trueandstream: truesimultaneously — behavior is undefined.