Browse ModelsWavespeed AIErnie Image Text To Image

Ernie Image Text To Image

Ernie Image Text To Image

Playground

Try it on WavespeedAI!

Baidu ERNIE Image generates high-quality images from text prompts in English, Chinese, and Japanese, with flexible sizing and LLM-enhanced prompt expansion. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

ERNIE Image Text-to-Image

ERNIE Image Text-to-Image is Baidu’s text-to-image model, generating high-quality images from natural language prompts. It supports prompts in English, Chinese, and Japanese — making it a strong choice for multilingual creative and production workflows.


Why Choose This?

  • Multilingual prompt support Write prompts in English, Chinese, or Japanese — the model understands all three natively for accurate, culturally relevant image generation.

  • Fast generation Generates images quickly — ideal for rapid iteration, high-volume workflows, and real-time applications.

  • Custom size output Specify any output dimensions to match your target format — social media, banners, portraits, or custom layouts.


Parameters

ParameterRequiredDescription
promptYesText description of the image. Supports English, Chinese, and Japanese.
sizeNoOutput dimensions in width×height pixels. Default: 1024×1024. Range: 256–1536 per side.

How to Use

  1. Write your prompt — describe the subject, scene, style, and mood in English, Chinese, or Japanese.
  2. Set size (optional) — specify output dimensions to match your target format.
  3. Submit — generate and download your image.

Pricing

Just $0.03 per image.


Best Use Cases

  • Multilingual content creation — Generate images from Chinese, Japanese, or English prompts for localized creative workflows.
  • Rapid prototyping — Quickly iterate on visual concepts with fast turbo-speed generation.
  • Social media & marketing — Produce on-brand visuals at custom sizes for any platform or format.
  • E-commerce — Generate product lifestyle and scene imagery at scale.
  • Developer integrations — Embed fast, multilingual image generation into apps and pipelines.

Pro Tips

  • Be specific in your prompt — include subject, style, lighting, and composition details for the most accurate results.
  • Chinese and Japanese prompts can be especially effective for culturally specific aesthetics and artistic styles.
  • Use custom size to match your exact delivery format rather than cropping after generation.

Notes

  • Only prompt is required; size is optional and defaults to 1024×1024.
  • Supported size range: 256–1536 pixels per dimension.
  • Please ensure your content complies with Baidu’s usage policies.

Authentication

For authentication details, please refer to the Authentication Guide.

API Endpoints

Submit Task & Query Result


# Submit the task
curl --location --request POST "https://api.wavespeed.ai/api/v3/wavespeed-ai/ernie-image/text-to-image" \
--header "Content-Type: application/json" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}" \
--data-raw '{
    "size": "1024*1024"
}'

# Get the result
curl --location --request GET "https://api.wavespeed.ai/api/v3/predictions/${requestId}/result" \
--header "Authorization: Bearer ${WAVESPEED_API_KEY}"

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-Text prompt describing the image. Supports English, Chinese, and Japanese.
sizestringNo1024*1024256 ~ 1536 per dimensionThe size of the generated image in pixels (width*height).

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayArray of URLs to the generated content (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.has_nsfw_contentsarrayArray of boolean values indicating NSFW detection for each output
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction, the ID of the prediction to get
data.modelstringModel ID used for the prediction
data.outputsstringArray of URLs to the generated content (empty when status is not completed).
data.urlsobjectObject containing related API endpoints
data.urls.getstringURL to retrieve the prediction result
data.statusstringStatus of the task: created, processing, completed, or failed
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2025 WaveSpeedAI. All rights reserved.