SandBase is live — $1 in free credits on signupStart free ›
Use in agentBaidu models

Baidu modelsimage generation api

baidu/ernie-image

Ernie Image is Baidu's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.

Input
Text prompt for image generation. Supports English, Chinese, and Japanese.
The aspect ratio of the generated image. Allowed values: 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5, 3:4, 2:3, 9:16.
120
Classifier-free guidance scale. Range: 1 to 20.
1100
Number of denoising steps. Range: 1 to 100.
Output image format. Allowed values: jpeg, png.
Random seed for reproducibility.
Idle

Example output — click Run to generate your own

API README

Ernie Image

Ernie Image is Baidu’s high-detail text-to-image model for translating natural-language descriptions into photorealistic scenes, illustrations, and concept art. It combines prompt understanding with controlled composition and detailed rendering, allowing a creative brief to govern relationships, atmosphere, and visual finish.

Describe the central subject and action before introducing secondary elements, then define viewpoint, lighting, palette, material, mood, and artistic medium. It suits campaign concepts, editorial imagery, visualization, and illustration where a complete visual idea must be invented from language.

Highlights

  • Natural-language visual reasoning. Connects descriptive relationships and scene intent to visible composition.
  • Photorealistic detail. Renders material, texture, illumination, and spatial depth for realistic imagery.
  • Illustration and concept range. Moves across artistic media and design directions without a source image.
  • Prompt-aligned composition. Organizes primary and secondary elements around the hierarchy stated in the brief.

Pricing

Billing unitPrice
Per request$0.03

When to Use

✅ Good fit❌ Consider alternatives
The model's named workflow matches the source material and intended outputA different input modality or model route is required
A managed asynchronous result is suitable for the production pipelineA synchronous, interactive editor is essential
The documented controls cover the required duration, framing, or formatThe project needs controls outside this endpoint's schema
Creative iteration benefits from a repeatable request structureExact deterministic pixels, frames, geometry, or samples are mandatory
A finished downloadable media asset is the desired deliverableEditable source layers or a native project file are required

Prompt Guide

For generation, state the intended result first, then add the subject or source treatment, progression, style, and delivery constraints. Keep one creative variable per phrase, use the documented field names for controls, and change one setting at a time when comparing results.

{
  "aspect_ratio": "21:9",
  "output_format": "jpeg",
  "prompt": "A serene mountain landscape at sunset with golden light"
}

Technical Specs

SpecValue
Model IDbaidu/ernie-image
Inputsaspect_ratio, guidance_scale, num_inference_steps, output_format, prompt, seed
Required inputsprompt
Output fieldscontent_type, url
ExecutionAsync (submit, then poll for result)
Aspect Ratio21:9 / 16:9 / 3:2 / 4:3 / 5:4 / 1:1 / 4:5 / 3:4 / 2:3 / 9:16
Output Formatjpeg / png

Related Models

Related Models