Tạo video
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
Phần tiêu đề “OpenAPI Specification”openapi: 3.0.1info: title: '' description: '' version: 1.0.0paths: /v1/videos/generations: post: summary: Tạo video deprecated: false description: >- Grok Imagine chuyển văn bản/hình ảnh thành video (`POST /v1/videos/generations`). Điểm truy cập JSON gốc của xAI; thăm dò qua `GET /v1/videos/{id}`. operationId: grok_v1_videos_generations tags: - >- OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/hiểu thấu đáo/định dạng chính thức - Grok 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: '' schema: type: string requestBody: content: application/json: schema: type: object required: - model - prompt - resolution - aspect_ratio - duration properties: aspect_ratio: type: string description: ("1:1" | "16:9" | "9:16") duration: type: integer description: '[1, 15]' image: type: object required: - url properties: url: type: string description: URL tài nguyên description: Không thể sử dụng cùng với reference_images x-apifox-orders: - url x-apidog-orders: - url model: type: string description: grok-imagine-video, grok-imagine-video-1.5-preview prompt: type: string description: từ trong lời nhắc reference_images: type: array items: type: object properties: url: type: string description: URL tài nguyên x-apifox-orders: - url x-apidog-orders: - url description: Không thể sử dụng cùng với reference_images resolution: type: string description: ("480p" | "720p") refName: PostV1VideosGenerationsRequest x-apifox-orders: - aspect_ratio - duration - image - model - prompt - reference_images - resolution x-apidog-orders: - aspect_ratio - duration - image - model - prompt - reference_images - resolution examples: {} responses: '200': description: '' content: application/json: schema: type: object x-apidog-orders: [] examples: example: summary: example value: aspect_ratio: '16:9' duration: 4 model: grok-imagine-video prompt: >- Một hồ nước thanh bình lúc bình minh, với màn sương trôi là là trên mặt nước resolution: 480p 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/hiểu thấu đáo/định dạng chính thức x-apidog-status: released x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209068-runcomponents: schemas: {} securitySchemes: {}servers: - url: https://api.openaihub.net description: Prod Envsecurity: []