Create a template
Creates version 1 and answers 201 with it. name, html, width and height are required. html ≤ 256 KB and css ≤ 128 KB (UTF-8 bytes), width / height 1–4096 px; anything outside is 400 invalid_param naming the field. variables defaults to the {{ … }} names found in the html and css. Each account may own at most 200 templates (422 resource_limit_exceeded).
Rendering is POST /api/v1/jobs {"op": "render_template", "templateId": …, "items": [...]}, or one row now with POST /api/v1/images/render.
Request
- Base URL: https://api.imagestep.dev
- URL: https://api.imagestep.dev/api/v1/templates
- Auth: API key in header Authorization
Headers
Optional. A client-generated unique key (typically a UUID). Same key + the same request (method, path, query string and body) replays the first response verbatim with Idempotency-Replayed: true, without executing again. Same key + a different one returns 409 idempotency_key_reuse. A repeat that arrives while the first is still running returns 409 request_in_progress, which is retryable. Keys are retained 24 hours. At most 255 characters; a longer one is a 400 invalid_param with param: "Idempotency-Key".
Request body
Example request
{
"name": "Quote card",
"width": 1080,
"height": 1350,
"html": "<main><blockquote>{{ quote }}</blockquote><cite>{{ author }}</cite></main>",
"css": "main{display:grid;place-items:center;height:100%;font-family:system-ui}",
"variables": [
"quote",
"author"
]
}Response
The template, at version 1
Changes
No recorded changes to this operation across all 1 revision of this API.