# videos_create

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /api/videos/:
    post:
      summary: videos_create
      deprecated: false
      description: ''
      operationId: videos_create
      tags:
        - videos
        - videos
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: true
          example: Token <api-key>
          schema:
            type: string
            default: Token <api-key>
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  default: New video
                  maxLength: 80
                  example: New video
                slides:
                  type: array
                  items:
                    $ref: '#/components/schemas/SlideRequest'
                  example: ''
                webhook:
                  allOf:
                    - $ref: '#/components/schemas/WebhookNestedRequest'
                  type: 'null'
                  example: ''
                resolution:
                  allOf:
                    - $ref: '#/components/schemas/ResolutionRequest'
                  default:
                    width: 1920
                    height: 1080
                  example: |-
                    {
                        "width": 1920,
                        "height": 1080
                    }
                auto_emotions_markup:
                  type: boolean
                  default: false
                  example: 'false'
              required:
                - slides
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Video'
          headers: {}
          x-apifox-name: 成功
      security: []
      x-apifox-folder: videos
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/4243012/apis/api-160139854-run
components:
  schemas:
    ResolutionRequest:
      type: object
      properties:
        width:
          type: integer
          maximum: 3840
          minimum: 500
          default: 1920
        height:
          type: integer
          maximum: 3840
          minimum: 500
          default: 1080
      x-apifox-orders:
        - width
        - height
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    WebhookNestedRequest:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      x-apifox-orders:
        - id
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    SlideRequest:
      type: object
      properties:
        audio_source:
          $ref: '#/components/schemas/AudioSourceRequest'
        layers:
          type: array
          items:
            $ref: '#/components/schemas/LayerRequest'
        background:
          allOf:
            - &ref_0
              $ref: '#/components/schemas/MediaFileNestedRequest'
          type: 'null'
      required:
        - audio_source
        - layers
      x-apifox-orders:
        - audio_source
        - layers
        - background
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    MediaFileNestedRequest:
      type: object
      description: File of type image or video.
      properties:
        id:
          type: integer
      required:
        - id
      x-apifox-orders:
        - id
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    LayerRequest:
      type: object
      properties:
        avatar:
          allOf:
            - $ref: '#/components/schemas/AvatarNestedRequest'
          type: 'null'
        media:
          allOf:
            - *ref_0
          type: 'null'
        x:
          type: number
          format: double
          maximum: 2
          minimum: -1
          description: >-
            Relative coordinate of content reference point by x counting from
            the left side of the frame.
        'y':
          type: number
          format: double
          maximum: 2
          minimum: -1
          description: >-
            Relative coordinate of content reference point by y counting from
            the upper side of the frame.
        scale:
          type: number
          format: double
          minimum: 0
          default: 1
          description: >-
            Content scale where the scale equal to 1 means that the height of
            the content equal to the height of the frame.
        crop:
          allOf:
            - $ref: '#/components/schemas/CropRequest'
          description: Crop bounding box coordinates. Supported only for media.
        view_type:
          allOf:
            - &ref_2
              $ref: '#/components/schemas/ViewTypeEnum'
          description: Content as is or content in circle. Supported only for avatars.
      x-apifox-orders:
        - avatar
        - media
        - x
        - 'y'
        - scale
        - crop
        - view_type
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    ViewTypeEnum:
      enum:
        - rectangular
        - circular
      type: string
      x-apifox-folder: ''
    CropRequest:
      type: object
      properties:
        left_upper_x:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of left upper crop corner by x counting from the
            upper side of the frame.
        left_upper_y:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of left upper crop corner by y counting from the
            upper side of the frame.
        right_lower_x:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of right lower crop corner by x counting from
            the upper side of the frame.
        right_lower_y:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of right lower crop corner by y counting from
            the upper side of the frame.
      required:
        - left_upper_x
        - left_upper_y
        - right_lower_x
        - right_lower_y
      x-apifox-orders:
        - left_upper_x
        - left_upper_y
        - right_lower_x
        - right_lower_y
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    AvatarNestedRequest:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      x-apifox-orders:
        - id
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    AudioSourceRequest:
      type: object
      properties:
        text:
          type: string
          nullable: true
        voice:
          allOf:
            - $ref: '#/components/schemas/TTSVoiceNestedRequest'
          type: 'null'
        file:
          allOf:
            - $ref: '#/components/schemas/AudioFileNestedRequest'
          type: 'null'
      x-apifox-orders:
        - text
        - voice
        - file
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    AudioFileNestedRequest:
      type: object
      description: File of type audio.
      properties:
        id:
          type: integer
      required:
        - id
      x-apifox-orders:
        - id
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    TTSVoiceNestedRequest:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
      x-apifox-orders:
        - id
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Video:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        cd:
          type: string
          format: date-time
          readOnly: true
          title: Created datetime
        gd:
          type: string
          format: date-time
          readOnly: true
          title: Generated datetime
          nullable: true
        name:
          type: string
          default: New video
          maxLength: 80
        slides:
          type: array
          items:
            $ref: '#/components/schemas/Slide'
        webhook:
          allOf:
            - $ref: '#/components/schemas/WebhookNested'
          type: 'null'
        resolution:
          allOf:
            - $ref: '#/components/schemas/Resolution'
          default:
            width: 1920
            height: 1080
        auto_emotions_markup:
          type: boolean
          default: false
        status:
          allOf:
            - $ref: '#/components/schemas/ExtendedTaskStatusEnum'
          readOnly: true
        result:
          type: string
          format: uri
          readOnly: true
          nullable: true
        thumbnail:
          type: string
          format: uri
          readOnly: true
          description: Thumbnail for video
      required:
        - id
        - cd
        - gd
        - slides
        - status
        - result
        - thumbnail
      x-apifox-orders:
        - id
        - cd
        - gd
        - name
        - slides
        - webhook
        - resolution
        - auto_emotions_markup
        - status
        - result
        - thumbnail
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    ExtendedTaskStatusEnum:
      enum:
        - draft
        - in_queue
        - executing
        - error
        - insufficient_balance_error
        - success
        - cleared
      type: string
      x-apifox-folder: ''
    Resolution:
      type: object
      properties:
        width:
          type: integer
          maximum: 3840
          minimum: 500
          default: 1920
        height:
          type: integer
          maximum: 3840
          minimum: 500
          default: 1080
      x-apifox-orders:
        - width
        - height
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    WebhookNested:
      type: object
      properties:
        id:
          type: integer
        cd:
          type: string
          format: date-time
          readOnly: true
          title: Created datetime
        url:
          type: string
          format: uri
          readOnly: true
      required:
        - id
        - cd
        - url
      x-apifox-orders:
        - id
        - cd
        - url
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Slide:
      type: object
      properties:
        id:
          type: integer
          readOnly: true
        audio_source:
          $ref: '#/components/schemas/AudioSource'
        layers:
          type: array
          items:
            $ref: '#/components/schemas/Layer'
        background:
          allOf:
            - &ref_1
              $ref: '#/components/schemas/MediaFileNested'
          type: 'null'
      required:
        - id
        - audio_source
        - layers
      x-apifox-orders:
        - id
        - audio_source
        - layers
        - background
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    MediaFileNested:
      type: object
      description: File of type image or video.
      properties:
        id:
          type: integer
        name:
          type: string
          readOnly: true
          description: Title of file
          nullable: true
        tag:
          allOf:
            - &ref_3
              $ref: '#/components/schemas/TagEnum'
          readOnly: true
          default: general
        file:
          type: string
          format: uri
          readOnly: true
          description: File
        compressed_file:
          type: string
          format: uri
          readOnly: true
          description: Compressed file
          nullable: true
        width:
          type: integer
          readOnly: true
          description: Width of image or video
          nullable: true
        height:
          type: integer
          readOnly: true
          description: Height of image or video
          nullable: true
      required:
        - id
        - name
        - tag
        - file
        - compressed_file
        - width
        - height
      x-apifox-orders:
        - id
        - name
        - tag
        - file
        - compressed_file
        - width
        - height
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    TagEnum:
      enum:
        - general
        - asset
        - speech
        - presentation_page
        - scene
        - scene_preview
        - background
      type: string
      x-apifox-folder: ''
    Layer:
      type: object
      properties:
        avatar:
          allOf:
            - $ref: '#/components/schemas/AvatarNested'
          type: 'null'
        media:
          allOf:
            - *ref_1
          type: 'null'
        x:
          type: number
          format: double
          maximum: 2
          minimum: -1
          description: >-
            Relative coordinate of content reference point by x counting from
            the left side of the frame.
        'y':
          type: number
          format: double
          maximum: 2
          minimum: -1
          description: >-
            Relative coordinate of content reference point by y counting from
            the upper side of the frame.
        scale:
          type: number
          format: double
          minimum: 0
          default: 1
          description: >-
            Content scale where the scale equal to 1 means that the height of
            the content equal to the height of the frame.
        crop:
          allOf:
            - $ref: '#/components/schemas/Crop'
          description: Crop bounding box coordinates. Supported only for media.
        view_type:
          allOf:
            - *ref_2
          description: Content as is or content in circle. Supported only for avatars.
      x-apifox-orders:
        - avatar
        - media
        - x
        - 'y'
        - scale
        - crop
        - view_type
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    Crop:
      type: object
      properties:
        left_upper_x:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of left upper crop corner by x counting from the
            upper side of the frame.
        left_upper_y:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of left upper crop corner by y counting from the
            upper side of the frame.
        right_lower_x:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of right lower crop corner by x counting from
            the upper side of the frame.
        right_lower_y:
          type: number
          format: double
          maximum: 1
          minimum: 0
          description: >-
            Relative coordinate of right lower crop corner by y counting from
            the upper side of the frame.
      required:
        - left_upper_x
        - left_upper_y
        - right_lower_x
        - right_lower_y
      x-apifox-orders:
        - left_upper_x
        - left_upper_y
        - right_lower_x
        - right_lower_y
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    AvatarNested:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          readOnly: true
        preview:
          type: string
          format: uri
          readOnly: true
        frame_width:
          type: integer
          readOnly: true
        frame_height:
          type: integer
          readOnly: true
      required:
        - id
        - name
        - preview
        - frame_width
        - frame_height
      x-apifox-orders:
        - id
        - name
        - preview
        - frame_width
        - frame_height
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    AudioSource:
      type: object
      properties:
        text:
          type: string
          nullable: true
        voice:
          allOf:
            - $ref: '#/components/schemas/TTSVoiceNested'
          type: 'null'
        file:
          allOf:
            - $ref: '#/components/schemas/AudioFileNested'
          type: 'null'
      x-apifox-orders:
        - text
        - voice
        - file
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    AudioFileNested:
      type: object
      description: File of type audio.
      properties:
        id:
          type: integer
        name:
          type: string
          readOnly: true
          description: Title of file
          nullable: true
        duration:
          type: number
          format: double
          readOnly: true
          description: Duration of audio or video
          nullable: true
        tag:
          allOf:
            - *ref_3
          readOnly: true
          default: general
        file:
          type: string
          format: uri
          readOnly: true
          description: File
        compressed_file:
          type: string
          format: uri
          readOnly: true
          description: Compressed file
          nullable: true
      required:
        - id
        - name
        - duration
        - tag
        - file
        - compressed_file
      x-apifox-orders:
        - id
        - name
        - duration
        - tag
        - file
        - compressed_file
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    TTSVoiceNested:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
          readOnly: true
        label:
          type: string
          readOnly: true
        provider:
          allOf:
            - $ref: '#/components/schemas/TTSProviderEnum'
          readOnly: true
        sex:
          allOf:
            - $ref: '#/components/schemas/SexEnum'
          readOnly: true
        language:
          type: string
          readOnly: true
        language_code:
          type: string
          readOnly: true
      required:
        - id
        - name
        - label
        - provider
        - sex
        - language
        - language_code
      x-apifox-orders:
        - id
        - name
        - label
        - provider
        - sex
        - language
        - language_code
      x-apifox-ignore-properties: []
      x-apifox-folder: ''
    SexEnum:
      enum:
        - male
        - female
      type: string
      x-apifox-folder: ''
    TTSProviderEnum:
      enum:
        - amazon
        - azure
        - descript
        - google
        - elevenlabs
      type: string
      x-apifox-folder: ''
  securitySchemes: {}
servers:
  - url: http://dev-cn.your-api-server.com
    description: 开发环境
  - url: http://test-cn.your-api-server.com
    description: 测试环境
  - url: https://api.spiritme.tech
    description: 正式环境
security: []

```
