Overview
Some LLMs can produce images directly as part of a chat response — no separate endpoint required. Instead of calling a dedicated image API, you send a normal chat completion request and the model returns a base64-encoded image in the assistant message. The main image-capable LLM available through Eden AI is Google’s Gemini Flash Image family:| Model | Model string | Provider |
|---|---|---|
| Gemini 2.5 / 3.1 Flash Image | google/gemini-2.5-flash-image, google/gemini-3.1-flash-image-preview |
- Text-to-image — generate an image from a prompt
- Image editing — modify a provided input photo
Image-capable LLMs are different from Expert Model image generation — which wraps dedicated image APIs like DALL-E or Stable Diffusion. Use LLM image generation when you want the model to reason about the prompt and output an image in the same turn.
Google Gemini Image Models
Gemini image models accept a standard text prompt plus an optionalimage_config block that controls the output resolution and aspect ratio.
Text-to-image
Supported image_config values
| Field | Description | Allowed values |
|---|---|---|
aspect_ratio | Output shape | 1:1, 16:9, 9:16, 4:3, 3:4, 21:9, 2:3, 3:2, 4:5, 5:4, 1:4, 4:1, 1:8, 8:1 |
image_size | Output resolution | 512 (Gemini 3.1 Flash only), 1K, 2K, 4K |
Image editing (with input photo)
Pass an existing image to the model alongside your edit instruction. Use the standard OpenAI multimodal content format:Response Format
The generated image is returned as a base64-encoded data URL inside the assistant message content.Saving the image to disk
Next Steps
Expert Image Generation
Use dedicated image APIs like DALL-E or Stable Diffusion
Chat Completions
Standard text chat completions reference