# "Tạo video veo-3.1-generate-preview"

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

> 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/video/generations:
    post:
      summary: Tạo video veo-3.1-generate-preview
      deprecated: false
      description: >-
        Video hợp nhất VEO · Tạo video bằng Veo 3.1 (`POST
        /v1/video/generations`); sau khi gửi yêu cầu, hãy thăm dò bằng `GET
        /v1/video/query`.
      operationId: veo_video_generations
      tags:
        - OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Veo/3.1 Định dạng gốc
        - Video hợp nhất · VEO
      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 sk-1dnXVfVZKfyMCxwo9SPuT364kWSVlRO2EUna0Zfa3AmstOrE
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                image:
                  oneOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                  description: >-
                    Hình ảnh tham chiếu cho chuyển đổi từ hình ảnh sang video
                    (tùy chọn; URL hoặc base64)
                metadata:
                  type: object
                  properties:
                    aspectRatio:
                      type: string
                      enum:
                        - '16:9'
                        - '9:16'
                      description: |-
                        Tỷ lệ khung hình. Kiểu liệt kê:
                        16:9
                        9:16
                      examples:
                        - '16:9'
                    durationSeconds:
                      type: integer
                      description: Thời lượng video tính bằng giây
                      examples:
                        - 6
                    generateAudio:
                      type: boolean
                      description: >-
                        Có tạo âm thanh hay không (được một số mô hình Veo hỗ
                        trợ)
                    negativePrompt:
                      type: string
                      description: Lời nhắc phủ định
                    resolution:
                      type: string
                      enum:
                        - 720p
                        - 1080p
                      description: |-
                        Độ phân giải. Kiểu liệt kê:
                        720p
                        1080p
                      examples:
                        - 720p
                  description: >-
                    Tham số tạo Veo (được chuyển tiếp tới các tham số thượng
                    nguồn)
                  x-apifox-orders:
                    - aspectRatio
                    - durationSeconds
                    - generateAudio
                    - negativePrompt
                    - resolution
                  x-apidog-orders:
                    - aspectRatio
                    - durationSeconds
                    - generateAudio
                    - negativePrompt
                    - resolution
                model:
                  type: string
                  enum:
                    - veo-3.1-generate-preview
                    - veo-3.1-fast-generate-preview
                    - veo-3.0-generate-001
                    - veo-3.0-fast-generate-001
                  description: |-
                    Tên mô hình. Kiểu liệt kê:
                    veo-3.1-generate-preview
                    veo-3.1-fast-generate-preview
                    veo-3.0-generate-001
                    veo-3.0-fast-generate-001
                  examples:
                    - veo-3.1-generate-preview
                prompt:
                  type: string
                  description: Mô tả nội dung video (bắt buộc)
                  examples:
                    - >-
                      Cảnh cận cảnh hai người đang nhìn chằm chằm vào một hình
                      vẽ bí ẩn trên tường
              x-apifox-orders:
                - image
                - metadata
                - model
                - prompt
              x-apidog-orders:
                - image
                - metadata
                - model
                - prompt
            examples:
              veo_3_1_fast_generate_preview:
                value:
                  metadata:
                    aspectRatio: '16:9'
                    durationSeconds: 6
                  model: veo-3.1-fast-generate-preview
                  prompt: >-
                    Cảnh cận cảnh hai người đang nhìn chằm chằm vào một hình vẽ
                    bí ẩn trên tường
                summary: veo_3_1_fast_generate_preview
                description: Chuyển văn bản thành video veo-3.1-fast-generate-preview
              veo_3_1_generate_preview:
                value:
                  metadata:
                    aspectRatio: '16:9'
                    durationSeconds: 6
                  model: veo-3.1-generate-preview
                  prompt: >-
                    Cảnh cận cảnh hai người đang nhìn chằm chằm vào một hình vẽ
                    bí ẩn trên tường
                summary: veo_3_1_generate_preview
                description: Chuyển văn bản thành video veo-3.1-generate-preview
              veo_3_1_image2video:
                value:
                  image: https://example.com/first.jpg
                  metadata:
                    aspectRatio: '16:9'
                    durationSeconds: 6
                  model: veo-3.1-generate-preview
                  prompt: Tạo chuyển động tự nhiên ngay từ khung hình đầu tiên
                summary: veo_3_1_image2video
                description: Chuyển ảnh thành video
      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
      security: []
      x-apidog-folder: OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Veo/3.1 Định dạng gốc
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45208973-run
components:
  schemas: {}
  securitySchemes: {}
servers:
  - url: https://api.openaihub.net
    description: Prod Env
security: []

```
