Getting started

Quick start

Five steps. You will have your first ERNIE-Image result in the next minute.

  1. Sign up for a fal key. Create one at fal.ai/dashboard/keys. Copy it now; you will not see it again.
  2. Export it. export FAL_KEY=fal_... in your shell, or add it to a .env.local. Never commit it.
  3. Pick a snippet. The three below hit the same endpoint (fal-ai/ernie-image) with a minimal input derived from the default parameter set.
  4. Run it. The first call takes a few seconds; subsequent ones are faster. You get a response URL pointing at a image.
  5. Iterate. Try the playground to see a chat-style interface, or jump to the API reference for every parameter.
First call
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' i...","aspect_ratio":"1:1","num_images":1,"enable_prompt_enhancer":true,"num_inference_steps":50,"seed":0}'
Also reading