Orshot Logo
OrshotDocs

Response Format

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

The responseFormat parameter is a string value that defines the format in which the rendered output is generated. Depending on the template selected, available format options may differ. However, Orshot generally supports the following formats:

  • png
  • webp
  • jpg
  • jpeg
  • pdf

Key Points

  • Type: String
  • Purpose: Specifies the output format of the rendered content.
  • Usage: Ensure that the selected format is supported by both the template and your application requirements.

Example

const response = await Orshot.renderFromTemplate({
  templateId: "website-screenshot",
  responseType: "url",
  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,
  },
});

On this page