Fill layers with AI when you render
Let AI write a text layer or make an image layer each time you render, translate a design's text, and choose what happens when AI fails.
An AI layer is a text or image layer that AI fills in each time you render. You write a prompt once, such as “Write a 6-word headline about our new coffee”, and each render gets new copy or a new picture. You can also have JamFrame translate all the text of a design while it renders.
AI layers use AI credits. They run in test renders, API renders and workflows, but not in dynamic URLs, signed URLs or forms (see Where AI runs).
Make an AI text layer
- Select a text layer.
- In the properties panel, find AI and tick Write this text with AI when rendering.
- In Prompt, say what to write, for example “Write a 6-word headline about
{{product}}”. - If you like, fill in the two options:
- Tone: how the text should sound, such as “friendly” or “professional”. Pick a suggestion or type your own, up to 60 characters.
- Max words: the longest the text may be, from 1 to 300 words. Longer answers are cut. Leave it empty for no limit.
- Click Preview to see a result (see Preview and the saved fallback).
- Click Save in the top bar.
Make an AI image layer
- Select an image layer.
- In the properties panel, find AI and tick Generate this image with AI when rendering.
- In Prompt, describe the picture, for example “A sunlit kitchen with
{{product}}on the counter”. - If you like, fill in the two options:
- Style: the look of the picture, such as “photo” or “flat illustration”, up to 120 characters.
- Reference image (optional): a public link to a picture. AI then changes this picture to match the prompt, instead of starting from nothing.
- Click Preview, then Save.
AI makes the picture at the shape closest to the layer’s box, such as 4:5 or 16:9, and then crops it to fill the box. The panel tells you which shape it uses.
You can also set up AI layers in Advanced settings, on the API tab.
Use other values in a prompt
A prompt can use the template’s other values with {{name}}. The buttons under Prompt insert them
for you. They list the template’s text keys and its variables.
Before AI runs, JamFrame fills in each name:
- With a variable’s value: the value the render sends, or else the sample value from the Variables tab.
- If there is no such variable, with the text of the text layer that has that key, after the render’s values are in.
A name with no value is left empty, and the render comes back with a warning.
You can also send a value for a name that appears only in a prompt. For example, with the prompt “Write a
6-word headline about {{product}}”, a render can send:
{
"product": "Cold brew"
}
product doesn’t have to be in any text. The API parameters list in Integrations, API & Forms
shows names like this one too.
Preview and the saved fallback
Preview in the AI section makes the text or picture once and shows it, with the AI credits it used. A render with the same prompt and values then reuses this result for free. Click Generate again for a new result. It costs AI credits again and replaces the old one.
The text or picture the layer has in the editor is its saved fallback. Renders use it wherever AI doesn’t run, and when AI fails if you ask for that. To keep a preview as the saved fallback, click Use as saved fallback under it.
The canvas always shows the saved fallback. AI runs only when you render.
Where AI runs
| Where you render | AI layers |
|---|---|
| Test render in the app | Filled by AI |
| API | Filled by AI |
| Workflows | Filled by AI |
| Dynamic URLs | Saved fallback |
| Signed URLs | Saved fallback |
| Forms | Saved fallback |
Links and forms are public, so anyone who has them could use your AI credits. That’s why AI never runs there.
Translate all the text
A render can also translate every visible text layer into one language. This works on any template, with
or without AI layers. Text that AI wrote is translated too. Links, e-mail addresses, @handles,
#hashtags, numbers and unfilled {{names}} stay as they are.
- In a test render: choose a language in Translate. No turns it off.
- With the API: send
"translate": trueand"lang": "es"at the top level of the request.langis a language tag, such ases,pt-BRorzh-Hant. Any language tag works, not only the ones the test render lists.
Translation follows the same rules as AI layers: it uses AI credits and doesn’t run in dynamic URLs, signed URLs or forms.
If AI fails
By default, the render fails when AI fails. The error code starts with AI_, for example
AI_CREDITS_EXCEEDED when your AI credits are used up. Nothing is charged: no render credits and no AI
credits. See Errors for the full list.
With the API, you can ask for the saved fallback instead. Send "ai": { "onError": "fallback" } at the
top level of the request. Then, when AI fails:
- AI layers show their saved fallback. Results AI already made for the same prompt and values are still used.
- The text is not translated.
- The answer has a warning that says why.
Test renders in the app always use the default and fail.
Limits
| Limit | Value |
|---|---|
| Prompt | 2,000 characters, and 3,000 once its {{names}} are filled in |
| Tone | 60 characters |
| Style | 120 characters |
| Max words | 1 to 300 |
| Different text prompts in one render | 50 |
| Different image prompts in one render | 10 |
| Text to translate in one render | 50,000 characters |
Every page and every size of one render count together. A render over a limit fails with an error before anything runs, and nothing is charged.
Credits and saved results
AI layers and translation use AI credits, which are separate from render credits. For what each one costs, see What AI features cost. You pay only when the render works. How many AI credits you get depends on your plan: see pricing.
JamFrame keeps each result for 30 days in your workspace. A render with the same prompt, the same values and the same options reuses the result and costs no AI credits.
With Smart Resize, every size of a render shares one result. A picture is made for the layer’s box in the original design and used in every size.
For developers
A render request can change an AI layer’s prompt and options with keys such as headline.prompt. The
layer needs a key for this. A plain value for the key, such as "headline": "Summer sale", skips the AI
and uses that value. The example request in Integrations, API & Forms already sends the prompt of
each AI layer. For every key, see AI at render time.
Related
- Give layers keys first: Choose what changes.
- Try an AI layer with real values: Test render.
- How AI credits work: Credits.
Last updated
Still stuck?
Email [email protected] and a real person will reply. Tell us the template you were using and what you expected to happen.