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

# Apply a layout preset

> Lay out the screen and the camera with a preset, as one revision with Undo. Leave out `from` and `to` for the whole video. The screen and camera tracks are found from the files' kinds (`screen`, `camera`), else the lowest video track is the screen and the next one the camera; `screen_track` and `camera_track` override. It sends one `set_layout` per part over the range, the same edit the editor makes. If the camera's track is under the screen's, the answer has a `warning`, because the screen would hide the camera.



## OpenAPI

````yaml /openapi/spec.json post /projects/{project}/layout
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:
  /projects/{project}/layout:
    post:
      tags:
        - Layouts
      summary: Apply a layout preset
      description: >-
        Lay out the screen and the camera with a preset, as one revision with
        Undo. Leave out `from` and `to` for the whole video. The screen and
        camera tracks are found from the files' kinds (`screen`, `camera`), else
        the lowest video track is the screen and the next one the camera;
        `screen_track` and `camera_track` override. It sends one `set_layout`
        per part over the range, the same edit the editor makes. If the camera's
        track is under the screen's, the answer has a `warning`, because the
        screen would hide the camera.
      operationId: apply_layout
      parameters:
        - name: project
          in: path
          required: true
          schema:
            type: string
          description: The project name.
        - 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'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApplyLayout'
      responses:
        '200':
          description: The edit
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedLayout'
        '401':
          description: No API key or token, or it isn't valid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: 'The head moved (`stale_head`): read the project again.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ApplyLayout:
      type: object
      additionalProperties: true
      properties:
        preset:
          type: string
          description: A preset id or name from GET /layouts.
        from:
          $ref: '#/components/schemas/Time'
        to:
          $ref: '#/components/schemas/Time'
        screen_track:
          type: string
          description: >-
            The screen's video track. Default: found from the files' kinds, else
            the lowest video track.
        camera_track:
          type: string
          description: >-
            The camera's video track. Default: found from the files' kinds, else
            the next video track.
        expected_head:
          type: string
          description: The head you decided against; a moved head is a conflict.
      required:
        - preset
      description: Leave out `from` and `to` for the whole video.
    AppliedLayout:
      type: object
      additionalProperties: true
      properties:
        layout:
          type: object
          additionalProperties: true
          properties:
            id:
              type: string
              description: ''
            name:
              type: string
              description: ''
          description: The preset applied.
        applied:
          type: array
          items:
            type: object
            additionalProperties: true
            properties:
              role:
                type: string
                enum:
                  - screen
                  - camera
              track:
                type: string
                description: ''
        warning:
          type: string
          description: >-
            Present when the camera's track is under the screen's. Tracks draw
            bottom to top, so the screen hides the camera wherever it covers it:
            keep the camera on a higher track.
      description: >-
        The edit (like POST /projects/{project}/edits answers) plus the preset,
        which track got which part, and a warning when the camera would be
        hidden.
    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.
    Time:
      oneOf:
        - type: number
        - type: string
        - type: object
          properties:
            ticks:
              type: integer
            rate:
              type: integer
      description: >-
        Seconds (`12`, `"12.5"`), a fraction (`"1001/30000"`) or `{ticks,
        rate}`.
  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.