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:

Image Formats

  • png
  • webp
  • jpg
  • jpeg
  • pdf

Video Formats

  • mp4 - Standard video format with H.264 encoding
  • webm - Web-optimized video format with VP9 encoding
  • gif - Animated GIF (no audio support)

Video formats are only available for templates that contain video elements. The output duration is determined by the video element's duration and trim settings.

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