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

# Get canvas content



## OpenAPI

````yaml /api/openapi.json get /api/v1/canvases/{canvasId}/content
openapi: 3.0.2
info:
  title: Melius API
  version: '1'
  description: >-
    The Melius REST API. Authenticate with an API key as a bearer token
    (`Authorization: Bearer mel_...`) and select the team to act on with the
    `x-team-id` header. Generations run through the same node + run pipeline as
    the app: create a node on a canvas, start a run, poll the run, then read the
    resulting version asset.
servers:
  - url: https://api.melius.com
security:
  - apiKey: []
    teamId: []
paths:
  /api/v1/canvases/{canvasId}/content:
    get:
      tags:
        - canvas
      summary: Get canvas content
      operationId: canvas.getContent
      parameters:
        - name: canvasId
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: nodeId
          in: query
          schema:
            type: string
            format: uuid
        - name: includeAllVersions
          in: query
          schema:
            type: boolean
        - name: mediaSummaries
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  nodes:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        nodeType:
                          type: string
                          enum:
                            - text
                            - image
                            - video
                            - audio
                            - file
                            - group
                            - custom_text
                            - pdf
                            - composite
                            - stitch
                            - magic_resize
                        title:
                          type: string
                        geometry:
                          type: object
                          properties:
                            x:
                              type: number
                            'y':
                              type: number
                            w:
                              type: number
                            h:
                              type: number
                            zIndex:
                              type: number
                          required:
                            - x
                            - 'y'
                            - w
                            - h
                        groupId:
                          type: string
                          format: uuid
                          nullable: true
                        autoModel:
                          type: boolean
                          nullable: true
                        fastModel:
                          type: boolean
                          nullable: true
                        activeVersionId:
                          type: string
                          format: uuid
                          nullable: true
                        generatedText:
                          type: string
                          nullable: true
                        textPrompt:
                          type: string
                          nullable: true
                        modelConfig:
                          type: object
                          properties:
                            model:
                              type: string
                            variant:
                              type: string
                            tier:
                              type: string
                              nullable: true
                            ratios:
                              type: array
                              items:
                                type: string
                            resolution:
                              type: string
                            voiceId:
                              type: string
                            customVoiceId:
                              type: string
                              format: uuid
                            font:
                              type: object
                              properties:
                                source:
                                  type: string
                                  enum:
                                    - custom
                                    - google
                                familyName:
                                  type: string
                              required:
                                - source
                                - familyName
                          required:
                            - model
                            - variant
                          nullable: true
                        outputAspectRatio:
                          type: string
                          enum:
                            - '21:9'
                            - '16:9'
                            - '4:3'
                            - '5:4'
                            - '3:2'
                            - '1:1'
                            - '2:3'
                            - '3:4'
                            - '4:5'
                            - '9:16'
                            - '9:21'
                          nullable: true
                        outputDuration:
                          type: integer
                          minimum: 0
                          exclusiveMinimum: true
                          nullable: true
                        outputResolution:
                          oneOf:
                            - type: string
                              enum:
                                - 360p
                                - 480p
                                - 540p
                                - 580p
                                - 720p
                                - 1080p
                                - 1440p
                                - 2160p
                                - 4k
                                - 0.5K
                                - 1K
                                - 2K
                                - 4K
                                - 1k
                                - 2k
                            - type: string
                        seed:
                          type: integer
                          minimum: 0
                          maximum: 2147483647
                          nullable: true
                        generateAudio:
                          type: boolean
                          nullable: true
                        modelSupportsEndImage:
                          type: boolean
                          nullable: true
                        modelSupportsReferenceImage:
                          type: boolean
                          nullable: true
                        modelSupportsOptionalStartImage:
                          type: boolean
                          nullable: true
                        modelSupportsAudioInput:
                          type: boolean
                          nullable: true
                        modelGeneratesAudio:
                          type: boolean
                          nullable: true
                        voiceId:
                          type: string
                          nullable: true
                        customVoiceId:
                          type: string
                          nullable: true
                        negativePrompt:
                          type: string
                          nullable: true
                        supportedInputs:
                          type: array
                          items:
                            type: string
                            enum:
                              - image
                              - video
                          nullable: true
                        stitchClipOrder:
                          type: array
                          items:
                            type: string
                          nullable: true
                        stitchScaleFit:
                          type: string
                          enum:
                            - fit
                            - stretch
                          nullable: true
                        stitchAudioOverlays:
                          type: array
                          items:
                            type: object
                            properties:
                              nodeId:
                                type: string
                              startTimeSeconds:
                                type: number
                                minimum: 0
                              trimStartMs:
                                type: integer
                                minimum: 0
                              trimEndMs:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                            required:
                              - nodeId
                              - startTimeSeconds
                          nullable: true
                        stitchClipTrims:
                          type: object
                          additionalProperties:
                            type: object
                            properties:
                              trimStartMs:
                                type: integer
                                minimum: 0
                              trimEndMs:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                          nullable: true
                        groupType:
                          type: string
                          enum:
                            - default
                            - unified
                            - template
                          nullable: true
                        templatePorts:
                          type: array
                          items:
                            oneOf:
                              - type: object
                                properties:
                                  direction:
                                    type: string
                                    enum:
                                      - input
                                  required:
                                    type: boolean
                                  maxConnections:
                                    type: integer
                                    minimum: 0
                                    exclusiveMinimum: true
                                  internalTargets:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        nodeId:
                                          type: string
                                          format: uuid
                                        internalHandle:
                                          type: string
                                          nullable: true
                                      required:
                                        - nodeId
                                        - internalHandle
                                  connectedSourceIds:
                                    type: array
                                    items:
                                      type: string
                                  portId:
                                    type: string
                                  label:
                                    type: string
                                  handleType:
                                    type: string
                                  nodeId:
                                    type: string
                                    format: uuid
                                  internalHandle:
                                    type: string
                                    nullable: true
                                  top:
                                    type: string
                                required:
                                  - direction
                                  - portId
                                  - label
                                  - handleType
                                  - nodeId
                                  - internalHandle
                              - type: object
                                properties:
                                  direction:
                                    type: string
                                    enum:
                                      - output
                                  layerIndex:
                                    type: integer
                                    minimum: 0
                                    nullable: true
                                  portId:
                                    type: string
                                  label:
                                    type: string
                                  handleType:
                                    type: string
                                  nodeId:
                                    type: string
                                    format: uuid
                                  internalHandle:
                                    type: string
                                    nullable: true
                                  top:
                                    type: string
                                required:
                                  - direction
                                  - portId
                                  - label
                                  - handleType
                                  - nodeId
                                  - internalHandle
                          nullable: true
                        templateId:
                          type: string
                          format: uuid
                          nullable: true
                        childNodeIds:
                          type: array
                          items:
                            type: string
                            format: uuid
                        magicResizeOutputs:
                          type: array
                          items:
                            type: object
                            properties:
                              layerIndex:
                                type: integer
                              ratio:
                                type: string
                              assetId:
                                type: string
                                nullable: true
                              assetUrl:
                                type: string
                                nullable: true
                              previewUrl:
                                type: string
                                nullable: true
                              failed:
                                type: boolean
                            required:
                              - layerIndex
                              - ratio
                              - assetId
                              - assetUrl
                              - previewUrl
                          nullable: true
                        versions:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              title:
                                type: string
                              modelConfig:
                                type: object
                                properties:
                                  model:
                                    type: string
                                  variant:
                                    type: string
                                  tier:
                                    type: string
                                    nullable: true
                                  ratios:
                                    type: array
                                    items:
                                      type: string
                                  resolution:
                                    type: string
                                  voiceId:
                                    type: string
                                  customVoiceId:
                                    type: string
                                    format: uuid
                                  font:
                                    type: object
                                    properties:
                                      source:
                                        type: string
                                        enum:
                                          - custom
                                          - google
                                      familyName:
                                        type: string
                                    required:
                                      - source
                                      - familyName
                                required:
                                  - model
                                  - variant
                                nullable: true
                              sourceToolName:
                                type: string
                                nullable: true
                              seed:
                                type: integer
                                minimum: 0
                                maximum: 2147483647
                                nullable: true
                              generateAudio:
                                type: boolean
                                nullable: true
                              negativePrompt:
                                type: string
                                nullable: true
                              outputAspectRatio:
                                type: string
                                enum:
                                  - '21:9'
                                  - '16:9'
                                  - '4:3'
                                  - '5:4'
                                  - '3:2'
                                  - '1:1'
                                  - '2:3'
                                  - '3:4'
                                  - '4:5'
                                  - '9:16'
                                  - '9:21'
                                nullable: true
                              outputDuration:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                                nullable: true
                              outputResolution:
                                oneOf:
                                  - type: string
                                    enum:
                                      - 360p
                                      - 480p
                                      - 540p
                                      - 580p
                                      - 720p
                                      - 1080p
                                      - 1440p
                                      - 2160p
                                      - 4k
                                      - 0.5K
                                      - 1K
                                      - 2K
                                      - 4K
                                      - 1k
                                      - 2k
                                  - type: string
                              textPrompt:
                                type: string
                                nullable: true
                              generatedText:
                                type: string
                                nullable: true
                              modelDisplayName:
                                type: string
                                nullable: true
                              asset:
                                type: object
                                properties:
                                  url:
                                    type: string
                                    nullable: true
                                  originalUrl:
                                    type: string
                                    nullable: true
                                  previewUrl:
                                    type: string
                                    nullable: true
                                  previewExtraLowResolutionUrl:
                                    type: string
                                    nullable: true
                                  previewLowResolutionUrl:
                                    type: string
                                    nullable: true
                                  previewHighResolutionUrl:
                                    type: string
                                    nullable: true
                                  thumbnailUrl:
                                    type: string
                                    nullable: true
                                  mediaType:
                                    type: string
                                    enum:
                                      - image
                                      - video
                                      - audio
                                      - pdf
                                    nullable: true
                                  assetSummary:
                                    type: string
                                    nullable: true
                                  assetSummaryDetails:
                                    type: object
                                    properties:
                                      subject:
                                        type: string
                                        nullable: true
                                      action:
                                        type: string
                                        nullable: true
                                      summary:
                                        type: string
                                    required:
                                      - subject
                                      - action
                                      - summary
                                    nullable: true
                                  fileType:
                                    type: string
                                    nullable: true
                                  fileSizeInKb:
                                    type: integer
                                    minimum: 0
                                    nullable: true
                                  originalWidth:
                                    type: integer
                                    minimum: 0
                                    nullable: true
                                  originalHeight:
                                    type: integer
                                    minimum: 0
                                    nullable: true
                                  durationInMs:
                                    type: integer
                                    minimum: 0
                                    nullable: true
                                required:
                                  - url
                                  - originalUrl
                                  - previewUrl
                                  - mediaType
                                  - fileType
                                  - fileSizeInKb
                                  - originalWidth
                                  - originalHeight
                                  - durationInMs
                                nullable: true
                              pdfExtraction:
                                type: object
                                properties:
                                  summaryText:
                                    type: string
                                  extractedImages:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        assetId:
                                          type: string
                                          format: uuid
                                        url:
                                          type: string
                                        pageIndex:
                                          type: integer
                                          minimum: 0
                                        imageIndex:
                                          type: integer
                                          minimum: 0
                                      required:
                                        - assetId
                                        - url
                                        - pageIndex
                                        - imageIndex
                                  extractedImageUrls:
                                    type: array
                                    items:
                                      type: string
                                  extractedImageCount:
                                    type: integer
                                required:
                                  - summaryText
                                  - extractedImages
                                  - extractedImageUrls
                                  - extractedImageCount
                                nullable: true
                              nodeRunId:
                                type: string
                                format: uuid
                                nullable: true
                              layerCount:
                                type: integer
                                minimum: 0
                              errorMessage:
                                type: string
                                nullable: true
                              errorSeverity:
                                type: string
                                enum:
                                  - error
                                  - warning
                                nullable: true
                              errorRetryable:
                                type: boolean
                                nullable: true
                              favoritedByUserId:
                                type: string
                                format: uuid
                                nullable: true
                              createdAt:
                                type: string
                                format: date-time
                              updatedAt:
                                type: string
                                format: date-time
                            required:
                              - id
                              - title
                              - modelConfig
                              - sourceToolName
                              - seed
                              - generateAudio
                              - negativePrompt
                              - outputAspectRatio
                              - outputDuration
                              - outputResolution
                              - textPrompt
                              - generatedText
                              - asset
                              - layerCount
                              - errorMessage
                              - errorSeverity
                              - favoritedByUserId
                              - createdAt
                              - updatedAt
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - nodeType
                        - geometry
                        - groupId
                        - activeVersionId
                        - generatedText
                        - versions
                        - createdAt
                        - updatedAt
                  edges:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                        srcNodeId:
                          type: string
                          format: uuid
                        dstNodeId:
                          type: string
                          format: uuid
                        edgeType:
                          type: string
                          enum:
                            - text
                            - image
                            - video
                            - audio
                            - file
                        srcHandle:
                          type: string
                          nullable: true
                        dstHandle:
                          type: string
                          nullable: true
                        createdAt:
                          type: string
                          format: date-time
                      required:
                        - id
                        - srcNodeId
                        - dstNodeId
                        - edgeType
                        - srcHandle
                        - dstHandle
                        - createdAt
                  modelPresets:
                    type: object
                    properties:
                      image:
                        type: object
                        properties:
                          model:
                            type: string
                          mode:
                            type: string
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '16:9'
                              - '4:3'
                              - '5:4'
                              - '3:2'
                              - '1:1'
                              - '2:3'
                              - '3:4'
                              - '4:5'
                              - '9:16'
                              - '9:21'
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          fast:
                            type: boolean
                          numVariations:
                            type: integer
                            minimum: 1
                            maximum: 10
                      video:
                        type: object
                        properties:
                          model:
                            type: string
                          mode:
                            type: string
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '16:9'
                              - '4:3'
                              - '5:4'
                              - '3:2'
                              - '1:1'
                              - '2:3'
                              - '3:4'
                              - '4:5'
                              - '9:16'
                              - '9:21'
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          duration:
                            type: integer
                            minimum: 0
                            exclusiveMinimum: true
                          fast:
                            type: boolean
                          numVariations:
                            type: integer
                            minimum: 1
                            maximum: 10
                      text:
                        type: object
                        properties:
                          model:
                            type: string
                          mode:
                            type: string
                          fast:
                            type: boolean
                          numVariations:
                            type: integer
                            minimum: 1
                            maximum: 10
                      audio:
                        type: object
                        properties:
                          model:
                            type: string
                          mode:
                            type: string
                          voiceId:
                            type: string
                          customVoiceId:
                            type: string
                            format: uuid
                            nullable: true
                          voiceSettings:
                            type: object
                            properties:
                              speed:
                                type: number
                                minimum: 0.25
                                maximum: 4
                              stability:
                                type: number
                                minimum: 0
                                maximum: 1
                              similarityBoost:
                                type: number
                                minimum: 0
                                maximum: 1
                              style:
                                type: number
                                minimum: 0
                                maximum: 1
                              speakerBoost:
                                type: boolean
                              removeBackgroundNoise:
                                type: boolean
                              outputFormat:
                                type: string
                                enum:
                                  - mp3_44100_128
                                  - mp3_44100_192
                                  - mp3_22050_32
                                  - pcm_16000
                                  - pcm_22050
                                  - pcm_24000
                                  - pcm_44100
                          duration:
                            type: integer
                            minimum: 0
                            exclusiveMinimum: true
                          numVariations:
                            type: integer
                            minimum: 1
                            maximum: 4
                    description: >-
                      Canvas-wide default model + variant the user configured in
                      canvas settings, per category (image/video/text/audio).
                      When a node is created with no modelConfig, the server
                      pins these defaults exactly. Use this to know what
                      model+mode will apply, so you can pick correct edge
                      handles and avoid hallucinating the default
                required:
                  - nodes
                  - edges
        '401':
          description: Missing, invalid, expired, or revoked API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - statusCode
                  - message
        '403':
          description: The API key's user is not a member of the requested team.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                required:
                  - statusCode
                  - message
        '404':
          description: '404'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '429':
          description: Rate limit reached — retry after the `Retry-After` header.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                  retryAfterSeconds:
                    type: integer
                required:
                  - statusCode
                  - message
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: 'A Melius API key (`mel_...`), sent as `Authorization: Bearer <key>`.'
    teamId:
      type: apiKey
      in: header
      name: x-team-id
      description: The team (workspace) to act on. Defaults to the key's team when omitted.

````