> ## 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 document

> Create a document: a video edit with versions, like a git repository. Starts empty (10 seconds of 1920x1080 at 30 fps), or from a whole document written as JSX: `export default (<timeline canvas={{...}} schemaVersion={...}>...</timeline>)`, where each node is an element whose tag is its type, with an id, its fields as attributes and its children inside. Times are seconds, colours "#rrggbb", and Doc.keys([seconds, value, easing], ...) is a keyframe curve. The JSX get_document returns starts with a comment that explains the whole notation (https://rendermate.com/docs/documents). Write the document out whole, without Doc.cut or Doc.more. edit_document's description shows how to write each kind of node and asset. To start from scratch, create the document empty, then edit it with jsx: the whole document, keeping the canvas get_document returned.

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



## OpenAPI

````yaml /api/openapi.json post /v1/documents
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:
    post:
      tags:
        - Documents
      summary: Create document
      description: >-
        Create a document: a video edit with versions, like a git repository.
        Starts empty (10 seconds of 1920x1080 at 30 fps), or from a whole
        document written as JSX: `export default (<timeline canvas={{...}}
        schemaVersion={...}>...</timeline>)`, where each node is an element
        whose tag is its type, with an id, its fields as attributes and its
        children inside. Times are seconds, colours "#rrggbb", and
        Doc.keys([seconds, value, easing], ...) is a keyframe curve. The JSX
        get_document returns starts with a comment that explains the whole
        notation (https://rendermate.com/docs/documents). Write the document out
        whole, without Doc.cut or Doc.more. edit_document's description shows
        how to write each kind of node and asset. To start from scratch, create
        the document empty, then edit it with jsx: the whole document, keeping
        the canvas get_document returned.


        MCP tool: [`create_document`](/mcp/tools/documents#create_document).
      operationId: create_document
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              properties:
                commit_id:
                  description: >-
                    A UUID that makes the create safe to send again: sent again
                    with the same one, it

                    answers with the document it made instead of making another.
                    The `Idempotency-Key`

                    header does the same.
                  type:
                    - string
                    - 'null'
                jsx:
                  description: >-
                    The whole document to start from, written as JSX

                    (https://rendermate.com/docs/documents): `export default
                    (<timeline canvas={{…}}>…</timeline>)`.

                    When absent, the document starts empty: 10 seconds of
                    1920×1080 at 30 fps.
                  type:
                    - string
                    - 'null'
                message:
                  description: The first commit's message.
                  type:
                    - string
                    - 'null'
                name:
                  description: >-
                    A name people recognize it by, such as "Q3 update"; at most
                    200 characters.
                  type:
                    - string
                    - 'null'
                project_id:
                  description: >-
                    The project to put it in, `prj_…`; the workspace's default
                    project when absent.
                  type:
                    - string
                    - 'null'
              required: []
              type: object
        required: false
      responses:
        '201':
          content:
            application/json:
              example:
                author:
                  id: api_key_01JF3Q1C5E7G9J2M4N6Q8S0T2W
                  name: ci
                  via: api
                commit_id: 0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10
                committed_at: '2026-12-03T10:15:00Z'
                id: doc_01JF3QZ8X6N2V7K4M9P5R1T3WY
                message: Shorten the intro
                sha256: >-
                  9f2c4e1a7b3d5f8e0c6a2b4d8f1e3c5a7b9d0f2e4c6a8b1d3f5e7c9a0b2d4f6e
                version: 12
              schema:
                properties:
                  author:
                    anyOf:
                      - $ref: '#/components/schemas/AuthorView'
                      - type: 'null'
                    description: The API key, or the member, that made it.
                  commit_id:
                    description: The commit that made the version.
                    type: string
                  committed_at:
                    description: RFC 3339.
                    type:
                      - string
                      - 'null'
                  id:
                    description: The document, `doc_…`.
                    type: string
                  jsx:
                    description: >-
                      The [Rendermate
                      document](https://rendermate.com/docs/documents) at this
                      version, written

                      as JSX; only when it's read, not when it's created or
                      committed. Edit it with

                      edit_document, giving this version as `base_version`.
                    type:
                      - string
                      - 'null'
                  message:
                    description: What the commit changes and why.
                    type:
                      - string
                      - 'null'
                  sha256:
                    description: SHA-256 of the document as canonical JSON.
                    type: string
                  version:
                    description: >-
                      The version's number: 1 for the document as created, one
                      more for each commit.
                    format: uint64
                    minimum: 0
                    type: integer
                required:
                  - id
                  - version
                  - commit_id
                  - sha256
                type: object
          description: Created
        '400':
          content:
            application/json:
              examples:
                document.invalid:
                  summary: document.invalid
                  value:
                    error:
                      code: document.invalid
                      diagnostics:
                        - code: version.missing
                          message: schemaVersion must be an unsigned integer
                          pointer: /schemaVersion
                      doc_url: https://rendermate.com/docs/errors#document.invalid
                      message: >-
                        the document isn't a valid Rendermate document:
                        version.missing: schemaVersion must be an unsigned
                        integer (/schemaVersion)
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                invalid_request:
                  summary: invalid_request
                  value:
                    error:
                      code: invalid_request
                      doc_url: https://rendermate.com/docs/errors#invalid_request
                      message: a document's name is at most 200 characters
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                jsx.cut:
                  summary: jsx.cut
                  value:
                    error:
                      code: jsx.cut
                      doc_url: https://rendermate.com/docs/errors#jsx.cut
                      message: >-
                        Doc.cut("a…", …) is not the string that was here: it
                        stands for a value the view cut, which is only known
                        where the view printed it: write the whole value, or
                        leave it where it was
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                jsx.unreadable:
                  summary: jsx.unreadable
                  value:
                    error:
                      code: jsx.unreadable
                      doc_url: https://rendermate.com/docs/errors#jsx.unreadable
                      message: |-
                        line 46, column 7: Unexpected token
                          46 | common={{duration: 2, order: "a0", start: 0}}
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            - `invalid_request`: a document's name is at most 200 characters

            - `jsx.unreadable`: line 46, column 7: Unexpected token   46 \|
            common=\{\{duration: 2, order: "a0", start: 0}}

            - `jsx.cut`: Doc.cut("a…", …) is not the string that was here: it
            stands for a value the view cut, which is only known where the view
            printed it: write the whole value, or leave it where it was

            - `document.invalid`: the document isn't a valid Rendermate
            document: version.missing: schemaVersion must be an unsigned integer
            (/schemaVersion)
        '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:
                project.not_found:
                  summary: project.not_found
                  value:
                    error:
                      code: project.not_found
                      doc_url: https://rendermate.com/docs/errors#project.not_found
                      message: no such project in this workspace
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: '- `project.not_found`: no such project in this workspace'
        '409':
          content:
            application/json:
              examples:
                commit_id.reused:
                  summary: commit_id.reused
                  value:
                    error:
                      code: commit_id.reused
                      doc_url: https://rendermate.com/docs/errors#commit_id.reused
                      message: the commit id was used for another change
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                document.exists:
                  summary: document.exists
                  value:
                    error:
                      code: document.exists
                      doc_url: https://rendermate.com/docs/errors#document.exists
                      message: the document already exists
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: |-
            - `document.exists`: the document already exists
            - `commit_id.reused`: the commit id was used for another change
        '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:
                commit.unknown:
                  summary: commit.unknown
                  value:
                    error:
                      code: commit.unknown
                      commit_id: 0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10
                      doc_url: https://rendermate.com/docs/errors#commit.unknown
                      message: >-
                        the document store failed before the commit could be
                        confirmed: send the same request again with commit_id
                        0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10 to learn whether it
                        was made
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
                documents.unavailable:
                  summary: documents.unavailable
                  value:
                    error:
                      code: documents.unavailable
                      doc_url: https://rendermate.com/docs/errors#unavailable
                      message: this deployment does not store documents yet
                      request_id: req_0193f2a4c1d87b2e9f3a6c5d4e8b7a10
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            - `commit.unknown`: the document store failed before the commit
            could be confirmed: send the same request again with commit_id
            0193f2a4-c1d8-7b2e-9f3a-6c5d4e8b7a10 to learn whether it was made

            - `documents.unavailable`: this deployment does not store documents
            yet
components:
  schemas:
    AuthorView:
      description: Who made a version.
      properties:
        client:
          description: >-
            The program that sent it, from its User-Agent, such as
            `claude-code`.
          type:
            - string
            - 'null'
        id:
          description: The API key (`api_key_…`) or the member (`user_…`).
          type: string
        name:
          description: The API key's name, or the member's, when it made the version.
          type:
            - string
            - 'null'
        via:
          description: 'How the change came in: `api`, `dashboard` or `mcp`.'
          type:
            - string
            - 'null'
      required:
        - id
      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.