> ## Documentation Index
> Fetch the complete documentation index at: https://docs.batchrelay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a render from a published template

> Requires a studio-owned API account with the print_orders:write key scope. Accepts explicit stable slot IDs only. Omit revision_id to resolve the latest published revision; the response snapshots the resolved immutable revision. The service does not infer input order or fetch arbitrary caller URLs. Convex durably queues this job; the local API does not embed or dispatch the private renderer.



## OpenAPI

````yaml https://api.batchrelay.com/openapi.json post /v1/templates/{template_id}/renders
openapi: 3.1.0
info:
  title: Batch Relay API
  version: 1.0.0
  description: >-
    Provider-neutral print catalog and prepared-media validation. This document
    covers only routes owned by the Go service; it deliberately excludes
    migration-proxied order lifecycle routes and all provider payloads.
servers:
  - url: https://api.batchrelay.com
security: []
tags:
  - name: System
  - name: Catalog
  - name: Print orders
  - name: Managed assets
  - name: Template renders
  - name: API accounts
paths:
  /v1/templates/{template_id}/renders:
    post:
      tags:
        - Template renders
      summary: Create a render from a published template
      description: >-
        Requires a studio-owned API account with the print_orders:write key
        scope. Accepts explicit stable slot IDs only. Omit revision_id to
        resolve the latest published revision; the response snapshots the
        resolved immutable revision. The service does not infer input order or
        fetch arbitrary caller URLs. Convex durably queues this job; the local
        API does not embed or dispatch the private renderer.
      operationId: createTemplateRender
      parameters:
        - name: template_id
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 200
          description: >-
            Retries with the same key return the durable render job; reuse with
            a different request returns idempotency_conflict.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRenderCreateRequest'
      responses:
        '202':
          description: >-
            Render queued, running, succeeded, or failed. Artifacts are always
            an array so multi-surface output is representable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateRender'
        '400':
          $ref: '#/components/responses/InvalidRenderRequest'
        '401':
          $ref: '#/components/responses/APIKeyAuthenticationRequired'
        '403':
          $ref: '#/components/responses/APIKeyForbidden'
        '409':
          $ref: '#/components/responses/IdempotencyConflict'
        '413':
          $ref: '#/components/responses/RequestTooLarge'
        '422':
          $ref: '#/components/responses/TemplateRenderValidationFailed'
        '503':
          $ref: '#/components/responses/TemplateRenderUnavailable'
      security:
        - bearerAuth: []
components:
  schemas:
    TemplateRenderCreateRequest:
      type: object
      required:
        - output_id
        - inputs
      properties:
        revision_id:
          type: string
          description: >-
            Optional immutable template revision. When omitted, Batch Relay
            resolves the latest published revision and returns it in
            template.revision_id.
        output_id:
          type: string
          description: >-
            A published one- or multi-surface output selector, such as
            print-8x10-portrait or trader-card-double-sided. It owns the
            selected surface variants.
        inputs:
          type: object
          description: >-
            Explicit stable slot ID to value mapping. Labels and positional
            order are never interpreted by the API.
          additionalProperties:
            $ref: '#/components/schemas/TemplateRenderInput'
      additionalProperties: false
    TemplateRender:
      type: object
      required:
        - render_id
        - status
        - template
        - output_id
        - artifacts
        - created_at
        - updated_at
      properties:
        render_id:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - cancelled
        template:
          $ref: '#/components/schemas/TemplateRenderTemplate'
        output_id:
          type: string
        artifacts:
          type: array
          items:
            $ref: '#/components/schemas/TemplateRenderArtifact'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      additionalProperties: false
    TemplateRenderInput:
      type: object
      properties:
        asset_id:
          type: string
          description: >-
            An authorized opaque prepared/source asset identifier. The render
            service resolves it; callers cannot provide arbitrary URLs.
        value:
          type: string
          description: A text-like value for this slot.
      oneOf:
        - required:
            - asset_id
        - required:
            - value
      additionalProperties: false
    TemplateRenderTemplate:
      type: object
      required:
        - id
        - revision_id
        - template_engine_version
      properties:
        id:
          type: string
        revision_id:
          type: string
        document_hash:
          type: string
        template_engine_version:
          type: string
          const: 0.10.0
      additionalProperties: false
    TemplateRenderArtifact:
      type: object
      required:
        - surface_id
        - fulfillment_role
        - asset_id
        - pixel_width
        - pixel_height
      properties:
        surface_id:
          type: string
          description: The rendered surface, such as front, back, or print.
        fulfillment_role:
          type: string
          enum:
            - artwork
            - front
            - back
          description: Only final fulfillment-ready artwork surfaces are exposed.
        asset_id:
          type: string
        pixel_width:
          type: integer
          minimum: 1
        pixel_height:
          type: integer
          minimum: 1
        sha256:
          type: string
        resolved_orientation:
          type: string
          enum:
            - north
            - east
            - south
            - west
            - custom
          description: >-
            Optional bottom-center anchor direction when the surface contains
            exactly one resolved exact image slot.
      additionalProperties: false
    Error:
      type: object
      required:
        - error
        - code
        - message
        - docs_url
        - request_id
      properties:
        error:
          type: string
          description: Backward-compatible human-readable error.
        code:
          type: string
          description: Stable machine-readable error code.
        message:
          type: string
        docs_url:
          type: string
          format: uri
        request_id:
          type: string
      additionalProperties: false
  responses:
    InvalidRenderRequest:
      description: The render body was malformed or contained unknown fields.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    APIKeyAuthenticationRequired:
      description: A valid Batch Relay API key is required.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    APIKeyForbidden:
      description: The API key cannot perform this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    IdempotencyConflict:
      description: The idempotency key has already been used with a different request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RequestTooLarge:
      description: The body exceeded 2 MiB.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TemplateRenderValidationFailed:
      description: The render request did not provide explicit valid input slots.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TemplateRenderUnavailable:
      description: >-
        The stateful template store or private renderer bridge is not
        configured.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Batch Relay API key
      description: >-
        Batch Relay scoped API key, not OAuth. Scope names document required key
        capabilities.

````