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
modelstring—Model name
promptstring—Prompt
secondsstring—Duration in seconds
input_referencestring—Reference 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_atinteger—Completion timestamp
expires_atinteger—Expiry timestamp
sizestring—Video size
errorOpenAIVideoError——
messagestring—Error message
codestring—Error code
metadataobject—Extra metadata

400Invalid request parameters

FieldTypeRequiredDescription
errorobject——
messagestring—Error message
typestring—Error type
paramstring | null—The parameter involved
codestring | null—Error code

Example request

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