Create video

post/v1/videos

OpenAI-compatible video generation endpoint.

Reference: https://platform.openai.com/docs/api-reference/videos/create

Authentication

Send your OLETOKEN API key as a Bearer token. Keys are created on the API Keys page of the console.

Authorization: Bearer $OLETOKEN_API_KEY

Request body

Content-Type:multipart/form-data

FieldTypeRequiredDescription
modelstringModel name
promptstringPrompt
secondsstringDuration in seconds
input_referencestringReference image file

Responses

200Video task created

FieldTypeRequiredDescription
idstringVideo ID
objectstringObject type
modelstringThe model that was used
statusstringTask status
progressintegerProgress percentage
created_atintegerCreation timestamp
secondsstringVideo duration
completed_atintegerCompletion timestamp
expires_atintegerExpiry timestamp
sizestringVideo size
errorOpenAIVideoError
messagestringError message
codestringError code
metadataobjectExtra metadata

400Invalid request parameters

FieldTypeRequiredDescription
errorobject
messagestringError message
typestringError type
paramstring | nullThe parameter involved
codestring | nullError code

Example request

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