Chuyển đến nội dung chính
POST
/
v1
/
videos
Tạo video
curl --request POST \
  --url https://api.aiid.edu.kg/v1/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form model=sora-2 \
  --form 'prompt=<string>' \
  --form image='@example-file' \
  --form duration=123 \
  --form width=512 \
  --form height=512 \
  --form fps=30 \
  --form seed=20231234 \
  --form n=1 \
  --form response_format=url \
  --form user=user-1234 \
  --form 'metadata={}' \
  --form 'mode=<string>' \
  --form 'images=<string>' \
  --form 'content={}' \
  --form 'size=<string>' \
  --form 'seconds=<string>' \
  --form 'input_reference=<string>' \
  --form 'parameters={}'
{
  "id": "video_abc123",
  "object": "video",
  "model": "sora-2",
  "status": "queued",
  "progress": 0,
  "created_at": 1764347090922,
  "seconds": "8"
}

Ủy quyền

Authorization
string
header
bắt buộc

Sử dụng xác thực Bearer Token. Định dạng: Authorization: Bearer sk-xxxxxx

Nội dung

model
enum<string>
bắt buộc

Bắt buộc, tên mô hình công khai. gemini-omni Có thể được gọi thông qua /v1/videos.

Tùy chọn có sẵn:
sora-2,
sora-2-pro,
gemini-omni,
happyhorse-1.0,
happyhorse-1.0-i2v,
happyhorse-1.0-t2v,
happyhorse-1.0-r2v,
happyhorse-1.0-video-edit,
doubao-seedance-1-0-lite-i2v-250428,
doubao-seedance-1-0-lite-t2v-250428,
doubao-seedance-1-0-pro-250528,
doubao-seedance-1-0-pro-fast-251015,
doubao-seedance-1-5-pro-251215,
doubao-seedance-2-0-260128,
doubao-seedance-2-0-fast-260128,
veo3,
veo3-fast,
veo3-fast-frames,
veo3-frames,
veo3-pro,
veo3-pro-frames,
veo3.1,
veo3.1-4k,
veo3.1-components,
veo3.1-fast,
veo3.1-pro,
veo3.1-pro-4k,
kling-video,
grok-imagine-1.0-video,
grok-imagine-video-1.5-preview,
grok-video-3,
viduq3-turbo,
hailuo-video
Ví dụ:

"sora-2"

prompt
string
bắt buộc

Điểm nhập prompt thống nhất. Bắt buộc với hầu hết các mô hình.

image
file

Cổng vào cho một ảnh đơn, một số chế độ tương thích sẽ được ánh xạ tới images.

duration
integer

Đầu vào thời lượng được thống nhất; một số mô hình cũng chấp nhận seconds.

width
integer

Video width

Ví dụ:

512

height
integer

Video height

Ví dụ:

512

fps
integer

Video frame rate

Ví dụ:

30

seed
integer

Random seed

Ví dụ:

20231234

n
integer

Number of videos to generate

Ví dụ:

1

response_format
string

Response format

Ví dụ:

"url"

user
string

User identifier

Ví dụ:

"user-1234"

metadata
object

Container trường mở rộng động. Một số lượng lớn các trường đặc thù của mô hình được giải tuần tự hóa từ đây.

mode
string

Tùy chọn, chế độ tạo video. gemini-omni Hỗ trợ t2v, r2v, edit.

images
string[]

Điểm vào thống nhất cho nhiều ảnh. Vidu, Seedance, Veo sẽ sử dụng, v.v.

content
object[]
size
string

Điểm vào kích thước hợp nhất, sẽ được ánh xạ thành resolution/aspect_ratio, v.v.

seconds
string

Sora điểm vào tương thích, trong thời gian chạy sẽ quay về duration.

input_reference
string

Sora/Veo điểm vào ảnh tham chiếu tương thích, có thể là tệp multipart hoặc đối tượng tương thích.

parameters
object

Phản hồi

Đã tạo tác vụ video thành công

id
string
bắt buộc
object
string
bắt buộc
model
string
bắt buộc
status
enum<string>
bắt buộc

Should use VideoStatus constants: VideoStatusQueued, VideoStatusInProgress, VideoStatusCompleted, VideoStatusFailed

Tùy chọn có sẵn:
queued,
in_progress,
completed,
failed,
video_url,
url,
completed_at
progress
integer
bắt buộc
created_at
integer
bắt buộc
task_id
string

Tương thích với giao diện cũ (Sắp ngừng hỗ trợ)

completed_at
integer
expires_at
integer
seconds
string
size
string
remixed_from_video_id
string
error
object
metadata
object