Kolors Image Generation
Kuaishou Kolors model — ultra-low-cost image generation with Chinese and English prompt support, multiple aspect ratios, and batch generation. Ideal for high-volume generation and testing.
Try it Online
Quick Start
python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="Kwai-Kolors/Kolors",
prompt="An orange tabby cat sitting on a windowsill watching the rain, watercolor style, warm tones",
size="1024x1024",
n=1
)
print(response.data[0].url)Endpoint
| Item | Value |
|---|---|
| Method | POST |
| Path | /v1/images/generations |
| Base URL | https://open.dieyuyun.com |
| Protocol | OpenAI Images API |
Authentication
Bearer Token: Authorization: Bearer YOUR_API_KEY
Standard Request Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Model ID: Kwai-Kolors/Kolors |
| prompt | string | Yes | — | Image description (CN/EN supported) |
| size | string | No | 1024x1024 | Image dimensions (width×height) |
| n | integer | No | 1 | Number of images (range 1-4) |
Supported Sizes
| Size | Ratio |
|---|---|
1024x1024 | 1:1 |
768x1024 | 3:4 |
1024x768 | 4:3 |
720x1280 | 9:16 |
1280x720 | 16:9 |
Extended Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| negative_prompt | string | No | — | Unwanted elements description |
| seed | integer | No | — | Random seed for reproducibility (0-9999999999) |
| num_inference_steps | integer | No | 20 | Inference steps — more = higher quality (1-100) |
| guidance_scale | number | No | 7.5 | Prompt adherence strength (0-20) |
Request Examples
bash
curl https://open.dieyuyun.com/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "Kwai-Kolors/Kolors",
"prompt": "An orange tabby cat sitting on a windowsill watching the rain, watercolor style, warm tones",
"size": "1024x1024",
"n": 1
}'python
from openai import OpenAI
client = OpenAI(
base_url="https://open.dieyuyun.com/v1",
api_key="YOUR_API_KEY"
)
response = client.images.generate(
model="Kwai-Kolors/Kolors",
prompt="An orange tabby cat sitting on a windowsill watching the rain, watercolor style, warm tones",
size="1024x1024",
n=1
)
print(response.data[0].url)javascript
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://open.dieyuyun.com/v1',
apiKey: 'YOUR_API_KEY',
})
const response = await client.images.generate({
model: 'Kwai-Kolors/Kolors',
prompt: 'An orange tabby cat sitting on a windowsill watching the rain, watercolor style, warm tones',
size: '1024x1024',
n: 1,
})
console.log(response.data[0].url)Response Format
Success Response
json
{
"created": 1717000000,
"data": [
{
"url": "https://..."
}
],
"usage": {
"generated_images": 1,
"total_tokens": 0
}
}| Field | Type | Description |
|---|---|---|
| created | integer | Unix timestamp |
| data | array | Generated results array |
| data[].url | string | Image URL |
| usage | object | Usage statistics |
| usage.generated_images | integer | Number of generated images |
| usage.total_tokens | integer | Total tokens consumed |
Error Response
See Error Codes.
Key Features
Ultra-Low Cost
At just ¥0.01 per image, Kolors is the most affordable image generation model on the platform — perfect for high-volume generation and testing.
Batch Generation
Generate up to 4 images per request with the n parameter, ideal for comparing multiple variations.
python
response = client.images.generate(
model="Kwai-Kolors/Kolors",
prompt="Modern minimalist living room design",
size="1024x1024",
n=4
)
for img in response.data:
print(img.url)Fine-Grained Control
Use guidance_scale and num_inference_steps to precisely tune generation quality:
python
response = client.images.generate(
model="Kwai-Kolors/Kolors",
prompt="Cyberpunk city at night",
size="1280x720",
guidance_scale=12.0,
num_inference_steps=50
)Best Practices
- Batch generation: Use
nto generate multiple candidates and pick the best one. - Negative prompts: Use
negative_promptto exclude unwanted elements, e.g. "low quality, blurry, deformed". - Prompt tips: Supports mixed Chinese and English prompts. The more specific the description, the better the result.
- Reproducibility: Save the
seedvalue to reproduce similar results for iterative refinement. - Step tuning: Default 20 steps is sufficient for most cases. Increase to 50-100 for higher quality.
Rate Limits
See Rate Limits.
Related Docs
- Doubao Seedream 5.0 Lite - High-quality generation with web search
- BFL FLUX - BFL FLUX official model
- Model List & Pricing - Browse available models and pricing