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

# edit timeline

> Mutate a timeline with a list of typed operations applied atomically as one transaction: add, move, trim, split, slip and remove clips, ripple and close gaps, speed, clip properties, keyframes and camera moves, tracks, text, markers, links, caption settings, dimensions and frame rate. Every operation is checked before any is applied; a bad one is named by its position and nothing is written. Returns what changed, the resulting state and the new revision. Clips and tracks are named by the ids get_timeline returned. Free.



## OpenAPI

````yaml /openapi.json post /tools/edit_timeline
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/edit_timeline:
    post:
      tags:
        - Timeline
      summary: edit timeline
      description: >-
        Mutate a timeline with a list of typed operations applied atomically as
        one transaction: add, move, trim, split, slip and remove clips, ripple
        and close gaps, speed, clip properties, keyframes and camera moves,
        tracks, text, markers, links, caption settings, dimensions and frame
        rate. Every operation is checked before any is applied; a bad one is
        named by its position and nothing is written. Returns what changed, the
        resulting state and the new revision. Clips and tracks are named by the
        ids get_timeline returned. Free.
      operationId: edit_timeline
      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.
                operations:
                  minItems: 1
                  type: array
                  items:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  description: >-
                    Operations, discriminated on type. Frames count at the
                    timeline's fps, and every frame field has a seconds twin
                    (from_seconds, duration_seconds, trim_start_seconds,
                    to_seconds, delta_seconds, at_seconds), one or the other.
                    Clips: addClip {trackId, ref | timeline_id | clip, from?,
                    source? [start_s, end_s], durationInFrames?, trimStart?}
                    (from left out places it after the last clip on that track,
                    so a run of adds builds a cut in order; a clip that would
                    overlap another lands on a fresh track above); insertClip
                    and overwriteClip (the fields of addClip; insert pushes what
                    follows right on every track, overwrite clears the span on
                    that track); replaceSource {clipId, ref}; removeClip
                    {clipId}; rippleDelete {clipId}; rippleDeleteRange {from,
                    durationInFrames, trackIds?}; overwriteRange {trackIds,
                    from, durationInFrames}; rippleInsert {from, deltaFrames,
                    trackIds?}; closeGaps {trackIds?, from?}; closeGap {trackId,
                    atFrame}; moveClip {clipId, toFrame, toTrackId?}; trimClip
                    {clipId, edge, deltaFrames, ripple?}; slipClip {clipId,
                    deltaFrames}; splitClip {clipId, atFrame, newClipId};
                    setSpeed {clipId, speed}; updateClip {clipId, patch}
                    (volume, opacity, holdFrames (a frame hold, 2 for on twos,
                    up to 6), fadeIn/OutFrames, transform, grade, effects,
                    masks, transitionIn/Out, objectFit, placeholder, category,
                    label, the text fields; grade and effects replace whole);
                    setKeyframes {clipId, property, keyframes: [{frame |
                    at_seconds, value, interp?}]} (position, scale, rotation,
                    opacity, crop, focus, volume, fx<n>.<param>; the list
                    replaces that track); cameraMove {clipId, move} (zoom-in,
                    zoom-out, pan-right, pan-left, slow-push, slow-pull, reveal,
                    punch-in, snap-zoom, handheld, impact, drift, rise, roll-in,
                    none); linkClips {clipIdA, clipIdB, linkId}; unlinkClips
                    {clipId}; detachAudio {clipId}; reattachAudio {clipId}.
                    Tracks (a fresh timeline has one visual track, id
                    visual-main): addTrack {track: {kind: visual | audio, index,
                    id?, clips?}}; removeTrack {trackId}; reorderTrack {trackId,
                    index}; updateTrack {trackId, patch: {muted?, hidden?,
                    locked?, height?}}. Markers: addMarker {marker: {from,
                    label, kind: chapter | note, body?, durationInFrames?,
                    id?}}; updateMarker {markerId, patch}; removeMarker
                    {markerId}. Document: setCaptionSettings {settings};
                    setAspectRatio {ratio}; setDimensions {width, height};
                    setFrameRate {fps}; setMeta {patch}. The full reference
                    (every field with its units and defaults, hand-built clips,
                    the effect list with parameters, the grade shape, masks,
                    transitions, text fields, keyframe semantics) is the skill
                    skill-timeline-operations, read with manage_skills get.
                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
                - operations
      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.

````