Back to models
ERNIE-Image
Baidu's 8B single-stream Diffusion Transformer text-to-image model under Apache 2.0 with an integrated prompt enhancer, excelling at dense bilingual typography, infographics, and multi-panel storyboard layouts.
What you can do
- Text-dense posters and infographics
- Multi-panel comic and storyboard art
- UI concept mockups and store signage
Input & output
- Input
- Chinese or English prompts describing layouts, storyboards, or embedded text
- Output
- Structured high-resolution images with accurate Chinese/English text and multi-panel layouts
Try a prompt like this
A four-panel retro sci-fi comic strip with bilingual speech bubbles showing an engineer repairing a lunar rover antenna during a meteor shower.
Things to know
Apache 2.0 licensed and fits on a 24GB GPU (~18–22GB VRAM in BF16); 50-step base inference prioritizes fidelity—use `ERNIE-Image-Turbo` when 8-step low latency is required.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/images/generations- Model repo ID
PaddlePaddle/ERNIE-Image
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
result = client.images.generate(
model="PaddlePaddle/ERNIE-Image",
prompt="A four-panel retro sci-fi comic strip with bilingual speech bubbles showing an engineer repairing a lunar rover antenna during a meteor shower.",
size="1024x1024",
)
print(result.data[0].url)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide