Skip to content

Type to search the docs and the model list.

Images

Generate and edit images.

POST /v1/images/generations returns image URLs on cdn.ewest.ai, kept for 7 days. Ask for "response_format": "b64_json" to also get the bytes.

Some models take extra options listed on their model page: aspect_ratio, resolution and quality. Models with image editing accept input images as image_urls (public https URLs), or as files on POST /v1/images/edits like OpenAI's images.edit.

Input images must be PNG, JPEG or WebP, up to 20 MB each when you upload them. Image addresses must be public https:// URLs; a base64 data URI is not accepted here. See Files for the limits, what the errors mean and how generated images are stored.

curl https://api.ewest.ai/v1/images/generations \
  -H "Authorization: Bearer $EWEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "ewest/flux-schnell", "prompt": "a cozy cabin in the snow"}'

# → {"data": [{"url": "https://cdn.ewest.ai/img/…"}]}