# "video đa phương thức"

Nguồn: https://docs.openaihub.net/api-45209003/

> API origin: `https://api.openaihub.net`. Chọn đúng nhóm API và model. Thông số dưới đây là bản tham chiếu kỹ thuật; chưa phải kết quả kiểm thử từng endpoint bằng tài khoản của bạn.


## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /kling/v1/videos/multi-elements:
    post:
      summary: video đa phương thức
      deprecated: false
      description: ''
      operationId: post-kling-v1-videos-multi-elements
      tags:
        - >-
          OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/Chỉnh sửa video đa phương
          thức
        - kling
      parameters:
        - name: Content-Type
          in: header
          description: Content-Type của phần thân yêu cầu, thường là application/json
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: Khóa API Bearer
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - model_name
                - session_id
                - edit_mode
                - prompt
                - mode
                - duration
              properties:
                callback_url:
                  type: string
                  description: URL gọi lại được kích hoạt khi tác vụ hoàn tất
                duration:
                  type: string
                  description: |-
                    Thời lượng video được tạo (giây)
                    enum: 5, 10
                edit_mode:
                  type: string
                  description: >-
                    kiểu thao tác liệt kê: addition, swap, removal, trong đó:
                    addition: thêm phần tửswap: hoán đổi phần tửremoval: xóa
                    phần tử
                external_task_id:
                  type: string
                  description: >-
                    Mã định danh tác vụ bên ngoài tùy chỉnh để đối chiếu phía
                    nghiệp vụ
                image_list:
                  type: array
                  items:
                    type: string
                    description: >-
                      Các mẫu lời nhắc được đề xuất. Thêm: Sử dụng ngữ cảnh của
                      <<<video_1>>>, thêm [x] từ <<<image_1>>> một cách liền
                      mạch. Hoán đổi: hoán đổi [x] từ <<<image_1>>> bằng [x] từ
                      <<<video_1>>>. Xóa: Xóa [x] khỏi <<<video_1>>>. Dấu ngoặc
                      tiếng Trung / [x] tiếng Anh là các phần do người dùng
                      điền.
                  description: hình ảnh tham chiếu đã cắt
                mode:
                  type: string
                  description: |-
                    Chế độ tạo video
                    liệt kê: std, pro
                    std: tiêu chuẩn / tiết kiệm chi phí
                    pro: chuyên nghiệp / chất lượng cao
                model_name:
                  type: string
                  description: 'Enum tên mô hình: kling-v1-6'
                negative_prompt:
                  type: string
                  description: lời nhắc văn bản phủ định
                prompt:
                  type: string
                  description: lời nhắc văn bản tích cực
                session_id:
                  type: string
                  description: >-
                    ID phiên từ lúc khởi tạo video; không thay đổi khi chỉnh sửa
                    vùng chọn
              x-apifox-orders:
                - callback_url
                - duration
                - edit_mode
                - external_task_id
                - image_list
                - mode
                - model_name
                - negative_prompt
                - prompt
                - session_id
              x-apidog-orders:
                - callback_url
                - duration
                - edit_mode
                - external_task_id
                - image_list
                - mode
                - model_name
                - negative_prompt
                - prompt
                - session_id
            examples:
              example:
                value:
                  callback_url: ''
                  duration: '5'
                  edit_mode: ''
                  external_task_id: ''
                  image_list: []
                  mode: std
                  model_name: kling-v1-6
                  negative_prompt: ''
                  prompt: ''
                  session_id: ''
                summary: example
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apidog-orders: []
              examples:
                example:
                  summary: example
                  value:
                    code: 0
                    data:
                      task_id: task_example_001
                    message: thành công
          headers: {}
          x-apidog-name: ''
        '400':
          description: Yêu cầu không hợp lệ hoặc xác thực thất bại
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - message
                      - type
                    properties:
                      message:
                        type: string
                        description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
                      type:
                        type: string
                        description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
                        examples:
                          - new_api_error
                    x-apifox-orders:
                      - message
                      - type
                    x-apidog-orders:
                      - message
                      - type
                refName: NewApiError
                x-apifox-orders:
                  - error
                x-apidog-orders:
                  - error
              examples:
                example:
                  summary: example
                  value:
                    error:
                      message: >-
                        Yêu cầu không hợp lệ (mã yêu cầu:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Yêu cầu không hợp lệ hoặc xác thực thất bại
        '401':
          description: Khóa API bị thiếu hoặc không hợp lệ
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - message
                      - type
                    properties:
                      message:
                        type: string
                        description: Thông báo lỗi (thường kết thúc bằng mã yêu cầu)
                      type:
                        type: string
                        description: Loại lỗi; các lỗi cổng cục bộ thường là new_api_error
                        examples:
                          - new_api_error
                    x-apifox-orders:
                      - message
                      - type
                    x-apidog-orders:
                      - message
                      - type
                refName: NewApiError
                x-apifox-orders:
                  - error
                x-apidog-orders:
                  - error
              examples:
                example:
                  summary: example
                  value:
                    error:
                      message: >-
                        Mã thông báo không hợp lệ (request id:
                        20260805120000123456789AbCdEfGh)
                      type: new_api_error
          headers: {}
          x-apidog-name: Khóa API bị thiếu hoặc không hợp lệ
      security: []
      x-apidog-folder: >-
        OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/Chỉnh sửa video đa phương
        thức
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209003-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
