Reading
get_account
get_account
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.
list_templates
list_templates
Search the public template library. Returns each template’s id, size, orientation, fonts and export formats.
get_template
get_template
One template in full, including the named elements it exposes.
This is how an agent discovers element ids without opening the editor.
list_designs
list_designs
Your organization’s own saved designs, newest first.
list_brand_kits
list_brand_kits
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
duplicate_design
duplicate_design
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.
generate_image
generate_image
Apply modifications to a design and render it. Returns the finished file URLs.
Spends credits — one per image page, one per PDF.
generate_ai_image
generate_ai_image
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.Protocol errors
Protocol errors
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.Tool errors
Tool errors
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.