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

# Prepare a Cast video



## OpenAPI

````yaml /api/openapi.json post /api/v1/cast/videos/prepare
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/cast/videos/prepare:
    post:
      tags:
        - cast
      summary: Prepare a Cast video
      operationId: cast.prepare
      parameters: []
      requestBody:
        description: Body
        content:
          application/json:
            schema:
              type: object
              properties:
                avatar:
                  oneOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - custom
                            - curated
                            - element
                        id:
                          type: string
                          format: uuid
                      required:
                        - kind
                        - id
                      additionalProperties: false
                    - type: object
                      properties:
                        name:
                          type: string
                          minLength: 1
                          maxLength: 200
                        kind:
                          type: string
                          enum:
                            - custom
                            - curated
                            - element
                      required:
                        - name
                      additionalProperties: false
                voice:
                  oneOf:
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - stock
                        voiceId:
                          type: string
                          minLength: 1
                          maxLength: 200
                      required:
                        - kind
                        - voiceId
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - custom
                        customVoiceId:
                          type: string
                          format: uuid
                      required:
                        - kind
                        - customVoiceId
                      additionalProperties: false
                    - type: object
                      properties:
                        kind:
                          type: string
                          enum:
                            - auto
                      required:
                        - kind
                      additionalProperties: false
                voiceName:
                  type: string
                  maxLength: 200
                otherAvatars:
                  type: array
                  items:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - custom
                          - curated
                          - element
                      id:
                        type: string
                        format: uuid
                      voice:
                        oneOf:
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - stock
                              voiceId:
                                type: string
                                minLength: 1
                                maxLength: 200
                            required:
                              - kind
                              - voiceId
                            additionalProperties: false
                          - type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - custom
                              customVoiceId:
                                type: string
                                format: uuid
                            required:
                              - kind
                              - customVoiceId
                            additionalProperties: false
                      voiceName:
                        type: string
                        maxLength: 200
                    required:
                      - kind
                      - id
                    additionalProperties: false
                  minItems: 1
                  maxItems: 2
                tone:
                  type: string
                  minLength: 1
                  maxLength: 200
                engine:
                  type: string
                  enum:
                    - seedance
                  default: seedance
                resolution:
                  oneOf:
                    - type: string
                      enum:
                        - 360p
                        - 480p
                        - 540p
                        - 580p
                        - 720p
                        - 480P
                        - 768P
                        - 1080P
                        - 1080p
                        - 1440p
                        - 2160p
                        - 4k
                        - 0.5K
                        - 1K
                        - 2K
                        - 4K
                        - 1k
                        - 2k
                    - type: string
                subtitles:
                  type: object
                  properties:
                    preset:
                      type: string
                      enum:
                        - simple
                        - plain
                        - beans
                        - corpo
                        - boo
                        - shadeplay
                        - casper
                        - capri
                        - lowkey
                        - vinta
                        - diego
                        - ali
                        - slay
                        - kitty
                        - hustle
                        - karl
                        - sprout
                        - flex
                        - mint
                        - rizz
                        - vegas
                        - glass
                        - whisper
                        - glide2
                        - fusion
                        - glide
                        - terminal
                        - handwritten
                    language:
                      type: string
                    position:
                      type: string
                      enum:
                        - top
                        - center
                        - bottom
                    textCustomizations:
                      type: object
                      properties:
                        baseline:
                          type: object
                          properties:
                            font:
                              type: string
                            weight:
                              type: integer
                            color:
                              type: string
                        highlighted:
                          type: object
                          properties:
                            font:
                              type: string
                            weight:
                              type: integer
                            color:
                              type: string
                  required:
                    - preset
                creationSettings:
                  type: object
                  properties:
                    videoStyle:
                      type: object
                      properties:
                        id:
                          type: string
                          enum:
                            - auto
                            - self-filmed
                            - produced
                            - drama
                            - vlog
                            - podcast
                            - unboxing
                            - tutorial
                            - announcement
                            - explainer
                            - founder-story
                            - before-after
                            - corporate-training
                            - storytime
                            - comment-reply
                            - streamer-reaction
                            - animated-3d
                            - street-interview
                        version:
                          type: number
                          enum:
                            - 1
                      required:
                        - id
                        - version
                    speech:
                      type: string
                      enum:
                        - on-screen
                        - narration
                    visuals:
                      type: string
                      enum:
                        - auto
                        - 'on'
                        - 'off'
                      description: >-
                        Auto chooses useful supporting visuals from the script,
                        actions and props across video styles, and may keep
                        generated footage alone. Off skips added visuals. On
                        remains accepted for compatibility. Subtitles are
                        separate; generation eligibility still applies.
                    pronunciations:
                      type: array
                      items:
                        type: object
                        properties:
                          word:
                            type: string
                            minLength: 1
                            maxLength: 200
                          pronunciation:
                            type: string
                            minLength: 1
                            maxLength: 200
                        required:
                          - word
                          - pronunciation
                      maxItems: 50
                      description: >-
                        Confirmed spoken spellings, e.g.
                        [{"word":"Emmaus","pronunciation":"ee-may-us"}]. Applied
                        to speech only; keep the original spelling in the script
                        and visual directions.
                  required:
                    - videoStyle
                    - speech
                scriptTemplate:
                  type: object
                  properties:
                    id:
                      type: string
                      format: uuid
                    revision:
                      type: integer
                      minimum: -9007199254740991
                      maximum: 9007199254740991
                    source:
                      type: string
                      enum:
                        - database
                  required:
                    - id
                    - revision
                    - source
                sections:
                  type: array
                  items:
                    type: object
                    properties:
                      title:
                        type: string
                        maxLength: 200
                      text:
                        type: string
                        maxLength: 5000
                      action:
                        type: string
                        maxLength: 2000
                      kind:
                        type: string
                        enum:
                          - action
                      cutaway:
                        type: boolean
                        enum:
                          - true
                      seconds:
                        type: integer
                        minimum: 1
                        maximum: 8
                      speakerId:
                        type: string
                        maxLength: 200
                      scene:
                        type: string
                        maxLength: 2000
                    required:
                      - text
                    additionalProperties: false
                  minItems: 1
                  maxItems: 30
                backgroundId:
                  type: string
                  format: uuid
                propAssetId:
                  type: string
                  format: uuid
                propName:
                  type: string
                  maxLength: 200
                props:
                  type: array
                  items:
                    type: object
                    properties:
                      assetId:
                        type: string
                        format: uuid
                      name:
                        type: string
                        minLength: 1
                        maxLength: 200
                    required:
                      - assetId
                    additionalProperties: false
                  minItems: 1
                  maxItems: 6
                aspectRatio:
                  type: string
                  enum:
                    - '21:9'
                    - '20:9'
                    - 19.5:9
                    - '2:1'
                    - '16:9'
                    - '3:2'
                    - '4:3'
                    - '5:4'
                    - '1:1'
                    - '4:5'
                    - '3:4'
                    - '2:3'
                    - '9:16'
                    - '1:2'
                    - '9:19.5'
                    - '9:20'
                    - '9:21'
                  default: '9:16'
                workId:
                  type: string
                  format: uuid
              required:
                - avatar
                - sections
              additionalProperties: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      attemptId:
                        type: string
                        format: uuid
                      preparationToken:
                        type: string
                        format: uuid
                      input:
                        type: object
                        properties:
                          avatar:
                            type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - custom
                                  - curated
                                  - element
                              id:
                                type: string
                                format: uuid
                            required:
                              - kind
                              - id
                            additionalProperties: false
                          voice:
                            oneOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - stock
                                  voiceId:
                                    type: string
                                    minLength: 1
                                    maxLength: 200
                                required:
                                  - kind
                                  - voiceId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - custom
                                  customVoiceId:
                                    type: string
                                    format: uuid
                                required:
                                  - kind
                                  - customVoiceId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - auto
                                required:
                                  - kind
                                additionalProperties: false
                          voiceName:
                            type: string
                            maxLength: 200
                          otherAvatars:
                            type: array
                            items:
                              type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - custom
                                    - curated
                                    - element
                                id:
                                  type: string
                                  format: uuid
                                voice:
                                  oneOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - stock
                                        voiceId:
                                          type: string
                                          minLength: 1
                                          maxLength: 200
                                      required:
                                        - kind
                                        - voiceId
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - custom
                                        customVoiceId:
                                          type: string
                                          format: uuid
                                      required:
                                        - kind
                                        - customVoiceId
                                      additionalProperties: false
                                voiceName:
                                  type: string
                                  maxLength: 200
                              required:
                                - kind
                                - id
                              additionalProperties: false
                            minItems: 1
                            maxItems: 2
                          tone:
                            type: string
                            minLength: 1
                            maxLength: 200
                          engine:
                            type: string
                            enum:
                              - seedance
                            default: seedance
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 480P
                                  - 768P
                                  - 1080P
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          subtitles:
                            type: object
                            properties:
                              preset:
                                type: string
                                enum:
                                  - simple
                                  - plain
                                  - beans
                                  - corpo
                                  - boo
                                  - shadeplay
                                  - casper
                                  - capri
                                  - lowkey
                                  - vinta
                                  - diego
                                  - ali
                                  - slay
                                  - kitty
                                  - hustle
                                  - karl
                                  - sprout
                                  - flex
                                  - mint
                                  - rizz
                                  - vegas
                                  - glass
                                  - whisper
                                  - glide2
                                  - fusion
                                  - glide
                                  - terminal
                                  - handwritten
                              language:
                                type: string
                              position:
                                type: string
                                enum:
                                  - top
                                  - center
                                  - bottom
                              textCustomizations:
                                type: object
                                properties:
                                  baseline:
                                    type: object
                                    properties:
                                      font:
                                        type: string
                                      weight:
                                        type: integer
                                      color:
                                        type: string
                                  highlighted:
                                    type: object
                                    properties:
                                      font:
                                        type: string
                                      weight:
                                        type: integer
                                      color:
                                        type: string
                            required:
                              - preset
                          creationSettings:
                            type: object
                            properties:
                              videoStyle:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    enum:
                                      - auto
                                      - self-filmed
                                      - produced
                                      - drama
                                      - vlog
                                      - podcast
                                      - unboxing
                                      - tutorial
                                      - announcement
                                      - explainer
                                      - founder-story
                                      - before-after
                                      - corporate-training
                                      - storytime
                                      - comment-reply
                                      - streamer-reaction
                                      - animated-3d
                                      - street-interview
                                  version:
                                    type: number
                                    enum:
                                      - 1
                                required:
                                  - id
                                  - version
                              speech:
                                type: string
                                enum:
                                  - on-screen
                                  - narration
                              visuals:
                                type: string
                                enum:
                                  - auto
                                  - 'on'
                                  - 'off'
                                description: >-
                                  Auto chooses useful supporting visuals from
                                  the script, actions and props across video
                                  styles, and may keep generated footage alone.
                                  Off skips added visuals. On remains accepted
                                  for compatibility. Subtitles are separate;
                                  generation eligibility still applies.
                              pronunciations:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    word:
                                      type: string
                                      minLength: 1
                                      maxLength: 200
                                    pronunciation:
                                      type: string
                                      minLength: 1
                                      maxLength: 200
                                  required:
                                    - word
                                    - pronunciation
                                maxItems: 50
                                description: >-
                                  Confirmed spoken spellings, e.g.
                                  [{"word":"Emmaus","pronunciation":"ee-may-us"}].
                                  Applied to speech only; keep the original
                                  spelling in the script and visual directions.
                            required:
                              - videoStyle
                              - speech
                          scriptTemplate:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              revision:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              source:
                                type: string
                                enum:
                                  - database
                            required:
                              - id
                              - revision
                              - source
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  maxLength: 200
                                text:
                                  type: string
                                  maxLength: 5000
                                action:
                                  type: string
                                  maxLength: 2000
                                kind:
                                  type: string
                                  enum:
                                    - action
                                cutaway:
                                  type: boolean
                                  enum:
                                    - true
                                seconds:
                                  type: integer
                                  minimum: 1
                                  maximum: 8
                                speakerId:
                                  type: string
                                  maxLength: 200
                                scene:
                                  type: string
                                  maxLength: 2000
                              required:
                                - text
                              additionalProperties: false
                            minItems: 1
                            maxItems: 30
                          backgroundId:
                            type: string
                            format: uuid
                          propAssetId:
                            type: string
                            format: uuid
                          propName:
                            type: string
                            maxLength: 200
                          props:
                            type: array
                            items:
                              type: object
                              properties:
                                assetId:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 200
                              required:
                                - assetId
                              additionalProperties: false
                            minItems: 1
                            maxItems: 6
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '20:9'
                              - 19.5:9
                              - '2:1'
                              - '16:9'
                              - '3:2'
                              - '4:3'
                              - '5:4'
                              - '1:1'
                              - '4:5'
                              - '3:4'
                              - '2:3'
                              - '9:16'
                              - '1:2'
                              - '9:19.5'
                              - '9:20'
                              - '9:21'
                            default: '9:16'
                          workId:
                            type: string
                            format: uuid
                        required:
                          - avatar
                          - voice
                          - engine
                          - sections
                          - aspectRatio
                        additionalProperties: false
                      review:
                        type: object
                        properties:
                          avatar:
                            type: object
                            properties:
                              name:
                                type: string
                              imageUrl:
                                type: string
                                nullable: true
                            required:
                              - name
                              - imageUrl
                          voice:
                            type: string
                          tone:
                            type: string
                          background:
                            type: string
                          prop:
                            type: string
                          model:
                            type: string
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '20:9'
                              - 19.5:9
                              - '2:1'
                              - '16:9'
                              - '3:2'
                              - '4:3'
                              - '5:4'
                              - '1:1'
                              - '4:5'
                              - '3:4'
                              - '2:3'
                              - '9:16'
                              - '1:2'
                              - '9:19.5'
                              - '9:20'
                              - '9:21'
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 480P
                                  - 768P
                                  - 1080P
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          subtitles:
                            type: string
                          template:
                            type: string
                          notice:
                            type: string
                          avatars:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                imageUrl:
                                  type: string
                                  nullable: true
                                voice:
                                  type: string
                              required:
                                - name
                                - imageUrl
                                - voice
                        required:
                          - avatar
                          - voice
                          - tone
                          - background
                          - prop
                          - model
                          - aspectRatio
                          - subtitles
                          - template
                      scriptSeconds:
                        type: number
                        minimum: 0
                      aspectRatios:
                        type: array
                        items:
                          type: string
                          enum:
                            - '21:9'
                            - '20:9'
                            - 19.5:9
                            - '2:1'
                            - '16:9'
                            - '3:2'
                            - '4:3'
                            - '5:4'
                            - '1:1'
                            - '4:5'
                            - '3:4'
                            - '2:3'
                            - '9:16'
                            - '1:2'
                            - '9:19.5'
                            - '9:20'
                            - '9:21'
                      estimatedWait:
                        type: string
                      visualsUnavailableReason:
                        type: string
                      status:
                        type: string
                        enum:
                          - ready
                      estimatedCredits:
                        type: number
                        minimum: 0
                    required:
                      - attemptId
                      - input
                      - review
                      - scriptSeconds
                      - aspectRatios
                      - status
                      - estimatedCredits
                  - type: object
                    properties:
                      attemptId:
                        type: string
                        format: uuid
                      preparationToken:
                        type: string
                        format: uuid
                      input:
                        type: object
                        properties:
                          avatar:
                            type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - custom
                                  - curated
                                  - element
                              id:
                                type: string
                                format: uuid
                            required:
                              - kind
                              - id
                            additionalProperties: false
                          voice:
                            oneOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - stock
                                  voiceId:
                                    type: string
                                    minLength: 1
                                    maxLength: 200
                                required:
                                  - kind
                                  - voiceId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - custom
                                  customVoiceId:
                                    type: string
                                    format: uuid
                                required:
                                  - kind
                                  - customVoiceId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - auto
                                required:
                                  - kind
                                additionalProperties: false
                          voiceName:
                            type: string
                            maxLength: 200
                          otherAvatars:
                            type: array
                            items:
                              type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - custom
                                    - curated
                                    - element
                                id:
                                  type: string
                                  format: uuid
                                voice:
                                  oneOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - stock
                                        voiceId:
                                          type: string
                                          minLength: 1
                                          maxLength: 200
                                      required:
                                        - kind
                                        - voiceId
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - custom
                                        customVoiceId:
                                          type: string
                                          format: uuid
                                      required:
                                        - kind
                                        - customVoiceId
                                      additionalProperties: false
                                voiceName:
                                  type: string
                                  maxLength: 200
                              required:
                                - kind
                                - id
                              additionalProperties: false
                            minItems: 1
                            maxItems: 2
                          tone:
                            type: string
                            minLength: 1
                            maxLength: 200
                          engine:
                            type: string
                            enum:
                              - seedance
                            default: seedance
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 480P
                                  - 768P
                                  - 1080P
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          subtitles:
                            type: object
                            properties:
                              preset:
                                type: string
                                enum:
                                  - simple
                                  - plain
                                  - beans
                                  - corpo
                                  - boo
                                  - shadeplay
                                  - casper
                                  - capri
                                  - lowkey
                                  - vinta
                                  - diego
                                  - ali
                                  - slay
                                  - kitty
                                  - hustle
                                  - karl
                                  - sprout
                                  - flex
                                  - mint
                                  - rizz
                                  - vegas
                                  - glass
                                  - whisper
                                  - glide2
                                  - fusion
                                  - glide
                                  - terminal
                                  - handwritten
                              language:
                                type: string
                              position:
                                type: string
                                enum:
                                  - top
                                  - center
                                  - bottom
                              textCustomizations:
                                type: object
                                properties:
                                  baseline:
                                    type: object
                                    properties:
                                      font:
                                        type: string
                                      weight:
                                        type: integer
                                      color:
                                        type: string
                                  highlighted:
                                    type: object
                                    properties:
                                      font:
                                        type: string
                                      weight:
                                        type: integer
                                      color:
                                        type: string
                            required:
                              - preset
                          creationSettings:
                            type: object
                            properties:
                              videoStyle:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    enum:
                                      - auto
                                      - self-filmed
                                      - produced
                                      - drama
                                      - vlog
                                      - podcast
                                      - unboxing
                                      - tutorial
                                      - announcement
                                      - explainer
                                      - founder-story
                                      - before-after
                                      - corporate-training
                                      - storytime
                                      - comment-reply
                                      - streamer-reaction
                                      - animated-3d
                                      - street-interview
                                  version:
                                    type: number
                                    enum:
                                      - 1
                                required:
                                  - id
                                  - version
                              speech:
                                type: string
                                enum:
                                  - on-screen
                                  - narration
                              visuals:
                                type: string
                                enum:
                                  - auto
                                  - 'on'
                                  - 'off'
                                description: >-
                                  Auto chooses useful supporting visuals from
                                  the script, actions and props across video
                                  styles, and may keep generated footage alone.
                                  Off skips added visuals. On remains accepted
                                  for compatibility. Subtitles are separate;
                                  generation eligibility still applies.
                              pronunciations:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    word:
                                      type: string
                                      minLength: 1
                                      maxLength: 200
                                    pronunciation:
                                      type: string
                                      minLength: 1
                                      maxLength: 200
                                  required:
                                    - word
                                    - pronunciation
                                maxItems: 50
                                description: >-
                                  Confirmed spoken spellings, e.g.
                                  [{"word":"Emmaus","pronunciation":"ee-may-us"}].
                                  Applied to speech only; keep the original
                                  spelling in the script and visual directions.
                            required:
                              - videoStyle
                              - speech
                          scriptTemplate:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              revision:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              source:
                                type: string
                                enum:
                                  - database
                            required:
                              - id
                              - revision
                              - source
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  maxLength: 200
                                text:
                                  type: string
                                  maxLength: 5000
                                action:
                                  type: string
                                  maxLength: 2000
                                kind:
                                  type: string
                                  enum:
                                    - action
                                cutaway:
                                  type: boolean
                                  enum:
                                    - true
                                seconds:
                                  type: integer
                                  minimum: 1
                                  maximum: 8
                                speakerId:
                                  type: string
                                  maxLength: 200
                                scene:
                                  type: string
                                  maxLength: 2000
                              required:
                                - text
                              additionalProperties: false
                            minItems: 1
                            maxItems: 30
                          backgroundId:
                            type: string
                            format: uuid
                          propAssetId:
                            type: string
                            format: uuid
                          propName:
                            type: string
                            maxLength: 200
                          props:
                            type: array
                            items:
                              type: object
                              properties:
                                assetId:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 200
                              required:
                                - assetId
                              additionalProperties: false
                            minItems: 1
                            maxItems: 6
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '20:9'
                              - 19.5:9
                              - '2:1'
                              - '16:9'
                              - '3:2'
                              - '4:3'
                              - '5:4'
                              - '1:1'
                              - '4:5'
                              - '3:4'
                              - '2:3'
                              - '9:16'
                              - '1:2'
                              - '9:19.5'
                              - '9:20'
                              - '9:21'
                            default: '9:16'
                          workId:
                            type: string
                            format: uuid
                        required:
                          - avatar
                          - voice
                          - engine
                          - sections
                          - aspectRatio
                        additionalProperties: false
                      review:
                        type: object
                        properties:
                          avatar:
                            type: object
                            properties:
                              name:
                                type: string
                              imageUrl:
                                type: string
                                nullable: true
                            required:
                              - name
                              - imageUrl
                          voice:
                            type: string
                          tone:
                            type: string
                          background:
                            type: string
                          prop:
                            type: string
                          model:
                            type: string
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '20:9'
                              - 19.5:9
                              - '2:1'
                              - '16:9'
                              - '3:2'
                              - '4:3'
                              - '5:4'
                              - '1:1'
                              - '4:5'
                              - '3:4'
                              - '2:3'
                              - '9:16'
                              - '1:2'
                              - '9:19.5'
                              - '9:20'
                              - '9:21'
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 480P
                                  - 768P
                                  - 1080P
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          subtitles:
                            type: string
                          template:
                            type: string
                          notice:
                            type: string
                          avatars:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                imageUrl:
                                  type: string
                                  nullable: true
                                voice:
                                  type: string
                              required:
                                - name
                                - imageUrl
                                - voice
                        required:
                          - avatar
                          - voice
                          - tone
                          - background
                          - prop
                          - model
                          - aspectRatio
                          - subtitles
                          - template
                      scriptSeconds:
                        type: number
                        minimum: 0
                      aspectRatios:
                        type: array
                        items:
                          type: string
                          enum:
                            - '21:9'
                            - '20:9'
                            - 19.5:9
                            - '2:1'
                            - '16:9'
                            - '3:2'
                            - '4:3'
                            - '5:4'
                            - '1:1'
                            - '4:5'
                            - '3:4'
                            - '2:3'
                            - '9:16'
                            - '1:2'
                            - '9:19.5'
                            - '9:20'
                            - '9:21'
                      estimatedWait:
                        type: string
                      visualsUnavailableReason:
                        type: string
                      status:
                        type: string
                        enum:
                          - invalid
                      estimatedCredits:
                        type: string
                        nullable: true
                        enum:
                          - null
                      validationError:
                        type: string
                    required:
                      - attemptId
                      - input
                      - review
                      - scriptSeconds
                      - aspectRatios
                      - status
                      - estimatedCredits
                      - validationError
                  - type: object
                    properties:
                      attemptId:
                        type: string
                        format: uuid
                      preparationToken:
                        type: string
                        format: uuid
                      input:
                        type: object
                        properties:
                          avatar:
                            type: object
                            properties:
                              kind:
                                type: string
                                enum:
                                  - custom
                                  - curated
                                  - element
                              id:
                                type: string
                                format: uuid
                            required:
                              - kind
                              - id
                            additionalProperties: false
                          voice:
                            oneOf:
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - stock
                                  voiceId:
                                    type: string
                                    minLength: 1
                                    maxLength: 200
                                required:
                                  - kind
                                  - voiceId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - custom
                                  customVoiceId:
                                    type: string
                                    format: uuid
                                required:
                                  - kind
                                  - customVoiceId
                                additionalProperties: false
                              - type: object
                                properties:
                                  kind:
                                    type: string
                                    enum:
                                      - auto
                                required:
                                  - kind
                                additionalProperties: false
                          voiceName:
                            type: string
                            maxLength: 200
                          otherAvatars:
                            type: array
                            items:
                              type: object
                              properties:
                                kind:
                                  type: string
                                  enum:
                                    - custom
                                    - curated
                                    - element
                                id:
                                  type: string
                                  format: uuid
                                voice:
                                  oneOf:
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - stock
                                        voiceId:
                                          type: string
                                          minLength: 1
                                          maxLength: 200
                                      required:
                                        - kind
                                        - voiceId
                                      additionalProperties: false
                                    - type: object
                                      properties:
                                        kind:
                                          type: string
                                          enum:
                                            - custom
                                        customVoiceId:
                                          type: string
                                          format: uuid
                                      required:
                                        - kind
                                        - customVoiceId
                                      additionalProperties: false
                                voiceName:
                                  type: string
                                  maxLength: 200
                              required:
                                - kind
                                - id
                              additionalProperties: false
                            minItems: 1
                            maxItems: 2
                          tone:
                            type: string
                            minLength: 1
                            maxLength: 200
                          engine:
                            type: string
                            enum:
                              - seedance
                            default: seedance
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 480P
                                  - 768P
                                  - 1080P
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          subtitles:
                            type: object
                            properties:
                              preset:
                                type: string
                                enum:
                                  - simple
                                  - plain
                                  - beans
                                  - corpo
                                  - boo
                                  - shadeplay
                                  - casper
                                  - capri
                                  - lowkey
                                  - vinta
                                  - diego
                                  - ali
                                  - slay
                                  - kitty
                                  - hustle
                                  - karl
                                  - sprout
                                  - flex
                                  - mint
                                  - rizz
                                  - vegas
                                  - glass
                                  - whisper
                                  - glide2
                                  - fusion
                                  - glide
                                  - terminal
                                  - handwritten
                              language:
                                type: string
                              position:
                                type: string
                                enum:
                                  - top
                                  - center
                                  - bottom
                              textCustomizations:
                                type: object
                                properties:
                                  baseline:
                                    type: object
                                    properties:
                                      font:
                                        type: string
                                      weight:
                                        type: integer
                                      color:
                                        type: string
                                  highlighted:
                                    type: object
                                    properties:
                                      font:
                                        type: string
                                      weight:
                                        type: integer
                                      color:
                                        type: string
                            required:
                              - preset
                          creationSettings:
                            type: object
                            properties:
                              videoStyle:
                                type: object
                                properties:
                                  id:
                                    type: string
                                    enum:
                                      - auto
                                      - self-filmed
                                      - produced
                                      - drama
                                      - vlog
                                      - podcast
                                      - unboxing
                                      - tutorial
                                      - announcement
                                      - explainer
                                      - founder-story
                                      - before-after
                                      - corporate-training
                                      - storytime
                                      - comment-reply
                                      - streamer-reaction
                                      - animated-3d
                                      - street-interview
                                  version:
                                    type: number
                                    enum:
                                      - 1
                                required:
                                  - id
                                  - version
                              speech:
                                type: string
                                enum:
                                  - on-screen
                                  - narration
                              visuals:
                                type: string
                                enum:
                                  - auto
                                  - 'on'
                                  - 'off'
                                description: >-
                                  Auto chooses useful supporting visuals from
                                  the script, actions and props across video
                                  styles, and may keep generated footage alone.
                                  Off skips added visuals. On remains accepted
                                  for compatibility. Subtitles are separate;
                                  generation eligibility still applies.
                              pronunciations:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    word:
                                      type: string
                                      minLength: 1
                                      maxLength: 200
                                    pronunciation:
                                      type: string
                                      minLength: 1
                                      maxLength: 200
                                  required:
                                    - word
                                    - pronunciation
                                maxItems: 50
                                description: >-
                                  Confirmed spoken spellings, e.g.
                                  [{"word":"Emmaus","pronunciation":"ee-may-us"}].
                                  Applied to speech only; keep the original
                                  spelling in the script and visual directions.
                            required:
                              - videoStyle
                              - speech
                          scriptTemplate:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                              revision:
                                type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              source:
                                type: string
                                enum:
                                  - database
                            required:
                              - id
                              - revision
                              - source
                          sections:
                            type: array
                            items:
                              type: object
                              properties:
                                title:
                                  type: string
                                  maxLength: 200
                                text:
                                  type: string
                                  maxLength: 5000
                                action:
                                  type: string
                                  maxLength: 2000
                                kind:
                                  type: string
                                  enum:
                                    - action
                                cutaway:
                                  type: boolean
                                  enum:
                                    - true
                                seconds:
                                  type: integer
                                  minimum: 1
                                  maximum: 8
                                speakerId:
                                  type: string
                                  maxLength: 200
                                scene:
                                  type: string
                                  maxLength: 2000
                              required:
                                - text
                              additionalProperties: false
                            minItems: 1
                            maxItems: 30
                          backgroundId:
                            type: string
                            format: uuid
                          propAssetId:
                            type: string
                            format: uuid
                          propName:
                            type: string
                            maxLength: 200
                          props:
                            type: array
                            items:
                              type: object
                              properties:
                                assetId:
                                  type: string
                                  format: uuid
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 200
                              required:
                                - assetId
                              additionalProperties: false
                            minItems: 1
                            maxItems: 6
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '20:9'
                              - 19.5:9
                              - '2:1'
                              - '16:9'
                              - '3:2'
                              - '4:3'
                              - '5:4'
                              - '1:1'
                              - '4:5'
                              - '3:4'
                              - '2:3'
                              - '9:16'
                              - '1:2'
                              - '9:19.5'
                              - '9:20'
                              - '9:21'
                            default: '9:16'
                          workId:
                            type: string
                            format: uuid
                        required:
                          - avatar
                          - voice
                          - engine
                          - sections
                          - aspectRatio
                        additionalProperties: false
                      review:
                        type: object
                        properties:
                          avatar:
                            type: object
                            properties:
                              name:
                                type: string
                              imageUrl:
                                type: string
                                nullable: true
                            required:
                              - name
                              - imageUrl
                          voice:
                            type: string
                          tone:
                            type: string
                          background:
                            type: string
                          prop:
                            type: string
                          model:
                            type: string
                          aspectRatio:
                            type: string
                            enum:
                              - '21:9'
                              - '20:9'
                              - 19.5:9
                              - '2:1'
                              - '16:9'
                              - '3:2'
                              - '4:3'
                              - '5:4'
                              - '1:1'
                              - '4:5'
                              - '3:4'
                              - '2:3'
                              - '9:16'
                              - '1:2'
                              - '9:19.5'
                              - '9:20'
                              - '9:21'
                          resolution:
                            oneOf:
                              - type: string
                                enum:
                                  - 360p
                                  - 480p
                                  - 540p
                                  - 580p
                                  - 720p
                                  - 480P
                                  - 768P
                                  - 1080P
                                  - 1080p
                                  - 1440p
                                  - 2160p
                                  - 4k
                                  - 0.5K
                                  - 1K
                                  - 2K
                                  - 4K
                                  - 1k
                                  - 2k
                              - type: string
                          subtitles:
                            type: string
                          template:
                            type: string
                          notice:
                            type: string
                          avatars:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                imageUrl:
                                  type: string
                                  nullable: true
                                voice:
                                  type: string
                              required:
                                - name
                                - imageUrl
                                - voice
                        required:
                          - avatar
                          - voice
                          - tone
                          - background
                          - prop
                          - model
                          - aspectRatio
                          - subtitles
                          - template
                      scriptSeconds:
                        type: number
                        minimum: 0
                      aspectRatios:
                        type: array
                        items:
                          type: string
                          enum:
                            - '21:9'
                            - '20:9'
                            - 19.5:9
                            - '2:1'
                            - '16:9'
                            - '3:2'
                            - '4:3'
                            - '5:4'
                            - '1:1'
                            - '4:5'
                            - '3:4'
                            - '2:3'
                            - '9:16'
                            - '1:2'
                            - '9:19.5'
                            - '9:20'
                            - '9:21'
                      estimatedWait:
                        type: string
                      visualsUnavailableReason:
                        type: string
                      status:
                        type: string
                        enum:
                          - estimate_unavailable
                      estimatedCredits:
                        type: string
                        nullable: true
                        enum:
                          - null
                    required:
                      - attemptId
                      - input
                      - review
                      - scriptSeconds
                      - aspectRatios
                      - status
                      - estimatedCredits
        '400':
          description: '400'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '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: '403'
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - 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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.