Orshot Logo
OrshotDocs

Modifications

All about template modifications

The modifications parameter is an object that contains key-value pairs tailored for each specific templateId. The content and format of this object vary depending on the type of content generated by the chosen template. It allows you to customize various elements of the output by providing specific attributes as defined by the template.

Key Points

  • Type: Object
  • Structure: Consists of key-value pairs where each key represents a specific property required by the template, and its corresponding value is used to modify the output.
  • Usage: Customizes the output content, such as text, images, dimensions, and other stylistic properties.

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