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

ParameterDescription
nNumber of images
resolutionResolution, e.g. 1024*1024
aspect_ratioAspect ratio, e.g. 16:9
watermarkToggle watermark
prompt_extendAuto-expand prompt
negative_promptNegative prompt
seedRandom seed
result_typeOutput type: image / url

Don't pass both task: true and stream: true simultaneously — behavior is undefined.

See also

Async task queries · Qianfan