Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: JamFrame Public forms API
version: 1.0.0
summary: Render images, carousels, PDFs and short videos from your templates.
description: 'The JamFrame REST API turns a template you designed in the JamFrame
editor into finished files: a PNG, JPEG or WebP image, a multi-page
carousel, a PDF, or an MP4 video of the animated pages. Send the
template id and the values to fill in; get back a URL (or base64) for
each file. Every request is authenticated with a per-workspace API key, created
from the **API Keys** page in the web app. ## Authentication
Send your key in the `Authorization` header as a bearer token:
```
Authorization: Bearer jf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```
The key is bound to a single workspace; you don''t need to pass a
workspace id separately. Keys are shown exactly once when you create
them: store them in a secrets manager, and rotate them by revoking and
recreating. ## Rendering in three steps
1. Find the template: `GET /designs` lists the workspace''s templates. 2. See what you can fill in: `GET /designs/{id}` returns the template''s
`parameters` (layer keys and `{{placeholders}}`) and page count. 3. Render it: `POST /render` with the template id and `modifications`. Templates from the **template library** (the ready-made designs in the
editor''s Templates tab) can be rendered the same way: pass the library
template''s id as `templateId`, and `GET /designs/{id}` returns its
parameters too. Credits are charged to your workspace, and the render
log records the library template''s id. ## File links
Rendered files are private. With `response.type: "url"` (the default)
each file comes back as a link that works for `expiresIn` seconds, a
top-level field of the render request: 300 (5 minutes) by default, at
most 604800 (7 days). `expiresAt`, next to `content`, says until when. A value outside that range is a `400 VALIDATION_ERROR`. - A render job keeps its `expiresIn`: every `GET /render-jobs/{id}`
answers fresh links that work for that long from then, and the
`render.*` webhook events and the `webhookUrl` callback carry links
signed when they are sent. - `GET /renders` and `GET /renders/{id}` answer fresh links that work
for 5 minutes. - Files are deleted **8 days** after the render, so a link never
outlives its file. - **Need a permanent link?** Use a Dynamic URL (below): it renders the
image when it is opened, serves it from the render cache afterwards,
and works for as long as you keep it on. ## Signed and dynamic URLs
Two ways to render from a plain link, with no API key in the page, for
an ``, an email or an `og:image`:
- **Signed URLs**: `POST /signed-urls` turns one render request into a
tamper-proof link that renders it when opened (and serves it from the
render cache afterwards, free). See `GET /r/s/{token}`. - **Dynamic URLs**: a template''s public link, switched on in the app''s
Integrations, API & Forms dialog, that renders from its query parameters:
`/r/d/{publicId}.png?headline=Hello`. It has a credit cap, a cache
time and an expiry. See `GET /r/d/{file}`. Both answer with the file''s bytes. A render costs credits as usual; a
request served from the render cache costs nothing. ## Smart Resize
One template renders at any size. `response.size` lays every page out
at another size: a size saved on the template in the editor''s
**Resize** tab (its id, listed in `GET /designs/{id}` as `sizes`, with
any manual adjustments), a size name (`story`, `square`, `portrait`,
`landscape`, `widescreen`, `thumbnail`, `pin`, or a preset id such as
`instagram-story` or `og-image`), `"WIDTHxHEIGHT"`, or `original`. A size the template hasn''t saved is laid out automatically: backgrounds
and photos fill the new canvas, edge decorations stay on their edge,
and the content is scaled and re-centred. `response.sizes` renders
several sizes in one call; `content` is then one entry per size,
`[{ size, url | urls }]`. Credits are 1 per page per size. ### Modification keys
| Key | Effect |
| --- | --- |
| `title` | Sets every layer whose parameter key is `title`, and every `{{title}}` placeholder in text.'
servers:
- url: https://api.jamframe.com/v1
description: Production
- url: http://localhost:3100/v1
description: Local development
security:
- bearerAuth: []
tags:
- name: Public forms
description: 'A template''s public self-serve form (`/f/` in the app),
made in the app''s Integrations, API & Forms dialog: anyone with the
link fills it in, sees a live preview and downloads the result. No
authentication: the public id is the credential, and renders spend the form owner''s
credits within the form''s credit cap. Served from the app''s origin
under `/api/public/forms` (not under `/api/v1`). Cloudflare Turnstile
is required on render and on a visit''s first upload when the server
has it configured (a production server without it refuses both with
`503 CAPTCHA_UNAVAILABLE`). Limits per minute: 120 requests per IP;
renders 10 per IP, 30 per form and 120 per workspace; uploads 20 per
IP (100 an hour) and 30 per form (300 an hour). Errors are
`PublicFormError`. See docs/forms.md.'
paths:
/api/public/forms/{publicId}:
servers:
- url: https://app.jamframe.com
description: Production (placeholder until the domain is final)
- url: http://localhost:3100
description: Local development
get:
tags:
- Public forms
operationId: getPublicForm
summary: Get a public form
security: []
description: 'The form''s visible fields, output and branding, and the template
data its live preview draws: the output''s pages at the output size,
without editor-only layer fields (names, locks, animations), the
placeholder values those pages use and the fonts. Nothing else of
the template or its owner. A form at its credit cap still answers
(`status: cap_reached`) so the page can say so.'
parameters:
- $ref: '#/components/parameters/FormPublicId'
responses:
'200':
description: The form.
content:
application/json:
schema:
$ref: '#/components/schemas/PublicForm'
'403':
$ref: '#/components/responses/PublicFormFailure'
'404':
$ref: '#/components/responses/PublicFormFailure'
'410':
$ref: '#/components/responses/PublicFormFailure'
'429':
$ref: '#/components/responses/PublicFormFailure'
/api/public/forms/{publicId}/render:
servers:
- url: https://app.jamframe.com
description: Production (placeholder until the domain is final)
- url: http://localhost:3100
description: Local development
post:
tags:
- Public forms
operationId: renderPublicForm
summary: Render a public form
security: []
description: 'Render the template with the visitor''s answers, keyed by field
(`key` in `GET /api/public/forms/{publicId}`). Text is trimmed (line
breaks kept only in long text), colours are `#rrggbb`, image and
file fields take a public `https://` URL or, for upload fields, the
`url` of an upload of this form. An empty optional answer keeps the
template''s value; keys that are not visible fields are ignored.
Costs 1 credit per page rendered, charged to the form owner and
counted toward the form''s credit cap (in the same transaction, so
concurrent submissions can''t overshoot it). The same answers again
within an hour are served from the render cache for free; the
response doesn''t say so (nor which render it was), so a visitor
can''t tell that someone else sent the same answers. Output size is
capped at 20 megapixels per page like the other public renders. A
body that isn''t JSON is `400 INVALID_REQUEST`; one over 256 kB is
`413 BODY_TOO_LARGE`.'
parameters:
- $ref: '#/components/parameters/FormPublicId'
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PublicFormRenderRequest'
example:
values:
headline: Grand opening
photo: https://example.com/shop.jpg
turnstileToken: 0.AbC…
responses:
'200':
description: The render's files.
content:
application/json:
schema:
type: object
required:
- render
properties:
render:
$ref: '#/components/schemas/PublicFormRender'
'400':
$ref: '#/components/responses/PublicFormFailure'
'402':
$ref: '#/components/responses/PublicFormFailure'
'403':
$ref: '#/components/responses/PublicFormFailure'
'404':
$ref: '#/components/responses/PublicFormFailure'
'410':
$ref: '#/components/responses/PublicFormFailure'
'413':
$ref: '#/components/responses/PublicFormFailure'
'415':
$ref: '#/components/responses/PublicFormFailure'
'422':
$ref: '#/components/responses/PublicFormFailure'
'429':
$ref: '#/components/responses/PublicFormFailure'
'500':
$ref: '#/components/responses/PublicFormFailure'
'503':
$ref: '#/components/responses/PublicFormFailure'
/api/public/forms/{publicId}/uploads:
servers:
- url: https://app.jamframe.com
description: Production (placeholder until the domain is final)
- url: http://localhost:3100
description: Local development
post:
tags:
- Public forms
operationId: uploadToPublicForm
summary: Upload an image to a public form
security: []
description: 'Upload an image for an upload field, then send its `url` as that
field''s answer. PNG, JPEG, WebP or GIF, decided from the file''s
bytes (SVG and anything else is refused), at most 10 MB, 10,000 px a
side and 40 megapixels. Uploads are kept 24 hours, then deleted;
they never appear in the owner''s brand library.
Accepted only while the form could render (on, unexpired, room under
its credit cap for one more render, credits left in the owner''s
account; `402` otherwise), and with a bot check: a Turnstile token
in `X-Turnstile-Token`, which earns an `uploadPass` in the response,
or that pass in `X-Upload-Pass` for the visit''s next uploads (10
within 30 minutes). At most 500 live uploads per form.'
parameters:
- $ref: '#/components/parameters/FormPublicId'
- in: query
name: field
required: true
description: The key of an upload field of the form.
schema:
type: string
- in: header
name: X-Turnstile-Token
required: false
description: A Turnstile token, when there is no upload pass yet (or it ran out).
schema:
type: string
- in: header
name: X-Upload-Pass
required: false
description: The `uploadPass.pass` an earlier upload of this visit returned.
schema:
type: string
requestBody:
required: true
content:
multipart/form-data:
schema:
type: object
required:
- file
properties:
file:
type: string
format: binary
responses:
'200':
description: The stored upload.
content:
application/json:
schema:
type: object
required:
- upload
properties:
upload:
$ref: '#/components/schemas/PublicFormUpload'
uploadPass:
type: object
required:
- pass
- expiresAt
description: Only when this upload spent a Turnstile token. Send `pass` as `X-Upload-Pass` with the visit's next uploads.
properties:
pass:
type: string
expiresAt:
type: string
format: date-time
'400':
$ref: '#/components/responses/PublicFormFailure'
'402':
$ref: '#/components/responses/PublicFormFailure'
'403':
$ref: '#/components/responses/PublicFormFailure'
'404':
$ref: '#/components/responses/PublicFormFailure'
'410':
$ref: '#/components/responses/PublicFormFailure'
'413':
$ref: '#/components/responses/PublicFormFailure'
'429':
$ref: '#/components/responses/PublicFormFailure'
'503':
$ref: '#/components/responses/PublicFormFailure'
/api/public/forms/{publicId}/files/{handle}:
servers:
- url: https://app.jamframe.com
description: Production (placeholder until the domain is final)
- url: http://localhost:3100
description: Local development
get:
tags:
- Public forms
operationId: getPublicFormFile
summary: Get a public form's result file
security: []
description: 'A file of a render made through this form, by the handle in its
`url` / `downloadUrl` (render response). Shown inline; with
`download=1`, as an attachment named after the form. Handles are
opaque, made afresh for each response and only valid on this form.
Files are deleted 7 days after the render (`410 FILE_EXPIRED`).'
parameters:
- $ref: '#/components/parameters/FormPublicId'
- in: path
name: handle
required: true
schema:
type: string
- in: query
name: download
required: false
description: '`1`: `Content-Disposition: attachment`.'
schema:
type: string
enum:
- '1'
responses:
'200':
description: The file.
headers:
Content-Disposition:
description: '`inline` (or `attachment` with `download=1`) and a file name from the form''s title.'
schema:
type: string
Cache-Control:
description: '`private, max-age=3600`.'
schema:
type: string
content:
image/png:
schema:
type: string
format: binary
image/jpeg:
schema:
type: string
format: binary
image/webp:
schema:
type: string
format: binary
application/pdf:
schema:
type: string
format: binary
'403':
$ref: '#/components/responses/PublicFormFailure'
'404':
$ref: '#/components/responses/PublicFormFailure'
'410':
$ref: '#/components/responses/PublicFormFailure'
'429':
$ref: '#/components/responses/PublicFormFailure'
components:
parameters:
FormPublicId:
in: path
name: publicId
required: true
description: The form's public id (the last part of its `/f/<publicId>` link).
schema:
type: string
pattern: ^[A-Za-z0-9_-]{16,64}$
schemas:
PublicFormRender:
type: object
required:
- format
- files
description: The render's files. Nothing says whether it came from the render cache or which render it was.
properties:
format:
type: string
enum:
- png
- jpeg
- webp
- pdf
files:
type: array
items:
type: object
required:
- url
- page
- downloadUrl
properties:
url:
type: string
format: uri-reference
description: The file, shown inline (`GET /api/public/forms/{publicId}/files/{handle}`), on the app's origin. A fresh handle per response.
page:
type:
- integer
- 'null'
downloadUrl:
type: string
format: uri-reference
description: The same file as an attachment (`url` with `?download=1`).
PublicFormField:
type: object
required:
- key
- kind
- input
- label
- help
- required
- options
- maxLength
- placeholder
properties:
key:
type: string
description: The answer's key in `values` (a parameter, or `parameter.prop` for a style field).
kind:
type: string
enum:
- text
- image
- color
- url
- choice
input:
type: string
enum:
- text
- textarea
- select
- upload
- url
- upload-or-url
- color
label:
type: string
help:
type: string
required:
type: boolean
options:
type: array
items:
type: string
description: The choices of a `select`.
maxLength:
type: integer
placeholder:
type: string
description: The template's own text (text fields), shown as the input's placeholder.
PublicFormUpload:
type: object
required:
- id
- url
- expiresAt
properties:
id:
type: string
url:
type: string
format: uri
description: The answer to send for the field.
expiresAt:
type: string
format: date-time
PublicForm:
type: object
required:
- form
- template
- appName
- turnstileSiteKey
properties:
form:
type: object
required:
- id
- title
- description
- status
- fields
- output
- branding
- uploads
properties:
id:
type: string
description: The public id.
title:
type: string
description:
type:
- string
- 'null'
status:
type: string
enum:
- active
- cap_reached
- unavailable
description: '`unavailable`: the server can''t take renders or uploads (no bot check configured).'
fields:
type: array
items:
$ref: '#/components/schemas/PublicFormField'
output:
type: object
required:
- format
- scale
- pages
- width
- height
properties:
format:
type: string
enum:
- png
- jpeg
- webp
- pdf
scale:
type: integer
enum:
- 1
- 2
pages:
type: array
items:
type: integer
width:
type: integer
height:
type: integer
branding:
type: object
required:
- logoUrl
- accentColor
properties:
logoUrl:
type:
- string
- 'null'
accentColor:
type:
- string
- 'null'
description: '#rrggbb'
uploads:
type: object
required:
- maxBytes
- accept
properties:
maxBytes:
type: integer
accept:
type: array
items:
type: string
template:
type: object
required:
- pages
- variables
- customFonts
description: What the live preview draws (the editor's template JSON, one page each).
properties:
pages:
type: array
items:
type: object
required:
- canvas
- elements
properties:
canvas:
type: object
additionalProperties: true
elements:
type: array
items:
type: object
additionalProperties: true
variables:
type: object
additionalProperties:
type: string
customFonts:
type: array
items:
type: object
additionalProperties: true
appName:
type: string
turnstileSiteKey:
type: string
description: Cloudflare Turnstile site key; empty when the check is off.
PublicFormError:
type: object
required:
- error
- message
description: The error body of the public form API. Short and generic on purpose.
properties:
error:
type: string
enum:
- NOT_FOUND
- FORM_DISABLED
- FORM_EXPIRED
- INVALID_VALUES
- INVALID_REQUEST
- CAPTCHA_FAILED
- CAPTCHA_UNAVAILABLE
- UPLOAD_INVALID
- UPLOAD_TOO_LARGE
- UPLOADS_UNAVAILABLE
- CREDIT_CAP_REACHED
- CREDITS_EXHAUSTED
- UNAVAILABLE
- MEDIA_UNAVAILABLE
- RATE_LIMITED
- BUSY
- RENDER_FAILED
- FILE_EXPIRED
- BODY_TOO_LARGE
- UNSUPPORTED_MEDIA_TYPE
message:
type: string
fields:
type: object
additionalProperties:
type: string
description: '`INVALID_VALUES` only: the problem with each field, by key.'
PublicFormRenderRequest:
type: object
required:
- values
properties:
values:
type: object
additionalProperties:
type: string
description: Answers by field key.
turnstileToken:
type: string
description: Required when the form's `turnstileSiteKey` is not empty.
responses:
PublicFormFailure:
description: 'A public form request that can''t be served, with `Cache-Control:
no-store`:
| Status | `error` | When |
| --- | --- | --- |
| 400 | `INVALID_VALUES` | An answer is missing or invalid (`fields` names each), or the output would be over the pixel cap. |
| 400 | `INVALID_REQUEST` | The body isn''t valid JSON (or couldn''t be read). |
| 400 | `CAPTCHA_FAILED` | The Turnstile token (or, on upload, the upload pass) is missing or was refused. |
| 400 | `UPLOAD_INVALID` | Not a PNG, JPEG, WebP or GIF, too many pixels, or not an upload field. |
| 402 | `CREDIT_CAP_REACHED` | The form''s credit cap is used up (uploads: no room for one more render). |
| 402 | `CREDITS_EXHAUSTED` | The owner''s workspace has no credits left. |
| 403 | `UNAVAILABLE` | The owner''s account is on hold or suspended. |
| 404 | `NOT_FOUND` | No such form, or its template was deleted, or not a file handle of this form. |
| 410 | `FORM_DISABLED` | The owner turned the form off. |
| 410 | `FORM_EXPIRED` | The form''s expiry has passed. |
| 410 | `FILE_EXPIRED` | The result file was deleted (7 days after the render). |
| 413 | `UPLOAD_TOO_LARGE` | The upload is over 10 MB. |
| 413 | `BODY_TOO_LARGE` | The JSON body is over 256 kB. |
| 415 | `UNSUPPORTED_MEDIA_TYPE` | The body uses an unsupported charset or encoding. |
| 422 | `MEDIA_UNAVAILABLE` | An image could not be loaded (or its host resolves to a private address). |
| 429 | `RATE_LIMITED` | Too many requests, too many uploads to this form, or the form''s renders keep failing and it is paused for a while (see `Retry-After`). |
| 500 | `RENDER_FAILED` | The render failed. |
| 503 | `BUSY` / `UPLOADS_UNAVAILABLE` / `CAPTCHA_UNAVAILABLE` | Too many renders in progress (see `Retry-After`), uploads are off, or the server has no bot check configured. |
'
content:
application/json:
schema:
$ref: '#/components/schemas/PublicFormError'
examples:
invalid:
value:
error: INVALID_VALUES
message: Some answers need attention.
fields:
headline: Required.
disabled:
value:
error: FORM_DISABLED
message: This form has been turned off.
cap:
value:
error: CREDIT_CAP_REACHED
message: This form has reached its limit.
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: jf_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
description: Bearer API key created on the web app's API Keys page.
x-tagGroups:
- name: Rendering
tags:
- Render
- Signed URLs
- Public URLs
- Public forms
- name: Templates
tags:
- Designs
- AI
- Figma import
- name: Automation
tags:
- Workflows
- Social
- Webhooks
- name: Account
tags:
- Auth