Response Type

Learn about different response types supported in Orshot API and how you can use them

The responseType parameter defines the type of output for the rendered content. Available options differ based on the selected template; however, the general available options are:

  • url: Returns a URL where the rendered output is stored on Orshot.
  • base64: Returns a string containing the base64-encoded version of the rendered content.
  • binary: Returns the binary content of the file, allowing users to transform and use it as needed.

Key Points

  • Type: String
  • Purpose: Specifies the output format type, not to be confused with the file format specified by responseFormat.
  • Usage: Choose the output type that matches your application's requirements.

Example

const response = await Orshot.renderFromTemplate({
  templateId: "website-screenshot",
  responseType: "url", // [!code highlight]
  responseFormat: "webp",
  modifications: {
    testimonialText:
      "Pika has converted me from any other screenshot tool I used before (happily)",
    testimonialFontSize: 42,
    rating: 3,
    authorPhoto: "https://cdn.pika.style/headshots/caleb.png",
    authorName: "Caleb Leigh",
    authorDescription: "Head of Marketplace, Elgato",
    authorMetaFontSize: 40,
    width: 800,
  },
});

All Set? Let's Start Automating

Get Your API Key →
  • Image, PDF and Video Generation via API
  • Canva like editor with AI and smart features
  • No-Code Integrations (Zapier, Make, n8n etc.)
  • Embed Orshot Studio in your app
  • Start Free. No credit card required. Cancel anytime.