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

# Change a workspace

> Make one new version of a workspace from its current one: text files written whole (`write`), find-and-replace edits (`patch`, each `find` must occur exactly once), other files by hash (`files`, missing ones get a PUT link), `delete`, or `restore` an earlier bundle. Send `expected_bundle` (from `graphics_list`) and a workspace that moved on answers 409 with nothing changed. Up to 200 changes a call. Files are stored, never run. Free. See [Motion graphics](https://docs.vidjutsu.ai/guides/motion-graphics#edit-scenes-in-a-workspace).



## OpenAPI

````yaml /openapi/spec.json post /graphics/workspaces/{workspace}
openapi: 3.1.0
info:
  title: VidJutsu Cloud API
  version: '2026-11-03'
  description: >-
    Video editing built for agents: upload takes, edit a timeline with history,
    and render it on cloud machines. The same operations are MCP tools at
    https://api.vidjutsu.ai/mcp.
servers:
  - url: https://api.vidjutsu.ai
security:
  - bearer: []
tags:
  - name: Sign-up and sign-in
  - name: Account
  - name: API keys
  - name: Billing
  - name: Media
  - name: Uploads
  - name: Projects
  - name: History
  - name: Shot list
  - name: Layouts
  - name: Audio
  - name: Look and check
  - name: Motion graphics
  - name: Live updates
  - name: Comments
  - name: Renders
  - name: Publishing
  - name: Status
paths:
  /graphics/workspaces/{workspace}:
    post:
      tags:
        - Motion graphics
      summary: Change a workspace
      description: >-
        Make one new version of a workspace from its current one: text files
        written whole (`write`), find-and-replace edits (`patch`, each `find`
        must occur exactly once), other files by hash (`files`, missing ones get
        a PUT link), `delete`, or `restore` an earlier bundle. Send
        `expected_bundle` (from `graphics_list`) and a workspace that moved on
        answers 409 with nothing changed. Up to 200 changes a call. Files are
        stored, never run. Free. See [Motion
        graphics](https://docs.vidjutsu.ai/guides/motion-graphics#edit-scenes-in-a-workspace).
      operationId: graphics_write
      parameters:
        - description: >-
            A graphics workspace name: 1 to 80 letters, digits, - or _ (yours to
            pick).
          in: path
          name: workspace
          required: true
          schema:
            type: string
        - name: VidJutsu-Version
          in: header
          required: false
          description: >-
            The API version you wrote your integration against, a date. Without
            it you get the latest version. The current version is `2026-11-03`.
            See https://docs.vidjutsu.ai/api-reference/introduction#versioning.
          schema:
            type: string
            pattern: ^\d{4}-\d{2}-\d{2}$
            example: '2026-11-03'
        - name: Idempotency-Key
          in: header
          required: false
          description: >-
            Makes a write safe to retry: the same key returns the first result
            instead of doing the work twice. Up to 128 printable characters.
          schema:
            type: string
            maxLength: 128
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WriteWorkspace'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GraphicsBundle'
          description: The new version
        '401':
          description: No API key or token, or it isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: >-
            Not signed up yet (`no_plan`, with `checkout_url`), or your wallet
            doesn't cover this or is below zero (`insufficient_credits` or
            `payment_failed`, with `top_up_url`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: A limit was reached (`plan_limit`, with `reason` and `contact_url`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Too many renders at once, or too many requests. Retry after
            `retry_after_seconds`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        default:
          description: >-
            Any other error: 400 invalid_request, 404 not_found, 409 conflict,
            413 payload_too_large, 502 upstream_error, 503 service_unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WriteWorkspace:
      additionalProperties: false
      description: >-
        One new version of the workspace, made from the current one and these
        changes. Every field is optional.
      properties:
        delete:
          default: []
          description: Paths to remove.
          items:
            type: string
          type: array
        expected_bundle:
          default: null
          description: |-
            The bundle you read (from graphics_list); if the workspace moved on
            since, nothing is written (409). Leave out to write on top of
            whatever is current.
          type:
            - string
            - 'null'
        files:
          default: []
          description: >-
            Other files (images, fonts, footage) by hash: missing ones get a PUT
            link.
          items:
            $ref: '#/components/schemas/BundleFile'
          type: array
        patch:
          description: Find-and-replace edits in text files already in the workspace.
          items:
            $ref: '#/components/schemas/Patch'
          type: array
        restore:
          default: null
          description: Go back to an earlier bundle of this workspace (from history) first.
          type:
            - string
            - 'null'
        write:
          description: Text files written whole (new or replaced).
          items:
            $ref: '#/components/schemas/WriteText'
          type: array
      type: object
    GraphicsBundle:
      additionalProperties: false
      properties:
        bundle:
          description: '`gb_` and 32 hex digits.'
          type: string
        bytes:
          type: integer
        expires_at:
          type: integer
          description: Unix seconds.
        files:
          type: integer
        missing:
          items:
            additionalProperties: false
            properties:
              bytes:
                type: integer
              paths:
                items:
                  type: string
                type: array
              put_url:
                description: Presigned PUT for the file's bytes.
                type: string
              sha256:
                type: string
            required:
              - sha256
              - bytes
              - paths
              - put_url
            type: object
          type: array
        stored_inline:
          description: Files stored from inline text by this call.
          type: integer
        version:
          description: Set by graphics_write.
          type: integer
        workspace:
          description: Set by graphics_write.
          type: string
      required:
        - bundle
        - files
        - bytes
        - stored_inline
        - missing
        - expires_at
      type: object
    Error:
      type: object
      description: >-
        Every error has a stable `code` and a `message`. Billing and limit
        errors add the fields that tell you how to fix them. See
        https://docs.vidjutsu.ai/errors.
      required:
        - code
        - message
        - request_id
      properties:
        code:
          type: string
          enum:
            - unauthenticated
            - forbidden
            - no_account
            - payment_required
            - upgrade_required
            - plan_limit
            - rate_limited
            - not_found
            - invalid_request
            - conflict
            - payload_too_large
            - upstream_error
            - service_unavailable
          description: Stable error code.
        message:
          type: string
          description: What went wrong, in plain words.
        reason:
          type: string
          description: >-
            Finer cause, for example `no_plan`, `insufficient_credits`,
            `payment_failed`, `spend_limit`, `stale_head`.
        checkout_url:
          type: string
          description: >-
            402 `no_plan`: a Stripe Checkout link to add a card and make your
            first payment.
        top_up_url:
          type: string
          description: >-
            402 `insufficient_credits` or `payment_failed`: a Stripe link to add
            credits to your wallet.
        upgrade_url:
          type: string
          description: >-
            402 `upgrade_required`: a link to move to a plan that has the
            feature.
        media_deletes_at:
          type: string
          format: date-time
          description: >-
            402 `payment_failed` (wallet below zero): when your stored media
            will be deleted unless you top up.
        contact_url:
          type: string
          description: '403 plan_limit: where to ask about Enterprise.'
        retry_after_seconds:
          type: integer
          description: '429: when to try again (also sent as a Retry-After header).'
        latest_version:
          type: string
          description: '400 unknown_version: the newest API version.'
        request_id:
          type: string
          description: >-
            Your Idempotency-Key, or a generated id. Quote it when you contact
            support.
    BundleFile:
      additionalProperties: false
      description: One file of a bundle.
      properties:
        bytes:
          description: Exact length in bytes (at most 512 MB).
          format: uint64
          minimum: 0
          type: integer
        path:
          description: >-
            Path inside the bundle, with `/` between folders
            (`intro/index.html`).

            Plain names only: no `..`, no leading `/`, no names starting with a
            dot.
          type: string
        sha256:
          description: The file's SHA-256, 64 lowercase hex digits.
          type: string
      required:
        - path
        - bytes
        - sha256
      type: object
    Patch:
      additionalProperties: false
      description: 'One change inside a text file: `find` must occur exactly once.'
      properties:
        find:
          type: string
        path:
          type: string
        replace:
          type: string
      required:
        - path
        - find
        - replace
      type: object
    WriteText:
      additionalProperties: false
      description: One text file written whole.
      properties:
        path:
          type: string
        text:
          description: The whole file, UTF-8, up to 256 KB.
          type: string
      required:
        - path
        - text
      type: object
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        A VidJutsu API key (`vj_live_...`) from POST /auth/verify or POST /keys,
        or an OAuth access token (MCP clients).

````

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