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:
Both endpoints return the standard OpenAI image shape —
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:
Call
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
Unknown fields are forwarded to the provider unchanged.
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