https://api.edenai.run/v3 and the images API works as a drop-in replacement.
Overview
Image models are served by dedicated image endpoints — not the chat completions endpoint:| Method | Path | Purpose |
|---|---|---|
POST | /v3/images/generations | Generate one or more images from a text prompt |
POST | /v3/images/edits | Edit an existing image with a prompt (optional mask) |
GET | /v3/images/models | List the image models available in your region |
data: [{ url \| b64_json }] — plus Eden’s cost (USD) and provider fields.
This is different from Expert Model image generation, which wraps Eden’s feature API for providers like DALL-E and Stable Diffusion. Use the
/v3/images endpoints when you want an OpenAI-compatible, drop-in image surface.Models
The image surface spans many providers. A few common model strings:| Provider | Model string |
|---|---|
google/gemini-2.5-flash-image, google/gemini-3-pro-image-preview, google/imagen-4.0-generate-001 | |
| OpenAI | openai/gpt-image-1, openai/gpt-image-1-mini |
| Stability | stabilityai/sd3.5-large |
| Amazon | amazon/amazon.nova-canvas-v1:0 |
GET /v3/images/models for the full, region-aware list (image models also appear in GET /v3/models, so the OpenAI SDK’s client.models.list() returns them too).
Generating images
base_url:
Request parameters
| Field | Required | Description |
|---|---|---|
model | yes | provider/model, e.g. google/gemini-2.5-flash-image |
prompt | yes | Text description of the image to generate (1–32,000 chars) |
n | no | Number of images to generate (1–10) |
size | no | Output resolution, e.g. 1024x1024, 1536x1024, auto. Allowed values depend on the model |
quality | no | standard, hd, auto — accepted values depend on the model |
response_format | no | url or b64_json, forwarded to providers that honor it |
Response format
Saving the image to disk
Some providers return a hosted
url instead of inline b64_json. Download the image if you want to keep it, since those URLs can expire.Editing images
POST /v3/images/edits takes the same fields as generations plus an images array. Each entry sets exactly one of file_id (returned by Eden’s /v3/upload/... endpoints) or image_url (an https:// URL or a data:image/...;base64,... URL). An optional mask (same shape) marks the regions to edit.
The endpoint dispatches on Content-Type: send application/json for the images[] form below, or multipart/form-data for the classic OpenAI SDK file-upload form.
image_url with an https:// URL works for providers that accept remote URLs (e.g. Gemini). For openai/gpt-image-*, pass a data: URL or upload the file via /v3/upload/... and reference it by file_id instead — those models do not accept remote URLs.Listing image models
cURL
Limitations
- No streaming.
stream: trueis forwarded to the provider but the partial-image pipeline is not wired up. - No
@edenairouter orfallbacks. Specify a single explicitprovider/model. /v3/images/variationsis not implemented.
Next Steps
Expert Image Generation
Use Eden’s feature API for DALL-E, Stable Diffusion, and more
Chat Completions
Standard text chat completions reference