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#
| Type | Returns | Best For |
|---|---|---|
url | A hosted URL to the file | Web apps, sharing links, storing references |
base64 | Base64-encoded string | Embedding in emails, inline display |
binary | Raw file binary data | Direct file downloads, saving to disk |
Example#
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 dataWith the REST API, response.type defaults to base64 when you leave it
out. The SDKs default to url. Set it explicitly to be safe.
When using url, the image is hosted on Orshot's storage and accessible via
the returned link. When using binary, the response is the raw file — use it
with file system APIs to save to disk.
For multi-page templates (including templates with flowing content that generates overflow pages), binary is only supported when response.format is pdf. For non-PDF multi-page renders, use url or base64.
Video and GIF formats (mp4, webm, gif, mov, mkv) only support
response.type: "url" — base64 and binary are not available for these
formats.
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