Media Generation
Generate video and audio from text prompts. These are DOS AI extension endpoints (not part of the OpenAI API).
Video generation is asynchronous: create a job, then poll for the result.
Audio (music) generation is synchronous: the response includes the audio URL directly.
All media-generation endpoints use the same API key authentication as the rest of the API:
Authorization: Bearer dos_sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxVideo Generation
Create a video
POST https://api.dos.ai/v1/videos/generationsRequest Body
prompt
string
Yes
-
Text description of the video to generate.
duration
integer
No
5
Length of the video in seconds.
resolution
string
No
provider default
Output resolution, e.g. 720p, 1080p.
image_url
string
No
-
A source image URL. Providing it switches the model to its image-to-video variant.
Response (202 Accepted)
Video generation runs in the background. The call returns immediately with a task_id you use to poll for the result.
Video Models
wan-t2v (default)
Wan 2.7 text-to-video
wan2.7-t2v
Wan 2.7 text-to-video
wan-i2v / wan2.7-i2v
Wan 2.7 image-to-video
wan2.6-t2v
Wan 2.6 text-to-video
wan2.6-i2v
Wan 2.6 image-to-video
When
image_urlis supplied with a text-to-video model, DOS AI automatically routes to that model's image-to-video variant.
Get video status
Poll this endpoint (using the task_id from the create call) until status is succeeded or failed.
status
Meaning
processing
The job is still running. Keep polling.
succeeded
Done. data[].url holds the generated video URL.
failed
Generation failed. message contains the reason.
Audio (Music) Generation
Generates music from a text prompt and/or lyrics. This call is synchronous and typically takes 30-60 seconds.
Request Body
prompt
string
Yes*
-
Description / style of the music.
lyrics
string
Yes*
-
Lyrics for the song.
model
string
No
minimax-music-2.5
Audio model ID.
duration
integer
No
180
Target length in seconds.
instrumental
boolean
No
false
Generate an instrumental track (no vocals).
* Provide at least one of prompt or lyrics.
Response (200 OK)
Audio is returned as a direct URL (MP3, 44.1 kHz, 256 kbps). data[0].duration is the actual length in seconds.
Billing
Video and audio are billed per second of generated media (not per token). The rate depends on the model; see the dashboard for current pricing.
Error Responses
400
Bad Request
Invalid parameters (e.g. missing prompt).
401
Unauthorized
Invalid or missing API key.
402
Payment Required
Insufficient credits.
429
Too Many Requests
Rate limit exceeded.
500
Internal Server Error
Generation backend error.
Examples
Generate a video, then poll for it (cURL)
Generate music (cURL)
Last updated