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

# apply layout

> Frame clips into a split-screen, picture-in-picture, sidebar or grid: a layout, its slots filled by name, each clip framed into its slot in one step. clip_id per slot frames clips already on the timeline (the first slot's clip stays, the others move onto fresh layers aligned to its start; a clip already in the arrangement is re-framed, so calling again moves nothing); clip_ids gives one slot several clips; the same clip_id in every slot lays one shot out as a tile per person. item per slot places library media over range instead, one layer per slot. Video and image only. fit fill (default) crops to the slot, fit letterboxes the whole source; anchor per slot picks what survives the crop. Layouts and slots, first named first: split-h: left, right; split-v: top, bottom; pip-bottom-right, pip-bottom-left, pip-top-right, pip-top-left: main, inset; main-sidebar: main, sidebar; row3: left, center, right; stack3: top, middle, bottom; grid-2x2, grid-3x3, grid-4x4: r1c1 to r4c4, row 1 at the top. edit_timeline updateClip {frame: null} takes a clip out of its layout. Free.



## OpenAPI

````yaml /openapi.json post /tools/apply_layout
openapi: 3.1.0
info:
  title: Eversince API
  version: '1'
  description: >-
    Every Eversince tool as one POST call, plus the routes beside them: the tool
    list, account and keys, uploads, webhooks and models. The prose is at
    https://docs.eversince.ai.
servers:
  - url: https://eversince.ai/api/v1
security:
  - bearer: []
tags:
  - name: Discovery
    description: The tool list, the same on the MCP server, the REST API and the CLI.
  - name: Workspace
    description: Jobs, balances, settings, templates, skills and the overview.
  - name: Library
    description: >-
      Items, search, import, reading media, comments, boards, calendars, the
      brand kit and public links.
  - name: Timeline
    description: 'Video editing: timelines, clips, captions, sound, language and rendering.'
  - name: Canvas
    description: 'Still editing: canvases, slides, layers and rendering.'
  - name: Generation
    description: Image, video and audio generation, upscaling, cutouts and models.
  - name: Research
    description: 'What platforms publish: pulling and keeping posts.'
  - name: Account
    description: Balances, keys, workspaces and script sessions.
  - name: Uploads
    description: Files into the library by presigned upload or by URL.
  - name: Webhooks
    description: Job results posted to a URL as they complete.
  - name: Models
    description: Generation models and cost estimates.
paths:
  /tools/apply_layout:
    post:
      tags:
        - Timeline
      summary: apply layout
      description: >-
        Frame clips into a split-screen, picture-in-picture, sidebar or grid: a
        layout, its slots filled by name, each clip framed into its slot in one
        step. clip_id per slot frames clips already on the timeline (the first
        slot's clip stays, the others move onto fresh layers aligned to its
        start; a clip already in the arrangement is re-framed, so calling again
        moves nothing); clip_ids gives one slot several clips; the same clip_id
        in every slot lays one shot out as a tile per person. item per slot
        places library media over range instead, one layer per slot. Video and
        image only. fit fill (default) crops to the slot, fit letterboxes the
        whole source; anchor per slot picks what survives the crop. Layouts and
        slots, first named first: split-h: left, right; split-v: top, bottom;
        pip-bottom-right, pip-bottom-left, pip-top-right, pip-top-left: main,
        inset; main-sidebar: main, sidebar; row3: left, center, right; stack3:
        top, middle, bottom; grid-2x2, grid-3x3, grid-4x4: r1c1 to r4c4, row 1
        at the top. edit_timeline updateClip {frame: null} takes a clip out of
        its layout. Free.
      operationId: apply_layout
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                timeline_id:
                  type: string
                  description: The timeline id.
                layout:
                  type: string
                  enum:
                    - split-h
                    - split-v
                    - pip-bottom-right
                    - pip-bottom-left
                    - pip-top-right
                    - pip-top-left
                    - main-sidebar
                    - row3
                    - stack3
                    - grid-2x2
                    - grid-3x3
                    - grid-4x4
                slots:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      slot:
                        type: string
                        description: >-
                          The slot's name in the chosen layout: left, inset,
                          r2c2.
                      clip_id:
                        description: >-
                          A clip already on the timeline to frame into this
                          slot. This or item, the same choice on every slot.
                        type: string
                      clip_ids:
                        description: >-
                          Instead of clip_id: several clips for one slot. The
                          first is placed like clip_id; the rest are framed into
                          the slot where they already are and never moved, for a
                          lane holding takes in a row that all belong in this
                          half.
                        minItems: 1
                        type: array
                        items:
                          type: string
                      item:
                        description: >-
                          A library item (video or image) to place into this
                          slot over range.
                        type: string
                      anchor:
                        description: >-
                          What the crop keeps in view: a name (center, top,
                          bottom, left, right, top_left, top_right, bottom_left,
                          bottom_right) or {x, y} in 0..1, x 0 the left edge, y
                          0 the top. Omitted, the clip keeps its focus. Ignored
                          under fit "fit".
                        anyOf:
                          - type: string
                            enum:
                              - center
                              - top
                              - bottom
                              - left
                              - right
                              - top_left
                              - top_right
                              - bottom_left
                              - bottom_right
                          - type: object
                            properties:
                              x:
                                type: number
                                minimum: 0
                                maximum: 1
                              'y':
                                type: number
                                minimum: 0
                                maximum: 1
                            required:
                              - x
                              - 'y'
                    required:
                      - slot
                fit:
                  type: string
                  enum:
                    - fill
                    - fit
                range:
                  description: >-
                    Placing items only: the span of the timeline the layout
                    occupies, in seconds. Required with item, ignored with
                    clip_id.
                  type: object
                  properties:
                    from_seconds:
                      type: number
                      minimum: 0
                    to_seconds:
                      type: number
                      minimum: 0
                  required:
                    - from_seconds
                    - to_seconds
                if_revision:
                  description: >-
                    The revision get_timeline returned. A stale one fails with
                    revision_conflict instead of applying; so does no revision
                    once a user edited the timeline in the app since this
                    connection last read it.
                  anyOf:
                    - type: string
                    - type: integer
                context:
                  description: 'Optional: one sentence shown to the user beside this action.'
                  type: string
                  maxLength: 600
              required:
                - timeline_id
                - layout
                - slots
      responses:
        '200':
          description: >-
            Done, or a job started for work that runs longer (follow it with
            get_jobs).
          content:
            application/json:
              schema:
                type: object
                required:
                  - ok
                  - data
                  - meta
                properties:
                  ok:
                    const: true
                  data:
                    type: object
                    additionalProperties: true
                  meta:
                    type: object
                    properties:
                      request_id:
                        type: string
                      cost:
                        $ref: '#/components/schemas/Cost'
                      cloud_processing:
                        $ref: '#/components/schemas/CloudProcessing'
                  media:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        default:
          $ref: '#/components/responses/Error'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
      description: >-
        Retry a paid dispatch safely: the same key returns the job already
        dispatched instead of charging again.
    WorkspaceId:
      name: x-workspace-id
      in: header
      required: false
      schema:
        type: string
      description: The workspace this one call acts in, when it is not the key's own.
  schemas:
    Cost:
      type: object
      description: AI credits the call cost.
      additionalProperties: true
    CloudProcessing:
      type: object
      description: Cloud processing the call used, and what is left.
      properties:
        ran_on:
          const: cloud
        minutes:
          type: number
        queued_minutes:
          type: number
        left_minutes:
          type: number
        bought_minutes:
          type: number
        note:
          type: string
    Error:
      type: object
      required:
        - ok
        - error
      properties:
        ok:
          const: false
        error:
          type: object
          required:
            - code
            - message
            - retryable
          properties:
            code:
              type: string
            message:
              type: string
              description: What went wrong, in words to act on.
            retryable:
              type: boolean
            suggested_action:
              type: string
              description: The next step that works.
            cloud_processing:
              $ref: '#/components/schemas/CloudProcessing'
  responses:
    Error:
      description: The call was refused or failed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      description: >-
        An API key (es_live_…) from Settings, under API keys, or an OAuth access
        token.

````