Bỏ qua để đến nội dung

ảnh-thành-video

Xem Markdownllms.txt

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: 3.0.1
info:
title: ''
description: ''
version: 1.0.0
paths:
/kling/image-to-video/kling-3.0-turbo:
post:
summary: ảnh-thành-video
deprecated: false
description: ''
operationId: post-kling-image-to-video-kling-3-0-turbo
tags:
- OpenAiHub Việt Nam/OpenAiHub Tiếng Việt/Video/Kling/Keling 3.0turbo
- kling
parameters: []
requestBody:
content:
application/json:
schema:
type: object
required:
- contents
properties:
contents:
type: array
items:
oneOf:
- type: object
required:
- type
- url
properties:
type:
type: string
description: Kiểu
url:
type: string
format: uri
description: >-
URL hình ảnh khung hình đầu tiên có thể truy cập
công khai. Nguồn đầu vào: jpg/jpeg/png (không hỗ
trợ webp); ≤50MB; mỗi cạnh ≥300px; tỷ lệ khung
hình từ 1:2.5 đến 2.5:1, nếu không nguồn đầu vào
sẽ báo lỗi.
description: >-
hình ảnh khung hình đầu tiên (yêu cầu ít nhất một
hình)
x-apifox-orders:
- type
- url
x-apidog-orders:
- type
- url
- type: object
required:
- type
- text
properties:
text:
type: string
description: >-
Văn bản lời nhắc, tối đa 2500 ký tự (giới hạn I2V;
thấp hơn mức 3072 của T2V).
type:
type: string
description: Kiểu
description: lời nhắc văn bản (không bắt buộc, tối đa một lời nhắc)
x-apifox-orders:
- text
- type
x-apidog-orders:
- text
- type
description: >-
Mảng `Content`, bắt buộc. Quy tắc: (1) ≥1 phần tử có
`type=first_frame` và `url`; (2) có thể có `type=prompt`
(`text` ≤2500); (3) `type` chỉ được là `prompt` hoặc
`first_frame`, nếu không sẽ trả về 400.
options:
type: object
properties:
callback_url:
type: string
format: uri
description: URL gọi lại của hệ thống nguồn sau khi tác vụ hoàn tất.
external_task_id:
type: string
description: >-
ID tác vụ bên ngoài do bên gọi xác định dành cho các
truy vấn bảo đảm không tạo hiệu ứng bổ sung khi lặp lại.
watermark_info:
type: object
description: Cấu hình hình chìm, được chuyển tiếp nguyên trạng.
x-apidog-orders: []
description: Các tham số điều khiển tác vụ, tất cả đều không bắt buộc.
x-apifox-orders:
- callback_url
- external_task_id
- watermark_info
x-apidog-orders:
- callback_url
- external_task_id
- watermark_info
settings:
type: object
properties:
aspect_ratio:
type: string
enum:
- '16:9'
- '9:16'
- '1:1'
enumDetails:
- value: '16:9'
displayName: Khung ngang 16:9
description: >-
bị phía thượng nguồn bỏ qua; được dùng làm tham
chiếu thanh toán
- value: '9:16'
displayName: Chân dung 9:16
description: >-
bị phía thượng nguồn bỏ qua; được dùng làm tham
chiếu thanh toán
- value: '1:1'
displayName: hình vuông 1:1
description: >-
bị phía thượng nguồn bỏ qua; được dùng làm tham
chiếu thanh toán
description: >-
Tỷ lệ khung hình. Cảnh báo: theo quy định chính thức,
I2V sử dụng tỷ lệ khung hình của khung hình đầu tiên nên
hệ thống thượng nguồn bỏ qua giá trị này; cổng kết nối
vẫn sử dụng giá trị đó để tính phí — hãy đặt trùng với
khung hình đầu tiên hoặc bỏ qua.
duration:
type: integer
description: >-
Thời lượng video (giây), trong khoảng 3–15. Chi phí được
tính tỷ lệ thuận theo thời lượng.
resolution:
type: string
enum:
- 720p
- 1080p
enumDetails:
- value: 720p
displayName: SD 720p
description: hệ số nhân tính phí cơ sở
- value: 1080p
displayName: HD 1080p
description: Thanh toán ~1,5 lần
description: Độ phân giải đầu ra. 1080p tính phí khoảng 1,5×.
description: >-
Các tham số tạo sinh, tất cả đều không bắt buộc. Cảnh báo:
phần thân I2V được chuyển tiếp nguyên trạng; các thiết lập
bị thiếu sẽ không được đặt giá trị mặc định — hãy thiết lập
chúng một cách rõ ràng.
x-apifox-orders:
- aspect_ratio
- duration
- resolution
x-apidog-orders:
- aspect_ratio
- duration
- resolution
description: >-
Phần thân Kling 3.0 Turbo I2V. Bắt buộc có `contents` với ít
nhất 1 mục `type=first_frame`. Phần thân được chuyển tiếp nguyên
trạng; `settings` không có giá trị mặc định (phải đặt rõ ràng).
x-apifox-orders:
- contents
- options
- settings
x-apidog-orders:
- contents
- options
- settings
examples:
'1':
value:
contents:
- type: first_frame
url: https://example.com/first-frame.jpg
settings:
aspect_ratio: '16:9'
duration: 5
resolution: 720p
summary: '1'
'2':
value:
contents:
- type: first_frame
url: https://example.com/first-frame.jpg
- text: >-
Nhân vật từ từ quay lại và vẫy tay, ánh sáng tự nhiên
dịu nhẹ, chuyển động máy quay mượt mà
type: prompt
settings:
aspect_ratio: '16:9'
duration: 5
resolution: 720p
summary: '2'
'3':
value:
contents:
- type: first_frame
url: https://example.com/first-frame.jpg
settings:
aspect_ratio: '9:16'
duration: 5
resolution: 720p
summary: '3'
'4':
value:
contents:
- type: first_frame
url: https://example.com/first-frame.jpg
- text: >-
Máy quay từ từ phóng to, chủ thể mỉm cười nhẹ nhàng, gió
khẽ thổi tóc bay
type: prompt
settings:
aspect_ratio: '16:9'
duration: 5
resolution: 1080p
summary: '4'
'5':
value:
contents:
- type: first_frame
url: https://example.com/first-frame.jpg
- text: >-
Nhân vật tự tin bước về phía trước, hậu cảnh nhòe chuyển
động, phong cách điện ảnh
type: prompt
options:
callback_url: https://your-server.com/webhook/kling
external_task_id: biz-img2v-20240623-001
settings:
aspect_ratio: '9:16'
duration: 10
resolution: 1080p
summary: '5'
'6':
value:
contents:
- type: first_frame
url: https://example.com/first-frame.jpg
- text: >-
Những cánh hoa nhẹ nhàng đung đưa, nền hiệu ứng bokeh
lung linh, bầu không khí mơ màng
type: prompt
settings:
aspect_ratio: '1:1'
duration: 5
resolution: 720p
summary: '6'
responses:
'200':
description: ''
content:
application/json:
schema:
type: object
required:
- code
- message
- data
properties:
code:
type: integer
description: 0 = thành công; khác 0 = thất bại; xem thông báo
data:
type: object
properties:
id:
type: string
description: ID tác vụ (ưu tiên)
status:
type: string
description: 'Trạng thái tác vụ ban đầu, ví dụ: đã gửi / đang chờ'
task_id:
type: string
description: >-
ID tác vụ (dự phòng; một số hệ thống nguồn trả về
trường này)
task_status:
type: string
description: >-
Giống như trạng thái; tên trường thay đổi tùy theo
nguồn cung cấp phía trên
description: >-
Thông tin tác vụ. Cả `id` và `task_id` đều có thể chứa mã
tác vụ; ưu tiên `id`.
x-apifox-orders:
- id
- status
- task_id
- task_status
x-apidog-orders:
- id
- status
- task_id
- task_status
message:
type: string
description: Vui lòng cung cấp nội dung tài liệu cần dịch.
request_id:
type: string
description: >-
ID yêu cầu phía thượng nguồn; cung cấp cho bộ phận hỗ trợ
phía thượng nguồn khi khắc phục sự cố
x-apifox-orders:
- code
- data
- message
- request_id
x-apidog-orders:
- code
- data
- message
- request_id
examples:
example:
summary: example
value:
code: 0
data:
id: string
status: string
task_id: chuỗi
task_status: chuỗi
message: chuỗi
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/Keling 3.0turbo
x-apidog-status: released
x-run-in-apidog: https://app.apidog.com/web/project/1218648/apis/api-45209014-run
components:
schemas: {}
securitySchemes: {}
servers:
- url: https://api.openaihub.net
description: Prod Env
security: []