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
TS
1import { fal } from "@fal-ai/client";
2
3fal.config({ credentials: process.env.FAL_KEY });
4
5const { data } = await fal.subscribe("fal-ai/ernie-image", {
6 input: {
7 "prompt": "A vertical coffee shop poster. Large centered headline reads 'MORNING POUR' in b...",
8 "aspect_ratio": "1:1",
9 "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
PYTHON
1import fal_client
2
3result = fal_client.subscribe(
4 "fal-ai/ernie-image",
5 arguments={
6 "prompt": "A vertical coffee shop poster. Large centered headline reads 'MORNING POUR' in b...",
7 "aspect_ratio": "1:1",
8 "num_images": 1,
9 "enable_prompt_enhancer": true,
10 "num_inference_steps": 50,
11 "seed": 0
12 },
13 with_logs=True,
14)
15
16print(result)
03HTTP
BASH
1curl -X POST "https://queue.fal.run/fal-ai/ernie-image" \
2 -H "Authorization: Key $FAL_KEY" \
3 -H "Content-Type: application/json" \
4 -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