Skip to main content
Unlisted page
This page is unlisted. Search engines will not index it, and only users having a direct link can access it.

Picking an Image Model

features.ai.image.model controls which model powers AI image generation and editing — Magic Image and the image editor's AI chat. It is independent of features.ai.model, which only affects the assistant's text/chat model.

Recommended: let Unlayer pick

Leave features.ai.image unset and Unlayer picks the best image model for you. Set it only when you need to pin a specific provider or model.

Pin a model

features.ai.image.model mirrors features.ai.model. It accepts:

  • a "<provider>/<modelId>" pair (e.g. "openai/gpt-image-2", "google/gemini-3.1-flash-image-preview") — pins both provider and model, unambiguous;
  • a bare model id (e.g. "gpt-image-2");
  • a provider name (e.g. "openai", "google") — locks the vendor and lets Unlayer pick that provider's default image model.
unlayer.init({
features: {
ai: {
enabled: true,
assistant: true,

image: {
// Provider only — Unlayer picks that provider's image model:
model: 'openai',

// Or pin an exact model:
// model: 'openai/gpt-image-2',
// model: 'google/gemini-3.1-flash-image-preview',

// Quality tier (low | medium | high). Defaults to 'medium'.
// quality: 'high',
},
},
},
});

Supported providers: google (Gemini) and openai (gpt-image-1.5, or gpt-image-2). An unsupported model is rejected.

Quality vs. cost

If you do pin a model, here's how the options generally compare:

ModelProviderRelative costBest for
openai/gpt-image-2OpenAIHigherHighest-fidelity generations — opt in explicitly.
openai/gpt-image-1.5OpenAILowerFaster generations and transparent PNGs.
google/gemini-3.1-flash-image-previewGoogleStandardStrong all-rounder for generation and editing.

The quality tier (low | medium | high) applies to every provider — higher tiers cost more. It's mapped internally (OpenAI → quality tier, Gemini → 1K/2K/4K resolution).