Import a picture of an email
Converts a picture of an email (a screenshot or an export) into a new editable Brew email design. The picture is split into its own text, shape and image layers and laid out deterministically: every text is live text and every button a button. No model writes the email.
imageUrl must be a publicly reachable PNG, JPEG or WebP at most 2048 px wide. The request blocks until the design is saved, which takes 1 to 6 minutes depending on the height of the picture; set your client timeout accordingly. Converting the same image again within three weeks reuses its stored layers, returns in seconds and gives the same email.
conversion reports how the design was made. layers is the deterministic conversion and costs 90 credits. When the picture cannot be split into layers, or is taller than about 6,000 px, a model recreates it instead: conversion is model, the flat price is waived and the run is metered by model usage like generateEmail.
A picture carries no links, so every button and link in the result points to #. Set format to jsx (default) for React Email JSX or html for rendered email HTML. Optional groupId (grp_… or ungrouped) or groupName (resolve-or-create) — not both; omit to land Ungrouped.
Authorizations
Headers
The brand this request acts on. REQUIRED for organization-scoped credentials (otherwise 400 BRAND_ID_REQUIRED — there is no default brand); list ids with GET /v1/brands. Brand-scoped credentials may omit it, and sending a different brand returns 403 BRAND_SCOPE_MISMATCH. A brand outside your organization returns 404 BRAND_NOT_FOUND.
1 - 64Body
Response
The converted design was persisted and the requested source representation is returned in content.
layers: converted deterministically from the picture's own layers, every text and button live. model: the layer conversion was not possible for this picture and a model recreated it instead; metered as model usage, not the flat import price.
layers, model Was this page helpful?