v1

latestOpenAPI 3.1.02026-08-06244570.4 KB
Agent

Create a template with the authoring agent

Describe the image template you want; the TemplateFox agent authors it for you — valid HTML that renders deterministically AND stays editable in the visual editor, with every layer named and drivable through /v1/image/create modifications.

The job is asynchronous: poll GET /v1/agent/jobs/{job_id}. When completed, the response always includes a preview_url (rendered PNG) plus the template_id. Iterate with POST /v1/agent/templates/{template_id}/revise.

Authentication: API Key required (x-api-key header)

Credits

Creation costs 25 credits, deducted when the job is queued and fully refunded if the job fails.

Canvas

Pass a preset (instagram-square, instagram-story, og-image, twitter-card, pinterest-pin, square-512) or explicit width + height in px.

Rate Limits

Standard rate limits apply (60 req/min free, 120 req/min paid).

post/v1/agent/templates

Request body

instructionsstring required

What the template should look like and which layers it needs, in natural language.

namestring required

Template name

preset'instagram-square' | 'instagram-story' | 'og-image' | 'twitter-card' | 'pinterest-pin' | 'square-512' nullable

Canvas preset (or pass width + height)

widthinteger nullable

Canvas width in px

heightinteger nullable

Canvas height in px

Example request

{
  "brand": {
    "colors": [
      "#0C3C5F",
      "#E27D28"
    ]
  },
  "instructions": "OG image: navy background, white title layer, orange category chip, year bottom-right.",
  "name": "blog-og",
  "preset": "og-image"
}

Response

Job queued

job_idstring required
status'pending' required
credits_chargedinteger required
credits_remaininginteger required