Tạo video

post/v1/videos

Endpoint tạo video tương thích OpenAI.

Tham khảo: https://platform.openai.com/docs/api-reference/videos/create

Xác thực

Gửi khóa API OLETOKEN dưới dạng token Bearer. Khóa được tạo tại trang API Keys trong bảng điều khiển.

Authorization: Bearer $OLETOKEN_API_KEY

Nội dung yêu cầu

Content-Type:multipart/form-data

TrườngKiểuBắt buộcMô tả
modelstring—Tên mô hình
promptstring—Prompt
secondsstring—Thời lượng tính bằng giây
input_referencestring—Tệp hình ảnh tham chiếu

Phản hồi

200Đã tạo tác vụ video

TrườngKiểuBắt buộcMô tả
idstringID video
objectstringLoại đối tượng
modelstringMô hình đã được dùng
statusstringTrạng thái tác vụ
progressintegerPhần trăm tiến độ
created_atintegerDấu thời gian tạo
secondsstringThời lượng video
completed_atinteger—Dấu thời gian hoàn tất
expires_atinteger—Dấu thời gian hết hạn
sizestring—Kích thước video
errorOpenAIVideoError——
messagestring—Thông báo lỗi
codestring—Mã lỗi
metadataobject—Metadata bổ sung

400Tham số yêu cầu không hợp lệ

TrườngKiểuBắt buộcMô tả
errorobject——
messagestring—Thông báo lỗi
typestring—Loại lỗi
paramstring | null—Tham số liên quan
codestring | null—Mã lỗi

Ví dụ yêu cầu

curl -X POST 'https://api.oletoken.ai/v1/videos' \
  -H "Authorization: Bearer $OLETOKEN_API_KEY"