Picking a Model
features.ai.model controls the preferred model for the AI Assistant's text
and chat — generating and editing copy, layouts, and design. It is
independent of features.ai.image.model,
which only affects AI image generation and editing.
Leave features.ai.model unset and Unlayer picks the best model per
request. Set it only when you need to pin a specific provider or model.
Pin a model
features.ai.model accepts:
- a
"<provider>/<modelId>"pair (e.g."openai/gpt-5.5","anthropic/claude-opus-4-7") — pins both provider and model, unambiguous; - a bare model id (e.g.
"gpt-5.5"); - a provider name (e.g.
"openai","anthropic") — starts on that vendor and lets Unlayer pick that provider's default model.
Pinned models are treated as the first choice for the request. If the selected model or provider is rate-limited, overloaded, unavailable, or returns another transient provider error before the user sees output, Unlayer may retry the turn against a backup model so the assistant can stay available during provider incidents.
unlayer.init({
features: {
ai: {
enabled: true,
assistant: true,
// Provider only — Unlayer picks that provider's default model:
model: 'anthropic',
// Or pin an exact model:
// model: 'openai/gpt-5.5',
},
},
});
Supported providers: openai, anthropic.
Configure fallback models
features.ai.fallbackModels controls the transient-outage fallback tail:
- omit it to use Unlayer's default fallback picks only when
features.ai.modelis unset; - set
trueto use Unlayer's default fallback picks even whenfeatures.ai.modelpins a provider or model; - set
falseto disable the default outage fallback tail; - pass an ordered model array to replace the default fallback picks.
Fallbacks are only used for provider availability failures such as network errors, overloads, rate limits, and 5xx responses. They are not used for invalid request bodies, invalid API keys, authorization errors, credit exhaustion, or errors that require a change from you or Unlayer.
unlayer.init({
features: {
ai: {
enabled: true,
assistant: true,
model: 'anthropic/claude-opus-4-7',
// Try these only if the preferred model has a transient outage:
fallbackModels: ['anthropic/claude-opus-4-6', 'openai/gpt-5.5'],
// Or use Unlayer's default outage tail after this pinned model:
// fallbackModels: true,
// Or disable default outage fallbacks:
// fallbackModels: false,
},
},
});
Quality vs. cost
If you do pin a model, here's how the tiers generally compare:
| Tier | Examples | Relative cost | Best for |
|---|---|---|---|
| Frontier | claude-opus-4-7, gpt-5.5 | Higher | Design-heavy work — generating or restyling templates. Strong visual taste and copy quality. |
| Mid-tier | claude-sonnet-4-6, gpt-5.5-mini | Standard | Solid all-rounder. Reasonable design awareness at mainstream rates. |
| Small / fast | claude-haiku-4-5, gpt-5.5-nano | Lower | Short text rewrites only. Avoid for design generation — tends to produce flat, low-taste layouts. |
Related
- Setup — how the assistant is enabled per project.
- Picking an image model — choose the model for AI image generation and editing.
- Custom OpenAI Key — bring your own OpenAI billing.
- Custom Claude Key — bring your own Anthropic billing.
- Pricing — how AI usage is billed.