Create an image template
create_templateCreate a JSXImage template from JSX source code and get a link to it. The link opens the template in the JSXImage playground with a live preview, and works for 7 days. No account is needed to create or open it.
You write the whole template as source code: a default-exported React function component styled with Tailwind classes in the class attribute (not className), plus export const options = { width, height, format }. export const props (every input and its default) is required. No imports, no hooks. To show live data from a public API (GitHub, Shopify products, npm, PyPI, Wikipedia, weather...), add export async function data(props), which can fetch and returns props. See the server instructions for the complete rules and an example. The code is checked before it is stored: if it fails, you get the error back and should fix the code and call again.
Design it like a senior designer, with none of the habits that make an image look AI-generated: one font family (two at most); aim for ONE text size for all text plus ONE big display size for the hero (a number or a headline), with hierarchy only from weight, color and spacing (three sizes at the very most); no small uppercase labels; no boxes around everything (one at most); a flat background, never a decorative gradient, glow or vignette, and no emoji (a fade behind text on a photo is the one gradient allowed); never text straight on a photo (darken it with an overlay or a fade at the bottom); Geist (built in) unless the brand has its own font, no thin weights, and tighter letter-spacing and line-height as text grows; double the whitespace you think you need, with outer margins at least as large as the gaps inside; colors taken from the brand's own site (its CSS, buttons or logo), never a default palette such as navy or slate with an orange accent, cream with terracotta, or black with acid green, and one accent used sparingly; a clear grid with generous margins; the brand's real logo when you have it; nothing under about 24px on a phone-sized image. These rules give way only when the user explicitly asks for something they forbid (a gradient, uppercase labels, a given color): then do what the user asked. The tool's reply flags these if it finds them: fix them with modify_template before giving the user the link, except what the user explicitly asked for.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"name": "<name>",
"code": "<code>"
},
"name": "create_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The complete template source: JSX with `export const props` (required: every input and its default), `type Props = typeof props`, `export default function Component(props: Props)` and `export const options = { width, height, format }`. Use `class`, not `className`. No imports, no hooks. | |
| name | Yes | A short title for the template, for example "Blog post cover". Up to 80 characters. |