Choose Auto, TokenLab Verified, or Official for each request, with prices shown up front. See what's new

Baidu: ERNIE-Image

ERNIE-Image is Baidu's 8B text-to-image model built on a single-stream Diffusion Transformer architecture. It is designed for strong prompt adherence, reliable text rendering, and structured visual generation, making it well suited to posters, comics, storyboards, multi-panel layouts, and other workflows where content accuracy and composition matter as much as aesthetics. The standard model emphasizes stronger general-purpose capability and instruction fidelity, typically running at around 50 inference steps.
Compare models
ernie-image
AvailableBaiduImageSync
Price
From $0.0038
Modalities
Image

About ERNIE-Image

ERNIE-Image is Baidu's open-weight text-to-image model, an 8-billion-parameter single-stream Diffusion Transformer paired with a lightweight prompt enhancer that expands short prompts. It is built for instruction following and for rendering long, dense, layout-sensitive text, which suits posters, infographics, comics, and multi-panel layouts. This is the standard model, typically run at about 50 steps.

Where it works well

  • Renders dense and lengthy text inside images, which Baidu's card highlights for posters, infographics, and UI-style visuals.
  • Follows complex multi-object instructions, so a prompt with several subjects and relationships tends to land where you placed them.
  • Handles structured layouts such as comics, storyboards, and multi-panel pages where composition matters as much as style.
  • The built-in prompt enhancer turns a brief request into a richer description before generation.

When to choose another model

  • It takes text prompts only; there is no image-edit or reference-image input on this model.
  • The standard model is slower than ERNIE-Image-Turbo because it runs many more denoising steps.
  • It is tuned for structured, text-heavy output, so choose a different model for photoreal portraits or painterly styles.

Getting started

  1. Create API key

    Create a key in Console, then use it with every model on the platform.

  2. Send your first request

    Copy the example for your language and run it against the endpoint.

    Text to imageTokenLab endpoint
    POST/v1/images/generations
    curl -X POST "https://api.tokenlab.sh/v1/images/generations" \
      -H "Authorization: Bearer sk-xxx" \
      -H "Content-Type: application/json" \
      -d '{
      "operation": "text-to-image",
      "model": "ernie-image",
      "prompt": "A minimalist product photo of matte black headphones on a soft blue background."
    }'

Parameters

Text to image

ParameterValues and limitsDefaultNotes
cfg_scale≥ 0, ≤ 20Not providedUse multiples of 0.01.
guidance_scale≥ 0, ≤ 20Not providedUse multiples of 0.01.
height≤ 20481024Use an integer. Use multiples of 16.
n11Use an integer.
operationNot providedNot providedNot provided
output_formatjpeg, png, webpNot providedDefault encoding is shared by these equivalent values: jpg, jpeg.
promptNot providedNot providedNot provided
seed≥ 0, ≤ 9007199254740991Not providedUse an integer.
steps≥ 15, ≤ 5030Use an integer.
width≤ 20481024Use an integer. Use multiples of 16.

Fields outside this contract are rejected.

Pricing

The Verified price applies to Verified, which costs less on most models. The Official price is the model maker's published price and applies to the more reliable Official route. Auto bills the route that completes the request.

Text to image

per request
Official price
$0.0038
Verified price
—
Discount
—

Usage & activity

Success rate is the share of requests that completed. Latency is how long a full response takes; P95 means 95% of requests finished within that time.

Usage & availability

Last 24 hours
Requests
Success rate
P95 latency
Total tokens
Model performance
Metrics appear once privacy and data volume thresholds are met.

Data is based on aggregate user requests, excluding status checks.

Open in Console

Open ERNIE-Image in Console with a prompt ready to edit or send.

Help me create an image with ernie-image using text-to-image at /v1/images/generations. Show the result, cost, and any limits I should know.

Use cases

Best for
  • Text to Image
  • Posters and infographics

    Generate a poster with a headline, subtitle, and bullet text placed in the layout you describe, then iterate on wording.

  • Comics and storyboards

    Produce multi-panel pages where each panel has its own scene and caption, keeping the panel structure from your prompt.

  • UI mock-up visuals

    Create app-screen style images with labels and buttons for pitch decks and concept reviews.

Prompt examples

A vertical concert poster, headline 'NIGHT MARKET LIVE' in bold red type, three bands listed below, and a lantern-lit street at the bottom.

A four-panel comic about a cat learning to code, with a short caption under each panel and a consistent character design.

An infographic titled 'How a Bill Becomes Law' with five numbered steps, each with a short label and a simple icon.

FAQ

What is ERNIE-Image and who makes it?

It is Baidu's text-to-image model with 8 billion parameters, built on a single-stream Diffusion Transformer. It is released under the Apache 2.0 license and aims at accurate instruction following and legible text, rather than only aesthetics.

How does ERNIE-Image render text?

Baidu's model card presents long, dense, layout-sensitive text as a standout capability, which is why posters, infographics, and UI-like images are its target. Check short quoted strings in your results, since any image model can still misspell some words.

What is the difference between ERNIE-Image and ERNIE-Image-Turbo?

ERNIE-Image runs about 50 inference steps and emphasizes general capability and instruction fidelity. ERNIE-Image-Turbo is a distilled variant that needs 8 steps, so it is much faster, and favors speed and polished aesthetics over the base model's fidelity.

Does ERNIE-Image edit existing images?

No. The catalog lists only text-to-image for this model. You supply a text prompt and get a new image. For editing or reference-based generation, choose an image model that lists edit operations.

How much does ERNIE-Image cost?

On TokenLab, ERNIE-Image costs $0.0038 per request. The pricing table above shows the full breakdown. Rates depend on the billing unit, specification, and usage. Compare matching conditions in the model's detailed pricing; a single rate does not determine the total cost.

Which endpoint should ERNIE-Image use?

Use https://api.tokenlab.sh/v1/images/generations for ERNIE-Image. The request example below shows the matching code shape.

Which operations does ERNIE-Image support?

ERNIE-Image supports Text to image. Select an operation above to see its endpoint and request example.

Compare ERNIE-Image

Sources

Reviewed Oct 2, 2026

More from Baidu

Related models