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

# Create Videos



## OpenAPI

````yaml POST /v1/videos
openapi: 3.0.0
info:
  title: Video AIditor APIs
  description: ''
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.videoaiditor.com
    description: REST API server
security: []
tags: []
paths:
  /v1/videos:
    post:
      tags:
        - Videos
      summary: Create a new video
      operationId: ApiVideoController_createVideo
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateVideoDto'
      responses:
        '201':
          description: The video has been successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoResponseDto'
        '400':
          description: Invalid input or missing required fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestDto'
        '401':
          description: Invalid or missing authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedDto'
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    CreateVideoDto:
      type: object
      properties:
        renderOptionsInUI:
          type: string
          default: []
          enum:
            - json
            - client
            - server
          description: >-
            Render options to display in UI. Leave empty to restrict renderer
            access
        metadata:
          description: Video project metadata
          allOf:
            - $ref: '#/components/schemas/MetadataDto'
        clips:
          description: Array of clips that make up the video
          type: array
          items:
            $ref: '#/components/schemas/ClipDto'
        additional:
          type: object
          description: Additional custom properties
      required:
        - metadata
        - clips
    VideoResponseDto:
      type: object
      properties:
        data:
          description: Video data
          allOf:
            - $ref: '#/components/schemas/VideoResponseData'
      required:
        - data
    BadRequestDto:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          example:
            - Invalid input
            - Missing required field
          type: array
          items:
            type: string
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
        - error
    UnauthorizedDto:
      type: object
      properties:
        statusCode:
          type: number
          example: 401
        message:
          example:
            - Invalid credentials
            - Token expired
          type: array
          items:
            type: string
        error:
          type: string
          example: Unauthorized
      required:
        - statusCode
        - message
        - error
    MetadataDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the video project
        backgroundColor:
          type: string
          default: '#000000'
          description: Background color of the canvas in hex format
        duration:
          type: number
          description: Total duration of the video in milliseconds
        fps:
          type: number
          default: 30
          description: 'Frames per second. Common values: 24, 30, 60'
        canvas:
          description: Canvas/stage properties
          allOf:
            - $ref: '#/components/schemas/CanvasDto'
      required:
        - name
        - backgroundColor
        - duration
        - fps
        - canvas
    ClipDto:
      type: object
      properties:
        type:
          type: string
          description: 'Type of clip. Possible values: video, image, text, audio, caption'
          enum:
            - video
            - image
            - text
            - audio
            - caption
        name:
          type: string
          description: Optional display name for the clip
        source:
          type: string
          description: URL to the source media file (video, image, or audio)
        volume:
          type: number
          default: 1
          description: Audio volume level. 0 is muted, 1 is full volume
        timeFrame:
          description: Timing properties for when the clip plays
          allOf:
            - $ref: '#/components/schemas/TimeFrameDto'
        position:
          description: Position properties for where the clip appears
          allOf:
            - $ref: '#/components/schemas/PositionDto'
        transform:
          description: Transform properties for scaling and rotating the clip
          allOf:
            - $ref: '#/components/schemas/TransformDto'
        size:
          description: Size properties for clip dimensions
          allOf:
            - $ref: '#/components/schemas/SizeDto'
        textProperties:
          description: Text styling properties, only used for text clips
          allOf:
            - $ref: '#/components/schemas/TextPropertiesDto'
        captionProperties:
          description: Caption properties, used for caption clips
          allOf:
            - $ref: '#/components/schemas/CaptionPropertiesDto'
      required:
        - type
        - source
        - timeFrame
        - position
        - transform
        - size
    VideoResponseData:
      type: object
      properties:
        _id:
          type: string
          description: Unique identifier of the video
        version:
          type: string
          description: Version number of the video format
        metadata:
          description: Video metadata including redirect URL
          allOf:
            - $ref: '#/components/schemas/ResponseMetadataDto'
        clips:
          description: Array of clips in the video
          type: array
          items:
            $ref: '#/components/schemas/ResponseClipDto'
        additional:
          type: object
          description: Additional custom properties
        createdAt:
          format: date-time
          type: string
          description: Creation timestamp
        updatedAt:
          format: date-time
          type: string
          description: Last update timestamp
      required:
        - _id
        - version
        - metadata
        - clips
        - createdAt
        - updatedAt
    CanvasDto:
      type: object
      properties:
        width:
          type: number
          default: 1920
          description: 'Canvas width in pixels. Common values: 1920 (1080p), 1280 (720p)'
        height:
          type: number
          default: 1080
          description: 'Canvas height in pixels. Common values: 1080 (1080p), 720 (720p)'
      required:
        - width
        - height
    TimeFrameDto:
      type: object
      properties:
        start:
          type: number
          default: 0
          description: Start time in milliseconds when the clip should begin playing
        end:
          type: number
          description: End time in milliseconds when the clip should stop playing
        offset:
          type: number
          description: >-
            Time offset in milliseconds to start playing from within the source
            media
      required:
        - start
        - end
    PositionDto:
      type: object
      properties:
        x:
          type: number
          default: 0
          description: Horizontal position in pixels from left edge of canvas
        'y':
          type: number
          default: 0
          description: Vertical position in pixels from top edge of canvas
        z:
          type: number
          default: 0
          description: Z-index for layering clips. Higher numbers appear on top
      required:
        - x
        - 'y'
        - z
    TransformDto:
      type: object
      properties:
        scale:
          description: Scale transformation properties
          allOf:
            - $ref: '#/components/schemas/ScaleDto'
        rotation:
          type: number
          description: Rotation in degrees. Positive values rotate clockwise
      required:
        - scale
    SizeDto:
      type: object
      properties:
        width:
          type: number
          default: 100
          description: Width in pixels
        height:
          type: number
          default: 100
          description: Height in pixels
      required:
        - width
        - height
    TextPropertiesDto:
      type: object
      properties:
        content:
          type: string
          description: The text content to display
        fontSize:
          type: number
          default: 16
          description: Font size in pixels
        fontWeight:
          type: number
          default: 400
          description: Font weight (100-900). 400 is normal, 700 is bold
        fontFamily:
          type: string
          default: Arial
          description: 'Font family name. Common values: Arial, Times New Roman, Helvetica'
        color:
          type: string
          default: '#000000'
          description: Text color in hex format
        backgroundColor:
          type: string
          default: transparent
          description: Background color in hex format
        textAlign:
          type: string
          default: left
          description: 'Text alignment. Possible values: left, center, right, justify'
        fontStyle:
          type: string
          default: normal
          description: 'Font style. Possible values: normal, italic'
        padding:
          type: number
          default: 0
          description: Padding around the text in pixels
        strokeWidth:
          type: number
          default: 0
          description: Width of the text stroke/outline in pixels
        strokeColor:
          type: string
          default: '#000000'
          description: Color of the text stroke/outline in hex format
        borderWidth:
          type: number
          default: 0
          description: Width of the text border in pixels
        borderColor:
          type: string
          default: '#FFFFFF'
          description: Color of the text border in hex format
        underline:
          type: boolean
          default: false
          description: Whether to underline the text
      required:
        - content
    CaptionPropertiesDto:
      type: object
      properties:
        words:
          description: Array of words with their timing information
          type: array
          items:
            $ref: '#/components/schemas/WordDto'
        highlightTextProperties:
          description: Text style properties for highlighted words
          allOf:
            - $ref: '#/components/schemas/TextStylePropertiesDto'
        nonHighlightTextProperties:
          description: Text style properties for non-highlighted words
          allOf:
            - $ref: '#/components/schemas/TextStylePropertiesDto'
        textAlign:
          type: string
          default: center
          description: 'Text alignment. Possible values: left, center, right, justify'
        maxWidth:
          type: number
          default: 500
          description: Maximum width of the caption text in pixels
        maxWordsInFrame:
          type: number
          default: 5
          description: Maximum number of words to show in a single frame
      required:
        - words
        - highlightTextProperties
        - nonHighlightTextProperties
    ResponseMetadataDto:
      type: object
      properties:
        name:
          type: string
          description: Name of the video project
        backgroundColor:
          type: string
          default: '#000000'
          description: Background color of the canvas in hex format
        duration:
          type: number
          description: Total duration of the video in milliseconds
        fps:
          type: number
          default: 30
          description: 'Frames per second. Common values: 24, 30, 60'
        canvas:
          description: Canvas/stage properties
          allOf:
            - $ref: '#/components/schemas/CanvasDto'
        redirectUrl:
          type: string
          description: URL to redirect to after video processing completes
      required:
        - name
        - backgroundColor
        - duration
        - fps
        - canvas
    ResponseClipDto:
      type: object
      properties:
        type:
          type: string
          description: 'Type of clip. Possible values: video, image, text, audio, caption'
          enum:
            - video
            - image
            - text
            - audio
            - caption
        name:
          type: string
          description: Optional display name for the clip
        source:
          type: string
          description: URL to the source media file (video, image, or audio)
        volume:
          type: number
          default: 1
          description: Audio volume level. 0 is muted, 1 is full volume
        timeFrame:
          description: Timing properties for when the clip plays
          allOf:
            - $ref: '#/components/schemas/TimeFrameDto'
        position:
          description: Position properties for where the clip appears
          allOf:
            - $ref: '#/components/schemas/PositionDto'
        transform:
          description: Transform properties for scaling and rotating the clip
          allOf:
            - $ref: '#/components/schemas/TransformDto'
        size:
          description: Size properties for clip dimensions
          allOf:
            - $ref: '#/components/schemas/SizeDto'
        textProperties:
          description: Text styling properties, only used for text clips
          allOf:
            - $ref: '#/components/schemas/TextPropertiesDto'
        captionProperties:
          description: Caption properties, used for caption clips
          allOf:
            - $ref: '#/components/schemas/CaptionPropertiesDto'
        id:
          type: string
          description: Unique identifier for the clip
      required:
        - type
        - source
        - timeFrame
        - position
        - transform
        - size
        - id
    ScaleDto:
      type: object
      properties:
        x:
          type: number
          default: 1
          description: >-
            Horizontal scale factor. 1 means original size, 2 means double size,
            0.5 means half size
        'y':
          type: number
          default: 1
          description: >-
            Vertical scale factor. 1 means original size, 2 means double size,
            0.5 means half size
      required:
        - x
        - 'y'
    WordDto:
      type: object
      properties:
        start:
          type: number
          description: Start time in milliseconds when the word should appear
        end:
          type: number
          description: End time in milliseconds when the word should disappear
        word:
          type: string
          description: The word text to display
      required:
        - start
        - end
        - word
    TextStylePropertiesDto:
      type: object
      properties:
        fontSize:
          type: number
          default: 24
          description: Font size in pixels
        color:
          type: string
          default: '#000000'
          description: Text color in hex format
        fontFamily:
          type: string
          default: Montserrat
          description: Font family name
        fontWeight:
          type: number
          default: 400
          description: Font weight (100-900). 400 is normal, 700 is bold
        fontStyle:
          type: string
          default: normal
          description: 'Font style. Possible values: normal, italic'
        underline:
          type: boolean
          default: false
          description: Whether to underline the text
        padding:
          type: number
          default: 0
          description: Padding around the text in pixels
        strokeWidth:
          type: number
          default: 0
          description: Width of the text stroke/outline in pixels
        strokeColor:
          type: string
          default: '#000000'
          description: Color of the text stroke/outline in hex format
        borderWidth:
          type: number
          default: 0
          description: Width of the text border in pixels
        borderColor:
          type: string
          default: '#FFFFFF'
          description: Color of the text border in hex format
        backgroundColor:
          type: string
          description: Background color in hex format
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      description: Enter your API key here

````