# "điều khiển chuyển động"

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

> 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/motion-control:
    post:
      summary: điều khiển chuyển động
      deprecated: false
      description: ''
      operationId: post-kling-v1-videos-motion-control
      tags:
        - OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/điều khiển chuyển động
        - 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:
                - image_url
                - video_url
                - character_orientation
                - mode
              properties:
                callback_url:
                  type: string
                  description: URL gọi lại được kích hoạt khi tác vụ hoàn tất
                character_orientation:
                  type: string
                  description: |-
                    Hướng nhân vật so với hình ảnh hoặc video
                    enum: image, video
                    image: khớp với hình ảnh (video tham chiếu ≤10s)
                    video: khớp với video (video tham chiếu ≤30s)
                element_list:
                  type: array
                  items:
                    type: object
                    properties:
                      element_id:
                        type: string
                        description: >-
                          khi tham chiếu một chủ thể, hướng hiện tại sẽ tuân
                          theo video tham chiếu

                          hiện tại chỉ có một chủ thể
                    x-apifox-orders:
                      - element_id
                    x-apidog-orders:
                      - element_id
                  description: danh sách tham chiếu chủ đề
                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_url:
                  type: string
                  description: >-
                    Ảnh tham chiếu; nhân vật/phông nền bám theo ảnh này. Yêu
                    cầu: tỷ lệ nhân vật hoạt hình chân thực hoặc gần chân thực,
                    tránh che khuất; diện tích nhân vật >5%; Base64 hoặc URL có
                    thể truy cập; .jpg/.jpeg/.png; tối đa 10MB; cạnh tối thiểu
                    300px; tỷ lệ khung hình 1:2.5–2.5:1
                keep_original_sound:
                  type: string
                  description: |-
                    có giữ lại âm thanh gốc của video hay không
                    enum: yes, no
                    yes: giữ lại âm thanh gốc
                    no: loại bỏ âm thanh gốc
                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: mặc định kling-v2-6 kling-v3
                prompt:
                  type: string
                  description: >-
                    lời nhắc bằng văn bản, có thể bao gồm mô tả tích cực và tiêu
                    cực

                    sử dụng lời nhắc để thêm các thành phần / chuyển động máy
                    quay, v.v., xem hướng dẫn điều khiển chuyển động của Kling

                    tối đa 2500 ký tự

                    https://docs.qingque.cn/d/home/eZQAl5y8xNSkr0iYUS8-bpGvP?identityId=2Cn18n4EIHT#section=h.xtmfpd68o18
                video_url:
                  type: string
                  description: >-
                    Yêu cầu đối với video: chính xác một người chân thực, thấy
                    toàn thân hoặc nửa thân trên và có đầu, tránh bị che khuất;
                    chuyển động rõ ràng, không lộn người hoặc trồng cây chuối;
                    quay một lần liên tục, người luôn ở trong khung hình. Định
                    dạng .mp4/.mov; dung lượng không quá 100MB; mỗi cạnh từ 340
                    đến 3850px. Tối thiểu 3 giây; tối đa 30 giây nếu hướng khớp
                    với video, 10 giây nếu khớp với hình ảnh. Nội dung đã được
                    xác thực.
                watermark_info:
                  type: array
                  items:
                    type: object
                    properties:
                      watermark_info:
                        type: boolean
                        description: |-
                          true=tạo, false=không tạo
                          hình mờ tùy chỉnh hiện chưa được hỗ trợ
                    x-apifox-orders:
                      - watermark_info
                    x-apidog-orders:
                      - watermark_info
                  description: có tạo thêm kết quả có hình chìm hay không
              x-apifox-orders:
                - callback_url
                - character_orientation
                - element_list
                - external_task_id
                - image_url
                - keep_original_sound
                - mode
                - model_name
                - prompt
                - video_url
                - watermark_info
              x-apidog-orders:
                - callback_url
                - character_orientation
                - element_list
                - external_task_id
                - image_url
                - keep_original_sound
                - mode
                - model_name
                - prompt
                - video_url
                - watermark_info
            examples:
              example:
                value:
                  character_orientation: video
                  image_url: >-
                    https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.png
                  keep_original_sound: có
                  mode: chuyên nghiệp
                  model_name: kling-v3
                  prompt: Cô gái mặc áo thun rộng màu xám và quần short denim.
                  video_url: >-
                    https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4
                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/điều khiển chuyển động
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209037-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
