Response Type
Choose how you receive the output — hosted URL, Base64 string, or binary data
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.renderFromTemplate({
templateId: "your-template-id",
responseType: "url", // [!code highlight]
responseFormat: "png",
modifications: {
title: "Hello World",
},
});
// responseType: "url" returns:
// { content: "https://storage.orshot.com/renders/abc123.png" }
// responseType: "base64" returns:
// { content: "data:image/png;base64,iVBORw0KGgo..." }
// responseType: "binary" returns the raw file dataWhen 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.
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 50+ integrations
- White-label embed for your own app
- 60 free renders — no credit card required