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

# Create preview

> A live preview page of a version or alias of a document, for showing a person. A version's preview never changes; an alias's follows it as it moves. The URL works for 12 hours.

MCP tool: [`create_preview`](/mcp/tools/documents#create_preview).



## OpenAPI

````yaml /api/openapi.json post /v1/documents/{document_id}/previews
openapi: 3.1.0
info:
  title: Rendermate API
  version: v1
servers:
  - url: https://api.rendermate.com
security:
  - api_key: []
tags:
  - name: Account
  - name: Workspaces
  - name: Projects
  - name: Documents
  - name: Links
  - name: Exports
  - name: Assets
  - name: Generations
  - name: Persons
  - name: Help
paths:
  /v1/documents/{document_id}/previews:
    post:
      tags:
        - Documents
      summary: Create preview
      description: >-
        A live preview page of a version or alias of a document, for showing a
        person. A version's preview never changes; an alias's follows it as it
        moves. The URL works for 12 hours.


        MCP tool: [`create_preview`](/mcp/tools/documents#create_preview).
      operationId: create_preview
      parameters:
        - description: The document to preview.
          in: path
          name: document_id
          required: true
          schema:
            description: The document to preview.
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                alias:
                  description: >-
                    An alias, such as `latest`; `latest` when neither this nor
                    `version` is given.
                  type: string
                version:
                  description: A version, by number.
                  format: uint64
                  minimum: 0
                  type: integer
              required: []
              type: object
        required: false
      responses:
        '201':
          content:
            application/json:
              example:
                document_id: doc_01JF3QZ8X6N2V7K4M9P5R1T3WY
                expires_at: '2026-12-03T22:15:00Z'
                target:
                  alias: latest
                token: >-
                  eyJhbGciOiJIUzI1NiJ9.eyJkb2MiOiJkb2NfMDFKRjNRWjhYNk4yVjdLNE05UDVSMVQzV1kifQ.Qm9vdGg…
                url: >-
                  https://rendermate.com/preview/doc_01JF3QZ8X6N2V7K4M9P5R1T3WY/latest#token=eyJhbGciOiJIUzI1NiJ9.eyJkb2MiOiJkb2NfMDFKRjNRWjhYNk4yVjdLNE05UDVSMVQzV1kifQ.Qm9vdGg…
              schema:
                properties:
                  document_id:
                    description: The document it previews.
                    type: string
                  expires_at:
                    description: RFC 3339.
                    type: string
                  target:
                    $ref: '#/components/schemas/Target'
                  token:
                    description: >-
                      The preview credential itself, for the document's events
                      feed (`?token=`).
                    type: string
                  url:
                    description: >-
                      The preview page on rendermate.com; the credential rides
                      in its fragment, so it never

                      reaches a server's logs.
                    type: string
                required:
                  - document_id
                  - target
                  - token
                  - expires_at
                  - url
                type: object
          description: Created
        '401':
          content:
            application/json:
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    error:
                      code: unauthorized
                      doc_url: https://rendermate.com/docs/errors#unauthorized
                      message: 'provide a valid API key: Authorization: Bearer sk_…'
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            - `unauthorized`: provide a valid API key: Authorization: Bearer
            sk_…
        '403':
          content:
            application/json:
              examples:
                key_without_workspace:
                  summary: key_without_workspace
                  value:
                    error:
                      code: key_without_workspace
                      doc_url: https://rendermate.com/docs/errors#key_without_workspace
                      message: >-
                        this API key has no workspace: create a key in the
                        dashboard, under api keys in the workspace it should act
                        in
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            - `key_without_workspace`: this API key has no workspace: create a
            key in the dashboard, under api keys in the workspace it should act
            in
        '404':
          content:
            application/json:
              examples:
                alias.not_found:
                  summary: alias.not_found
                  value:
                    error:
                      code: alias.not_found
                      doc_url: https://rendermate.com/docs/errors#alias.not_found
                      message: the document has no alias approved
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                version.not_found:
                  summary: version.not_found
                  value:
                    error:
                      code: version.not_found
                      doc_url: https://rendermate.com/docs/errors#version.not_found
                      message: 'no version 14: the newest is 12'
                      newest_version: 12
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: |-
            - `version.not_found`: no version 14: the newest is 12
            - `alias.not_found`: the document has no alias approved
        '500':
          content:
            application/json:
              examples:
                internal:
                  summary: internal
                  value:
                    error:
                      code: internal
                      doc_url: https://rendermate.com/docs/errors#internal
                      message: internal error
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: '- `internal`: internal error'
        '503':
          content:
            application/json:
              examples:
                preview.unavailable:
                  summary: preview.unavailable
                  value:
                    error:
                      code: preview.unavailable
                      doc_url: https://rendermate.com/docs/errors#unavailable
                      message: previews aren't available on this api yet
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: '- `preview.unavailable`: previews aren''t available on this api yet'
components:
  schemas:
    Target:
      description: >-
        A version of a document: one by number, or an alias, which points at one
        and can move. A

        preview of a version never changes; a preview of an alias follows it.
      oneOf:
        - additionalProperties: false
          properties:
            version:
              description: A version, by number.
              format: uint64
              minimum: 0
              type: integer
          required:
            - version
          type: object
        - additionalProperties: false
          properties:
            alias:
              description: >-
                An alias, such as `latest`; `latest` when neither this nor
                `version` is given.
              type: string
          required:
            - alias
          type: object
    Error:
      properties:
        error:
          properties:
            code:
              description: Stable, such as `asset.name_taken` or `not_available`.
              type: string
            doc_url:
              description: The code's entry on the Errors page.
              type: string
            message:
              description: What went wrong and what to do next.
              type: string
            request_id:
              description: >-
                The request's ID, also in its `x-request-id` header. Quote it
                when you contact support.
              type: string
          required:
            - code
            - message
            - doc_url
            - request_id
          type: object
      required:
        - error
      type: object
  securitySchemes:
    api_key:
      description: >-
        An API key from the dashboard, such as `sk_live_…`. It acts in its
        workspace.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.