Logo

Orshot

Authentication Type: API Key
Description: Generate high-quality images and PDFs from templates using the Orshot API.


Studio

Generate images and PDFs from templates.

Render Template

Generate high-quality images or PDFs from a template with custom modifications. Supports PNG, PDF, WebP, and JPEG formats with customizable backgrounds, text, and images.

Operation Type: Mutation (Write)

Parameters:

  • templateId string (required): The template ID to use for rendering
  • modifications array of objects (nullable): List of modifications to apply to the template
    • key string: The modification key (e.g. canvasBackgroundColor, title, imageUrl)
    • value string: The modification value
  • responseType string (nullable): Response type: "base64" encoding or "url" (default: "url")
  • responseFormat string (nullable): Output format: "png", "pdf", "webp", or "jpeg" (default: "png")
  • responseScale number (nullable): Scale factor for the output image (default: 1)
  • pdfMargin string (nullable): PDF margin (applicable only if response format is pdf, e.g. "20px")
  • pdfRangeFrom number (nullable): PDF page range start (applicable only if response format is pdf, null for all pages)
  • pdfRangeTo number (nullable): PDF page range end (applicable only if response format is pdf, null for all pages)

Returns:

  • content string: The URL or base64 content of the rendered image
  • type string: The type of content returned ("url" or "base64")
  • format string: The format of the rendered content ("png", "pdf", "webp", or "jpeg")
  • responseTime number: Response time in milliseconds

Example Usage:

{
  "templateId": "tmpl_social_media_post_001",
  "modifications": [
    {
      "key": "canvasBackgroundColor",
      "value": "#1a73e8"
    },
    {
      "key": "title",
      "value": "New Product Launch!"
    },
    {
      "key": "subtitle",
      "value": "Introducing our revolutionary AI-powered solution"
    },
    {
      "key": "imageUrl",
      "value": "https://example.com/product-image.jpg"
    },
    {
      "key": "logoUrl",
      "value": "https://example.com/company-logo.png"
    },
    {
      "key": "callToAction",
      "value": "Learn More"
    }
  ],
  "responseType": "url",
  "responseFormat": "png",
  "responseScale": 2,
  "pdfMargin": null,
  "pdfRangeFrom": null,
  "pdfRangeTo": null
}

Common Use Cases

Social Media Marketing:

  • Generate branded social media posts with dynamic text, images, and backgrounds for consistent visual identity
  • Create promotional graphics for campaigns with customizable call-to-action buttons and product images
  • Produce platform-specific content variations by adjusting scale and format for different social media requirements

Marketing Materials and Branding:

  • Generate branded presentations, flyers, and marketing collateral with dynamic content and company branding
  • Create personalized certificates, awards, and recognition documents with variable recipient information
  • Produce consistent visual content across campaigns with template-based design modifications

E-commerce and Product Marketing:

  • Generate product showcase images with dynamic pricing, descriptions, and promotional messaging
  • Create personalized promotional materials for different customer segments and product categories
  • Produce catalog images and product sheets with consistent formatting and variable product information

Document Generation and Reporting:

  • Generate PDF reports and documents with custom charts, data visualizations, and branded formatting
  • Create invoices, statements, and business documents with dynamic content and professional layouts
  • Produce multi-page documents with selective page rendering and custom margins for print optimization