How do I receive the rendered file?

Three options: a hosted URL, a Base64 string, or raw binary. The REST API defaults to base64; URL is the cheapest to handle.

Updated

The responseType (or response.type in the Studio API) controls how Orshot delivers the rendered output back to you.

Available Types#

TypeReturnsBest For
urlA hosted URL to the fileWeb apps, sharing links, storing references
base64Base64-encoded stringEmbedding in emails, inline display
binaryRaw file binary dataDirect file downloads, saving to disk

Example#

JavaScript
const response = await orshot.renderFromStudioTemplate({
  templateId: 12345,
  modifications: {
    title: "Hello World",
  },
  response: {
    type: "url", // [!code highlight]
    format: "png",
  },
});

// type: "url" returns:
// { data: { content: "https://storage.orshot.com/renders/abc123.png", ... } }

// type: "base64" returns:
// { data: { content: "data:image/png;base64,iVBORw0KGgo...", ... } }

// type: "binary" returns the raw file data
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