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_KEYRequest body
Content-Type:multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
| model | string | — | Model name |
| prompt | string | — | Prompt |
| seconds | string | — | Duration in seconds |
| input_reference | string | — | Reference image file |
Responses
200Video task created
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Video ID | |
| object | string | Object type | |
| model | string | The model that was used | |
| status | string | Task status | |
| progress | integer | Progress percentage | |
| created_at | integer | Creation timestamp | |
| seconds | string | Video duration | |
| completed_at | integer | — | Completion timestamp |
| expires_at | integer | — | Expiry timestamp |
| size | string | — | Video size |
| error | OpenAIVideoError | — | — |
| message | string | — | Error message |
| code | string | — | Error code |
| metadata | object | — | Extra metadata |
400Invalid request parameters
| Field | Type | Required | Description |
|---|---|---|---|
| error | object | — | — |
| message | string | — | Error message |
| type | string | — | Error type |
| param | string | null | — | The parameter involved |
| code | string | null | — | Error code |
Example request
curl -X POST 'https://api.oletoken.ai/v1/videos' \
-H "Authorization: Bearer $OLETOKEN_API_KEY"
