# "Tạo một nhân vật từ video đã tải lên"

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

> 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:
  /v1/videos/characters:
    post:
      summary: Tạo một nhân vật từ video đã tải lên
      deprecated: false
      description: >-
        Chỉ dành cho Sora2 · tạo một nhân vật có thể tái sử dụng từ video đã tải
        lên (`POST /v1/videos/characters`).
      operationId: sora_v1_videos_characters
      tags:
        - >-
          OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/sora/Định dạng video chính thức
          của OpenAI
        - Sora2
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: |-
                    Định nghĩa tên vai trò.

                    Độ dài tối đa 80
                    Độ dài tối thiểu 1
                  examples:
                    - Chú cá nhỏ đáng yêu
                  example: Chú cá nhỏ đáng yêu
                video:
                  type: string
                  format: binary
                  description: >-
                    Tệp video dùng để tạo nhân vật. Tính năng tải nhân vật lên
                    hiện hoạt động tốt nhất với video có tỷ lệ khung hình 16:9
                    hoặc 9:16, thời lượng ngắn từ 2 đến 4 giây và độ phân giải
                    từ 720p đến 1080p. Video nguồn của nhân vật hoạt động tốt
                    nhất khi có cùng tỷ lệ khung hình với đầu ra yêu cầu. Nếu tỷ
                    lệ khung hình khác nhau, nhân vật có thể trông bị kéo giãn
                    hoặc biến dạng. Một video có thể chứa tối đa hai nhân vật.
                  examples:
                    - file://C:\Users\Administrator\Desktop\tai-xuong.mp4
                  example: file://C:\Users\Administrator\Desktop\tai-xuong.mp4
              required:
                - name
                - video
            examples:
              example:
                value:
                  name: Chú cá nhỏ đáng yêu
                  video: file://C:\Users\Administrator\Desktop\tai-xuong.mp4
                  x-i18n:
                    en-US:
                      name: Cute little fish
                summary: example
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                x-apidog-orders: []
              examples:
                example:
                  summary: example
                  value:
                    created_at: 1761622232
                    id: video_5c6a605a-30c0-4a6a-9dbd-d1d6cfdd9980
                    model: sora-2
                    object: video
                    progress: 0
                    seconds: '10'
                    size: 1280x720
                    status: queued
          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/sora/Định dạng video chính thức
        của OpenAI
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209059-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
