01 · Playgroundfal-ai/ernie-image
ERNIE-Image
01 · Access

Step intothe light.

To run ERNIE-Image live, add your fal API key. It stays in your browser, bills your own fal account, and unlocks every take.

Get a key
01PromptERNIE-Image

Add your fal key to step into the light

02 · Integration

Step intoproduction.

The playground up top is the same endpoint you ship to production. Three code paths below, one per stack, with the parameter index underneath.

endpoint fal-ai/ernie-image
output image
01TypeScript
01example.tsTS
01import { fal } from "@fal-ai/client";
02
03fal.config({ credentials: process.env.FAL_KEY });
04
05const { data } = await fal.subscribe("fal-ai/ernie-image", {
06 input: {
07 "prompt": "A vertical coffee shop poster. Large centered headline reads 'MORNING POUR' in b...",
08 "aspect_ratio": "1:1",
09 "num_images": 1,
10 "enable_prompt_enhancer": true,
11 "num_inference_steps": 50,
12 "seed": 0
13 },
14 logs: true,
15});
16
17console.log(data);
02Python
01example.pyPYTHON
01import fal_client
02
03result = fal_client.subscribe(
04 "fal-ai/ernie-image",
05 arguments={
06 "prompt": "A vertical coffee shop poster. Large centered headline reads 'MORNING POUR' in b...",
07 "aspect_ratio": "1:1",
08 "num_images": 1,
09 "enable_prompt_enhancer": true,
10 "num_inference_steps": 50,
11 "seed": 0
12 },
13 with_logs=True,
14)
15
16print(result)
03HTTP
01example.shBASH
01curl -X POST "https://queue.fal.run/fal-ai/ernie-image" \
02 -H "Authorization: Key $FAL_KEY" \
03 -H "Content-Type: application/json" \
04 -d '{ "prompt": "A vertical coffee shop poster. Large centered headline reads 'MORNING POUR' in b...", "aspect_ratio": "1:1", "num_images": 1, "enable_prompt_enhancer": true, "num_inference_steps": 50, "seed": 0 }'
04

Input parameters

KeyKindDefaultNotes
01prompttext (required)·Primary generation input.
02aspect_ratioselect1:11:1 square, 16:9 landscape, 9:16 portrait, 4:3 classic, 3:4 portrait, 3:2 photo, 2:3 book cover, 21:9 cinema
03num_imagesnumber11 to 4
04enable_prompt_enhancerselecttrueEnhancer on, Enhancer off
05num_inference_stepsnumber508 to 50
06seednumber00 to max

Full schema at fal.ai/models/fal-ai/ernie-image/llms.txt.

Also reading