SiliconFlow ERNIE-Image API Complete Guide: The Fast Text-to-Image Service at $0.015/Image
Summary: SiliconFlow has officially launched Baidu's ERNIE-Image-Turbo model API at $0.015/image (¥0.11). This is the fourth third-party API platform for ERNIE-Image, following FAL.AI, Atlas Cloud, and WaveSpeed AI. This article covers everything from basic API calls to batch generation techniques and platform comparisons, helping you choose the best deployment option.
SiliconFlow Launches ERNIE-Image-Turbo
SiliconFlow has officially listed Baidu's ERNIE-Image-Turbo as its 163rd model on the platform. Notably, this deployment was completed independently by Baidu's ERNIE-Image team — leveraging SiliconFlow's elastic GPU service to significantly reduce the time from resource preparation to service launch.
According to SiliconFlow, the elastic GPU service provides an "out-of-the-box" production-level model deployment experience, greatly simplifying the process of deploying models into highly available inference service endpoints. This means ERNIE-Image-Turbo's powerful image generation capabilities can be quickly shared with the platform's tens of millions of users.
Key details:
- Model: ERNIE-Image-Turbo (8B parameters, 8-step inference)
- API price: ¥0.11/image (~$0.015/image)
- New user credit: ¥16 / $1
- Model ID:
baidu/ERNIE-Image-Turbo
Getting Started with API
SiliconFlow uses a standard OpenAI-compatible API format, making ERNIE-Image-Turbo calls straightforward.
Python Example
import http.client
import json
api_key = "your-siliconflow-api-key"
payload = {
"model": "baidu/ERNIE-Image-Turbo",
"prompt": "A cinematic photograph of a sunset on a city rooftop, a young woman wearing a khaki trench coat holding a camera",
"size": "1024x1024",
"n": 1
}
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
conn = http.client.HTTPSConnection("api.siliconflow.cn")
conn.request("POST", "/v1/images/generations",
body=json.dumps(payload), headers=headers)
response = conn.getresponse()
result = json.loads(response.read().decode())
print(result)
cURL Example
curl -X POST "https://api.siliconflow.cn/v1/images/generations" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "baidu/ERNIE-Image-Turbo",
"prompt": "A cinematic photograph of a sunset on a city rooftop",
"size": "1024x1024",
"n": 1
}'
Supported Parameters
| Parameter | Type | Description |
|---|---|---|
model |
string | Model ID: baidu/ERNIE-Image-Turbo |
prompt |
string | Positive prompt (supports Chinese and English) |
size |
string | Output size, recommended: 1024x1024, 1024x768, 768x1024 |
n |
integer | Number of images to generate, default 1 |
response_format |
string | Return format: url (default) or b64_json (Base64) |
Typical Use Cases
ERNIE-Image-Turbo on SiliconFlow is particularly well-suited for:
Poster Design: Complex text layouts and multi-element compositions — Turbo mode completes high-quality generation in 8 steps.
Comic Storyboarding: Character consistency and multi-panel layouts, where ERNIE-Image's structured layout capabilities excel.
Product Image Batch Production: E-commerce product photos and social media content — low latency directly translates to productivity gains.
Interactive Creation: Real-time creative workflows where 8-step inference latency makes the "prompt → visual result" cycle extremely smooth.
Comparison with Other API Platforms
| Platform | Price | Model Version | Features |
|---|---|---|---|
| SiliconFlow | ¥0.11/image | Turbo | Deployed by Baidu team, new user credit |
| FAL.AI | ~$0.015/image | Base/Turbo + LoRA | Supports cloud LoRA training |
| Atlas Cloud | Pay-per-use | Base/Turbo | Official API, batch production optimized |
| WaveSpeed AI | Commercial pricing | Base/Turbo | Enterprise deployment, batch generation API |
SiliconFlow's advantages include transparent pricing, a low barrier for new users with free credits, and service stability backed by the original model team.
Batch Generation Best Practices
For batch generation scenarios, SiliconFlow recommends:
- Control concurrency: Avoid too many simultaneous requests — 1-2 concurrent requests recommended
- Use URL response format: Default URL return is ideal for async processing
- Base64 format: Set
response_format: "b64_json"for direct app embedding - Size selection: Extreme aspect ratios reduce quality — stay close to 1:1 or 4:3
SiliconFlow's Model Ecosystem
SiliconFlow currently hosts 160+ models covering language, image, audio, and video tasks. Beyond ERNIE-Image-Turbo, it also supports Z-Image-Turbo, Qwen-Image, and other mainstream text-to-image models. Developers can flexibly call different models through a single API key, achieving "Token Freedom."
Sources: SiliconFlow official documentation, Zhihu column, Baidu Qianfan Community, SiliconFlow API documentation