Generate images through a single API — with automatic routing across Volcengine Seedream, Baidu Qianfan, and Alibaba Bailian.

Endpoint and authentication

ItemValue
Generation endpointPOST https://51kik.com/v1/image/v1/generations
Task queryGET https://51kik.com/v1/image/v1/tasks/:task_id
AuthenticationAuthorization: Bearer <API-Key> (use your API key)
Content-Typeapplication/json

Quick example

curl -X POST https://51kik.com/v1/image/v1/generations \
  -H 'Authorization: Bearer sk-xxxxxxxx' \
  -H 'Content-Type: application/json' \
  -d '{"model": "doubao-seedream-5-0-260128", "prompt": "An orange cat", "size": "1024x1024"}'
{
  "created": 1719000000,
  "data": [{ "url": "https://..." }],
  "usage": { "images": 1, "total_tokens": 4096 }
}

SDK usage (recommended)

import { RouterBrain } from '@router-brain/sdk';
const rb = new RouterBrain('sk-your-api-key');

// One-shot generation
const result = await rb.image({
  model: 'doubao-seedream-5-0-260128',
  prompt: 'An orange cat',
  size: '1024x1024'
}).json();
console.log(result.data[0].url);

// Streaming
const stream = await rb.image({
  model: 'doubao-seedream-5-0-260128',
  prompt: '...',
  stream: true
}).stream();

// Async task polling
const task = await rb.image({
  model: 'wanx-v1',
  prompt: '...',
}).task({ pollInterval: 2000 });
console.log(task.data[0].url);

Provider comparison

ProviderExample modelsBillingStreamingImage-to-imageAsync mode
seedreamdoubao-seedream-*Per imageYesYes, multi-image fusionNo
qianfanstable-diffusion-xlPer imageNoNoNo
bailianwanx-v1 / qwen-image-*Per imageNoYesYes

qianfan and bailian do not support streaming. Passing stream: true will return an error.

Next steps

Request parameters → provider-specific pages in the sidebar