---
title: "Create, edit and translate layouts with AI"
description: "Connect your own Claude or OpenAI key to generate, change and translate email layouts from a description."
canonical: "https://docs.workflow-transactional-email.app/create-layouts-with-ai"
---

# Create, edit and translate layouts with AI

Describe the email you want and let AI build the layout, change an existing one, or translate it. You use your own account with Anthropic (Claude), OpenAI, Google Gemini or OpenRouter, so there are no AI credits to buy in the app and you pay your provider directly.

## Connect a provider

1. Create an API key with the provider you prefer: [How to get an Anthropic (Claude) API key](https://docs.workflow-transactional-email.app/get-anthropic-api-key.md), [How to get an OpenAI API key](https://docs.workflow-transactional-email.app/get-openai-api-key.md), [How to get a Google Gemini API key](https://docs.workflow-transactional-email.app/get-gemini-api-key.md) or [How to get an OpenRouter API key](https://docs.workflow-transactional-email.app/get-openrouter-api-key.md).
2. In the app, open **Developer** and the **Connections** tab.
3. Paste the key into that provider's card and save. The key is checked with the provider first.
4. Pick the **Default model**. You can connect several providers and choose one each time you generate.

The key is encrypted and only used when you generate, edit or translate a layout. It is never shown again and never returned by the app's API.

## Create a layout

With a provider connected, **Create Email Layout** opens a **Create a layout with AI** window. Choose the editor (visual builder or rich text / HTML), describe the email, for example *an order confirmation with a thank-you heading, the order items and a button to track the order*, and click **Generate**. The draft fills the page; review it and **Save**.

## Edit a layout

The layout editor shows an **Edit with AI** bar. Describe a change, for example *add a line items table* or *make the tone friendlier*. The whole layout is updated in the editor; nothing is saved until you click **Save**, and **Discard** brings back what you had.

## Translate

In **Languages**, choose **Translate with AI** when adding a language. See [Send emails in your customer's language](https://docs.workflow-transactional-email.app/layout-languages.md).

> [!NOTE]
> **What is sent to the provider**
> The layout content you are working on and your request. No customer data, order data or email history is sent. The provider processes it under your own account and terms.

## Choosing a model and cost

The model list comes from your provider account, so new models appear without an app update. Each model with a known price shows an estimated cost **per generation** (a full layout), billed to your provider account, not your plan. Larger models write better designs and take longer.

| Provider | Good defaults | Models and prices |
| --- | --- | --- |
| Anthropic (Claude) | Claude Sonnet 5 (about $0.06 per layout), Claude Opus 5 for complex designs | <a href="https://platform.claude.com/docs/en/models/overview" target="_blank" rel="noopener">Models</a>, <a href="https://claude.com/pricing#api" target="_blank" rel="noopener">pricing</a> |
| OpenAI | GPT-5.6 Terra (about $0.07), GPT-5.6 Luna for low cost | <a href="https://developers.openai.com/api/docs/models" target="_blank" rel="noopener">Models</a>, <a href="https://openai.com/api/pricing/" target="_blank" rel="noopener">pricing</a> |
| Google Gemini | Gemini 3.8 Flash (about $0.02), Gemini 2.5 Pro | <a href="https://ai.google.dev/gemini-api/docs/models" target="_blank" rel="noopener">Models</a>, <a href="https://ai.google.dev/gemini-api/docs/pricing" target="_blank" rel="noopener">pricing</a> |
| OpenRouter | Any listed model; one key for many companies | <a href="https://openrouter.ai/models" target="_blank" rel="noopener">Models and prices</a> |

**OpenRouter** is the easiest way to try models from several companies with one key and one balance. If a model is not in the list, choose **Other model id** on the Developer page.

Models and prices change over time; the provider's pages are the reference.

## Good to know

- Generated layouts are checked like any layout: Liquid must be valid and only your own uploaded files can be used. The AI never picks images from your media library; add those yourself.
- Larger models take longer; a full layout can take a minute or two.
- A bad or expired key shows the provider's error when you generate.
- Prefer to work from your own assistant? Connect it over MCP and ask it to build layouts: see [Connect an AI assistant (MCP)](https://docs.workflow-transactional-email.app/developer-mcp.md).
