Skip to content
JamFrame
Docs menu

Render at other sizes

Use response.size and response.sizes to render one template as a square post, a story, a banner or any other size, one size or several per call.

One template can render at any size. JamFrame lays the design out again for the new size, so you don’t design a story and a banner by hand. Ask for one size with response.size, or several sizes in one call with response.sizes.

To save sizes on a template and adjust their layout in the editor, see Smart Resize in the editor.

One size

Add size to response:

curl https://api.jamframe.com/v1/render \
  -H "Authorization: Bearer $JAMFRAME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "clx8m2k3p0001abcd1234efgh",
    "modifications": { "title": "Summer sale ends Sunday" },
    "response": { "format": "png", "size": "story" }
  }'
const res = await fetch("https://api.jamframe.com/v1/render", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.JAMFRAME_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    templateId: "clx8m2k3p0001abcd1234efgh",
    modifications: { title: "Summer sale ends Sunday" },
    response: { format: "png", size: "story" },
  }),
});
const { data } = await res.json();
console.log(data.content); // a 1080 × 1920 image
import os
import requests

res = requests.post(
    "https://api.jamframe.com/v1/render",
    headers={"Authorization": f"Bearer {os.environ['JAMFRAME_API_KEY']}"},
    json={
        "templateId": "clx8m2k3p0001abcd1234efgh",
        "modifications": {"title": "Summer sale ends Sunday"},
        "response": {"format": "png", "size": "story"},
    },
)
print(res.json()["data"]["content"])  # a 1080 x 1920 image

Every page renders at that size. The answer has the same shape as any render. size works with PNG, JPEG, WebP and PDF, with async, and in signed URLs.

What a size can be

JamFrame reads size in this order:

  1. A size saved on the template. Use its id from GET /v1/designs/{id}. You get the layout as you adjusted it in the editor.
  2. original: the template’s own size.
  3. Width and height, written WIDTHxHEIGHT, such as "1200x630". Each side can be 16 to 10000 px. × works in place of x.
  4. A size name or a preset id, from the tables below.
  5. The name of a saved size, such as "Web banner". Upper and lower case don’t matter.

If the template has a saved size with the same width and height as the size you ask for, JamFrame uses the saved one, with your adjustments. Otherwise it makes the layout itself: backgrounds and photos fill the new page, things on an edge stay on that edge, and the rest is scaled and centred.

A size that matches none of these is a 400. Its message lists the template’s saved sizes.

Size names

Name Size in px
square 1080 × 1080
portrait 1080 × 1350
story 1080 × 1920
landscape 1200 × 630
widescreen 1920 × 1080
thumbnail 1280 × 720
pin 1000 × 1500

Preset ids

These are the sizes in the editor’s size menu. Upper and lower case don’t matter.

Group Preset id and size in px
Instagram instagram-post 1080 × 1080, instagram-portrait 1080 × 1350, instagram-story 1080 × 1920, instagram-landscape 1080 × 566
Facebook facebook-post 1200 × 630, facebook-story 1080 × 1920, facebook-cover 851 × 315, facebook-event 1920 × 1080, facebook-ad 1200 × 628
X x-post 1200 × 675, x-header 1500 × 500
LinkedIn linkedin-post 1200 × 627, linkedin-square 1080 × 1080, linkedin-banner 1584 × 396, linkedin-carousel 1080 × 1350
YouTube youtube-thumbnail 1280 × 720, youtube-channel-art 2560 × 1440, youtube-shorts 1080 × 1920 (a Shorts cover image)
TikTok tiktok-cover 1080 × 1920 (a TikTok cover image)
Pinterest pinterest-pin 1000 × 1500, pinterest-story 1080 × 1920
Threads threads-post 1080 × 1350
Web and email og-image 1200 × 630, email-header 600 × 200
Display ads ad-medium-rectangle 300 × 250, ad-leaderboard 728 × 90
Print a4-portrait 794 × 1123, a4-landscape 1123 × 794, letter-portrait 816 × 1056, letter-landscape 1056 × 816

Several sizes in one call

Send a list in response.sizes:

{
  "templateId": "clx8m2k3p0001abcd1234efgh",
  "modifications": { "title": "Summer sale ends Sunday" },
  "response": { "format": "png", "sizes": ["original", "story", "square", "1200x630"] }
}

content then has one entry per size, in the order you asked:

{
  "data": {
    "content": [
      { "size": "original", "name": "Original", "width": 1080, "height": 1350, "pages": [1], "url": "https://cdn.jamframe.com/renders/…-s1.png?Expires=…" },
      { "size": "story", "name": "Story / Reel", "width": 1080, "height": 1920, "pages": [1], "url": "https://cdn.jamframe.com/renders/…-s2.png?Expires=…" },
      { "size": "square", "name": "Square", "width": 1080, "height": 1080, "pages": [1], "url": "https://cdn.jamframe.com/renders/…-s3.png?Expires=…" },
      { "size": "1200x630", "name": "1200×630", "width": 1200, "height": 630, "pages": [1], "url": "https://cdn.jamframe.com/renders/…-s4.png?Expires=…" }
    ],
    "expiresAt": "2026-11-14T12:05:00.000Z",
    "type": "url",
    "format": "png",
    "pages": [1],
    "credits": 4,
    "renderId": "clx8n0q1r0007abcd1234efgh",
    "responseTime": 5120
  }
}
Field What it holds
size The size as you sent it.
name The name of the saved size or preset, or Original.
width, height The size in px.
pages The template pages rendered at this size.
url The file, when this size is one file: a single image, or a PDF.
urls One link per page, in page order, when this size is a carousel.

Rules for sizes:

  • Ask for 1 to 10 sizes.
  • One call renders at most 30 pages in all: pages × sizes. A 3-page carousel in 10 sizes is 30, which is fine. A 5-page carousel in 7 sizes is 35, which is a 400.
  • List each size once. Two values that end up the same size, such as story and 1080x1920, are a 400.
  • sizes can’t go with size, async or "type": "base64".
  • The call works or fails as a whole. If one size fails, nothing is charged.

For more sizes or pages than that, send one request per size with response.size, with async if you like.

See a template’s saved sizes

GET /v1/designs/{id} lists the sizes saved on the template, in sizes:

{
  "design": {
    "id": "clx8m2k3p0001abcd1234efgh",
    "name": "Summer sale",
    "sizes": [
      { "id": "story", "name": "Story / Reel", "width": 1080, "height": 1920 },
      { "id": "landscape", "name": "Landscape 1.91:1", "width": 1200, "height": 630 }
    ]
  }
}

Send an id as response.size to use that saved layout. You can still ask for any size that isn’t saved.

Style keys at another size

Modification keys apply after the new layout. So x, y, width and height are in the new size’s pixels. A layer at "title.x": 100 sits 100 px from the left of the story, not of the original.

Credits and limits

  • One credit per page per size. A 3-page carousel in 2 sizes costs 6 credits.
  • Each page, at each size, can be at most 36 megapixels (width × height × scale²).

See Credits.

Last updated

Still stuck?

Email [email protected] and a real person will reply. Tell us the template you were using and what you expected to happen.