Skip to main content

Image Generation

Emby supports image-generation models through the same OpenAI-compatible /v1/chat/completions API you already use for text.
If your app already supports OpenAI image responses, it works with Emby automatically.
Generated images are returned as base64-encoded data URLs inside the assistant response.

Available Models

You can view all image-generation capable models directly from:
Models such as qwen2.5-vl, glm-vision, deepseek-vision, and others support both generation and vision editing workflows.

Generate an Image

Image generation works exactly like a normal chat request — just choose a vision-enabled or image-generating model.

Response Format

Emby returns image results using the standard OpenAI-style structure:
The important part is the images array: Image Item Structure
  • type: always "image_url"
  • image_url.url: base64-encoded data:image/... URL

Vision Support (Editing & Modifying Images)

You can send an image to the model for editing, analysis, or transformation.
Simply include a type: "image_url" or type: "file" object inside the messages.
Example:
Emby vision models can:
  • Edit images
  • Describe images
  • Extract text
  • Generate variations
  • Combine text + image tasks

Using the Emby AI SDK (Full Example)

Below is a clean, ready-to-copy example using the Emby AI SDK provider.

/api/chat/route.ts


Rendering in Your Frontend

Below is a minimal, Emby-cleaned version of image rendering logic:

Image Utils (Compatible With Emby)


Usage Notes

Larger Payloads

Image responses are base64-encoded, so response sizes can be large.

Higher Compute Cost

Image models typically use more compute than text-only models.

Streaming Support

Emby can stream text; image parts arrive once the model finishes synthesis.

EU Hosting

All Emby-hosted vision models run inside EU data centers (bit.nl + Nebius AMS).

Need help integrating image generation? WhatsApp us: https://wa.absolum.nl
Book a call: https://cal.com/absolum/30min