Templated Renders API

The Renders API from Templated — 3 operation(s) for renders.

OpenAPI Specification

templated-renders-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  title: Templated Renders API
  description: REST API for automated image, video, and PDF generation from reusable templates. Render templates by overriding layer content, synchronously or asynchronously, and retrieve templates and renders.
  termsOfService: https://templated.io/terms/
  contact:
    name: Templated Support
    url: https://templated.io/
  version: '1.0'
servers:
- url: https://api.templated.io/v1
security:
- bearerAuth: []
tags:
- name: Renders
paths:
  /render:
    post:
      operationId: createRender
      tags:
      - Renders
      summary: Create a render
      description: Generates an image, PDF, or video from a template by applying layer overrides. Renders are synchronous by default (around 2 seconds); set async to true to render in the background and receive a webhook callback on completion.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRenderRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Render'
        '401':
          description: Unauthorized
        '422':
          description: Unprocessable Entity
  /render/{id}:
    get:
      operationId: getRender
      tags:
      - Renders
      summary: Retrieve a render
      description: Retrieves a single Render object referenced by its unique ID.
      parameters:
      - name: id
        in: path
        required: true
        description: The unique ID of the render.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Render'
        '401':
          description: Unauthorized
        '404':
          description: Not Found
    delete:
      operationId: deleteRender
      tags:
      - Renders
      summary: Delete a render
      description: Deletes a Render object referenced by its unique ID.
      parameters:
      - name: id
        in: path
        required: true
        description: The unique ID of the render.
        schema:
          type: string
      responses:
        '200':
          description: OK
        '401':
          description: Unauthorized
        '404':
          description: Not Found
  /renders:
    get:
      operationId: listRenders
      tags:
      - Renders
      summary: List all renders
      description: Lists Render objects in the account with pagination.
      parameters:
      - name: page
        in: query
        description: Pagination page number.
        schema:
          type: integer
          default: 0
      - name: limit
        in: query
        description: Number of results per page.
        schema:
          type: integer
          default: 25
      - name: externalId
        in: query
        description: Filter renders by external ID.
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Render'
        '401':
          description: Unauthorized
components:
  schemas:
    Render:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the render.
        status:
          type: string
          description: Processing state of the render.
          enum:
          - PENDING
          - COMPLETED
          - FAILED
        url:
          type: string
          description: URL where the rendered output is stored.
        width:
          type: integer
          description: Output width in pixels.
        height:
          type: integer
          description: Output height in pixels.
        format:
          type: string
          description: Output file format.
        templateId:
          type: string
          description: ID of the source template.
        templateName:
          type: string
          description: Name of the source template.
        name:
          type: string
          description: User-assigned name for the render.
        externalId:
          type: string
          description: Associated external identifier.
        createdAt:
          type: string
          description: Timestamp of render creation.
    CreateRenderRequest:
      type: object
      properties:
        template:
          type: string
          description: ID of the template to render. Required unless templates is provided.
        templates:
          type: array
          description: Array of template IDs for batch rendering. Overrides template when present.
          items:
            type: string
        layers:
          type: object
          description: Layer modifications to apply, keyed by layer name.
          additionalProperties: true
        pages:
          type: array
          description: Page-specific layer modifications for multi-page templates.
          items:
            type: object
            additionalProperties: true
        format:
          type: string
          description: Output format.
          enum:
          - jpg
          - png
          - webp
          - pdf
          - mp4
          - html
          default: jpg
        transparent:
          type: boolean
          description: Make the PNG background transparent.
          default: false
        width:
          type: integer
          description: Custom output width in pixels (100-5000).
        height:
          type: integer
          description: Custom output height in pixels (100-5000).
        duration:
          type: integer
          description: Video duration in milliseconds (max 90000).
        fps:
          type: integer
          description: Frames per second for video output (1-60).
        merge:
          type: boolean
          description: Merge multi-page renders into a single PDF.
        zip:
          type: boolean
          description: Bundle multiple renders into a ZIP archive.
        name:
          type: string
          description: Custom name for the render.
        external_id:
          type: string
          description: External identifier to associate the render with an entity in your system.
        async:
          type: boolean
          description: Render asynchronously in the background instead of synchronously.
          default: false
        webhook_url:
          type: string
          description: URL the full Render object is POSTed to when an async render completes.
      required:
      - template
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: The API key must be included in all requests in the Authorization header as a Bearer token. Obtain an API key from the account dashboard at app.templated.io.