How do I render a carousel?

Render specific pages, batch a full carousel, or produce an image set from a single multi-page template.

Published ·Updated

Multi-page templates let you design multiple variations or slides within a single template. When generating images, you can render all pages at once or select specific ones.

How Multi-Page Works#

When your Studio template has multiple pages (e.g., a carousel, slide deck, or a set of variations), the API returns an array of images — one for each page.

JavaScript
const response = await fetch("https://api.orshot.com/v1/studio/render", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <YOUR_API_KEY>",
  },
  body: JSON.stringify({
    templateId: "<MULTI_PAGE_TEMPLATE_ID>",
    modifications: {
      "page1@title": "Slide 1: Introduction",
      "page2@title": "Slide 2: Features",
      "page3@title": "Slide 3: Pricing",
    },
    response: {
      format: "png",
      type: "url",
    },
  }),
});

Response#

The response returns a data array with one entry per page:

JSON
{
  "data": [
    { "page": 1, "pageId": "abc-123", "content": "https://storage.orshot.com/cloud/w-1/renders/images/page1.png" },
    { "page": 2, "pageId": "def-456", "content": "https://storage.orshot.com/cloud/w-1/renders/images/page2.png" },
    { "page": 3, "pageId": "ghi-789", "content": "https://storage.orshot.com/cloud/w-1/renders/images/page3.png" }
  ],
  "format": "png",
  "type": "url",
  "responseTime": 2410.52,
  "totalPages": 3,
  "renderedPages": 3
}

responseTime is in milliseconds.

Rendering Specific Pages#

Use response.includePages to render only the pages you need. This saves render credits and speeds up generation.

JSON
{
  "templateId": "<MULTI_PAGE_TEMPLATE_ID>",
  "modifications": {
    "page1@title": "Cover Slide",
    "page3@title": "Final Slide"
  },
  "response": {
    "format": "png",
    "type": "url",
    "includePages": [1, 3]
  }
}

This renders only pages 1 and 3, skipping page 2.

In the response, page is the position of the image in this response, not the template page number. Here the two images come back as page: 1 and page: 2. Use pageId to match each image to its template page.

Page-Specific Modifications#

Use the page{N}@ prefix to target elements on specific pages. This lets you customize each page independently.

JSON
{
  "modifications": {
    "page1@title": "Why Choose Us",
    "page1@subtitle": "Trusted by 10,000+ teams",
    "page1@background": "https://example.com/bg-blue.jpg",

    "page2@title": "Key Features",
    "page2@subtitle": "Everything you need to scale",
    "page2@background": "https://example.com/bg-purple.jpg",

    "page3@title": "Get Started Today",
    "page3@subtitle": "Start your free trial",
    "page3@background": "https://example.com/bg-green.jpg"
  }
}

You can also apply styles per page:

JSON
{
  "modifications": {
    "page1@title": "Dark Theme Slide",
    "page1@title.color": "#ffffff",
    "page1@canvasBackgroundColor": "#0f172a",

    "page2@title": "Light Theme Slide",
    "page2@title.color": "#1a1a1a",
    "page2@canvasBackgroundColor": "#ffffff"
  }
}

Generate a 5-slide Instagram carousel from a single template:

JavaScript
const slides = [
  { title: "5 Tips for Better Sleep", subtitle: "A quick guide" },
  {
    title: "Tip 1: Consistent Schedule",
    subtitle: "Go to bed at the same time every night",
  },
  {
    title: "Tip 2: Limit Screen Time",
    subtitle: "Put your phone away 1 hour before bed",
  },
  {
    title: "Tip 3: Cool Environment",
    subtitle: "Keep your room between 60-67°F",
  },
  { title: "Swipe for More", subtitle: "Follow us for daily tips" },
];

const modifications = {};
slides.forEach((slide, i) => {
  modifications[`page${i + 1}@title`] = slide.title;
  modifications[`page${i + 1}@subtitle`] = slide.subtitle;
});

const response = await fetch("https://api.orshot.com/v1/studio/render", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <YOUR_API_KEY>",
  },
  body: JSON.stringify({
    templateId: "<CAROUSEL_TEMPLATE_ID>",
    modifications,
    response: {
      format: "png",
      type: "url",
    },
  }),
});

const data = await response.json();
// data.data = array of 5 { page, pageId, content } entries

Global vs Page-Specific Modifications#

On a multi-page template, a content key without the page{N}@ prefix is not applied to any page. The response returns a warning that names the prefixed key to use. Send one prefixed key per page:

JSON
{
  "modifications": {
    "page1@brand_logo": "https://example.com/logo.png",
    "page2@brand_logo": "https://example.com/logo.png",
    "page1@title": "Page 1 Title",
    "page2@title": "Page 2 Title"
  }
}

Style keys are different. A bare dotted key such as title.color or title.fontSize applies to every page that has a title layer. The same goes for inline keys and canvas keys such as canvasBackgroundColor.

Flow Text (Automatic Multi-Page)#

If your template uses flowing content (text with textMode: "flow"), additional pages are created automatically based on how much text there is. You don't need to design each page — the flow engine handles page breaks.

The API request is the same as any render. The response includes all generated pages:

JSON
{
  "data": [
    { "page": 1, "pageId": "abc-123", "content": "https://..." },
    { "page": 2, "pageId": null, "content": "https://...", "sourcePageId": "abc-123", "sourcePageNumber": 1, "flowPage": 1 },
    { "page": 3, "pageId": null, "content": "https://...", "sourcePageId": "abc-123", "sourcePageNumber": 1, "flowPage": 2 }
  ],
  "totalPages": 3,
  "flowTotalPages": 2
}

Overflow pages have pageId: null. They include sourcePageId and sourcePageNumber (the template page they came from) and flowPage (which overflow page it is).

includePages picks pages from your template, not from the flow output. Each picked page that overflows still expands into all its flow pages.

Was this page helpful?

Ready to automate?

Start rendering images, PDFs and videos from your templates in under 2 minutes. Free plan, no credit card.

Get your API key
  • Image, PDF and video generation via API
  • Visual editor with AI and smart layouts
  • Zapier, Make, MCP and 40+ integrations
  • White-label embed for your own app
  • 100 free credits a month, no credit card required