Skip to main content
Each tool is the REST endpoint of the same name, called in-process. It gets the endpoint’s validation, its plan gate, its credit accounting and its line in your request log — so an agent and your backend work against one contract, and neither can drift from the other.

Reading

The organization the key belongs to, its plan, and credits used and remaining in the current billing period.No arguments. Worth calling before a long batch of renders.
Search the public template library. Returns each template’s id, size, orientation, fonts and export formats.
One template in full, including the named elements it exposes.This is how an agent discovers element ids without opening the editor.
Your organization’s own saved designs, newest first.
Your brand kits — logos, colors and fonts.Values come back ready to use: every entry in colors is a hex value fill takes, every entry in images is a URL src takes.

Writing

Copy a template or design into your organization as a new editable design, and return the new id.Only needed when the layout should be kept and reused. Rendering a template does not change it, so a one-off render does not need this first.
Apply modifications to a design and render it. Returns the finished file URLs.Spends credits — one per image page, one per PDF.
Render a design after generating its image element from a text prompt.Spends credits for both the AI run and the render.

Modifications

generate_image and generate_ai_image take an array of modifications. Each one addresses an element by id, and the fields combine — one object can change a headline’s text, fill and stroke at once.

Errors

The server distinguishes two kinds of failure, and the distinction matters for how an agent recovers.
A malformed call — an unknown tool, or arguments that fail validation — comes back as a JSON-RPC error with a reserved code (-32601, -32602). The call never reached the API. Agents usually stop here, which is correct: the client is wrong.
Anything the API itself rejects — a design that does not exist, a plan without API access, an exhausted credit allowance — comes back as a successful JSON-RPC response whose result is marked isError, carrying the API’s own message.This is deliberate: the model reads the message and can act on it — pick a different design, or tell you the allowance is gone — rather than giving up on a protocol failure.