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

> Mutate a canvas with a list of typed operations, applied atomically as one transaction and saved as one version: add, copy, remove, reorder and patch layers, group, replace a picture, set the canvas, add or change slides. Positions are slide pixels; a box is {x, y, w, h, rotation?} with x and y its top-left corner. Layers are named by the ids get_canvas returned; the response names every layer it added (id, name, type, slide) and every slide with its id, and the new revision, never the document. A picture is placed by library ref and the rest of the layer is filled in. Free, except a subject or background mask, which reads the photograph: cloud processing.



## OpenAPI

````yaml /openapi.json post /tools/edit_canvas
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_canvas:
    post:
      tags:
        - Canvas
      summary: edit canvas
      description: >-
        Mutate a canvas with a list of typed operations, applied atomically as
        one transaction and saved as one version: add, copy, remove, reorder and
        patch layers, group, replace a picture, set the canvas, add or change
        slides. Positions are slide pixels; a box is {x, y, w, h, rotation?}
        with x and y its top-left corner. Layers are named by the ids get_canvas
        returned; the response names every layer it added (id, name, type,
        slide) and every slide with its id, and the new revision, never the
        document. A picture is placed by library ref and the rest of the layer
        is filled in. Free, except a subject or background mask, which reads the
        photograph: cloud processing.
      operationId: edit_canvas
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
        - $ref: '#/components/parameters/WorkspaceId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                canvas_id:
                  type: string
                  description: The canvas id.
                operations:
                  minItems: 1
                  maxItems: 200
                  type: array
                  items:
                    type: object
                    propertyNames:
                      type: string
                    additionalProperties: {}
                  description: >-
                    Operations, discriminated on type, applied in order as one
                    transaction; a bad one is named by its position and nothing
                    lands. Coordinates are slide pixels; a box is {x, y, w, h,
                    rotation?} with x and y its top-left; layer order in a slide
                    is draw order, bottom first. addLayer {layer, slideId?,
                    index?, parentId?} where layer is {type: "image", ref},
                    {type: "text", text, preset?, size?, font?, weight?, color?,
                    align?}, {type: "shape", shape, fill?, stroke?, radius?},
                    {type: "icon", icon}, {type: "chart", chart, rows, colors?}
                    or {type: "adjustment", grade}, plus any field the layer
                    holds (name, opacity, blend, mask, effects, grade, box);
                    slideId defaults to the first slide. addLayer {copyOf,
                    index?} copies a layer. removeLayer {layerId}; moveLayer
                    {layerId, index, parentId?}; patchLayer {layerId, patch}
                    (any of the layer's own fields; null clears; text replaces
                    the words, runs keeps styled spans); replaceImage {layerId,
                    ref}; group {layerIds, name?}; ungroup {layerId}. setCanvas
                    {patch: {width?, height?, background?, dpi?, destination?}};
                    addSlide {slide: {name?, background?, layers?}} or {copyOf,
                    index?}; setSlide {slideId, patch}; removeSlide {slideId};
                    moveSlide {slideId, index}. Limits: 200 layers a slide, 50
                    slides, 8192px a side. The full reference (every layer
                    kind's fields, presets, shapes, charts, masks including
                    subject and background, grades, backgrounds) is the skill
                    skill-canvas-operations, read with manage_skills get.
                if_revision:
                  description: >-
                    The revision get_canvas returned. A stale one fails with
                    revision_conflict instead of applying; so does no revision
                    once a user edited the canvas 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:
                - canvas_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.

````