Orshot Logo
OrshotDocs

POST: Render from Template

Learn how you can make a POST request to render from a template

You can render content from a template by making POST request to Orshot API

https://api.orshot.com/v1/generate/${renderType}

Available renderType options

  • images: To be used for all templates that generate images
  • pdfs: To be used for all templates that generate pdfs

You can refer to renderType value on template pages on Orshot e.g

POST Request

await fetch("https://api.orshot.com/v1/generate/images", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer <ORSHOT_API_KEY>",
  },
  body: JSON.stringify({
    templateId: "website-screenshot",
    response: {
      format: "png",
      type: "base64",
    },
    modifications: {
      websiteUrl: "https://pinterest.com",
      fullCapture: false,
      delay: 500,
      width: 1200,
      height: 1000,
    },
  }),
});

You can learn more about params:

SDKs

If you prefer, you can use our SDKs which give you abstracted functions to quickly render from templates

View Available SDKs

On this page