Generate Videos
February 23, 2026
Table of contents
- Input Modes
- Model Capabilities
- Aspect Ratios
- Request Headers
- Request Body
- Responses
- Model
- Examples
- Try It
Generate videos using Dreamina AI models from text prompts with optional image frames. All video generation is asynchronous — this endpoint returns immediately with a job ID. Poll GET /videos/jobid for completion, or use replyUrl webhook for automatic callbacks.
Video generation typically completes within 60-180 seconds depending on the model and duration.
Input Modes
The input mode is automatically determined from the provided parameters:
| Mode | Trigger | Description |
|---|---|---|
prompt | No image refs | Text-to-video generation |
first_frame | firstFrameRef provided | Video starts from uploaded image |
end_frame | firstFrameRef + endFrameRef | Video transitions between two images |
multi_frame | frame_N_imageRef params | 2-10 keyframe images with per-frame prompts |
Model Capabilities
| Model | Durations (seconds) | Input Modes |
|---|---|---|
seedance-2.0 (default) | 4, 5, 6, 7, 8, 9, 10, 11, 12 | prompt, first_frame, end_frame |
dreamina-3.5-pro | 5, 10, 12 | prompt, first_frame, end_frame |
dreamina-3.0 | 5, 10 | prompt, first_frame, multi_frame |
Aspect Ratios
When no image ref is provided, you can specify ratio. When image refs are provided, the video aspect ratio matches the image.
| Ratio | Resolution |
|---|---|
21:9 | 1680x720 |
16:9 (default) | 1280x720 |
4:3 | 960x720 |
1:1 | 720x720 |
3:4 | 720x960 |
9:16 | 720x1280 |
https://api.useapi.net/v1/dreamina/videos
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API tokenis required, see Setup useapi.net for details.
Request Body
{
"prompt": "A serene mountain landscape at sunset with camera slowly panning right",
"model": "seedance-2.0",
"ratio": "16:9",
"duration": 5
}
promptis required forpromptmode. Optional forfirst_frameandend_frame. Cannot be used withmulti_framemode (useframe_N_promptinstead). Maximum 5000 characters.modelis optional, the AI model to use (default:seedance-2.0). Supported values:seedance-2.0,dreamina-3.5-pro,dreamina-3.0.accountis optional. Specific account to use. Auto-inferred from image refs if provided. Auto-selected (random with available capacity) if omitted.ratiois optional, video aspect ratio (default:16:9). Cannot be specified when image refs are provided (image aspect ratio is used).durationis optional, video duration in seconds (default:5). Valid values depend on model — see Model Capabilities table.firstFrameRefis optional,imageReffrom POST /assets/accountfor the starting frame. Triggersfirst_framemode.endFrameRefis optional,imageReffor the ending frame. Triggersend_framemode. RequiresfirstFrameRef.frame_N_imageRefis optional (N=1-10),imageReffor keyframe N. Triggersmulti_framemode when at least 2 frames are provided.frame_N_promptis optional, per-frame prompt for multi_frame mode. Maximum 5000 characters.frame_N_durationis optional, per-frame duration in seconds for multi_frame mode (1-6, default:5).replyUrlis optional, webhook URL for job status callbacks. Receives POST requests with the job record on submission and on completion/failure.replyRefis optional, custom reference string passed back in webhook callbacks.maxJobsis optional, override max concurrent jobs for this request (1-50).
Multi-frame constraints:
- Minimum 2 frames, maximum 10 frames
- No gaps allowed (frame_1 through frame_N must be contiguous)
- All frame images must have the same aspect ratio
- Top-level
promptcannot be used (useframe_N_promptinstead) firstFrameRef/endFrameRefcannot be combined with multi_frame- Total duration of non-last frames must equal a valid model duration
Responses
-
Job created successfully. Video is generating in the background.
{ "jobid": "j0223140530123456789v-u12345-US:[email protected]:dreamina", "type": "video", "status": "created", "model": "seedance-2.0", "created": "2026-02-23T14:05:30.123Z", "request": { "prompt": "A serene mountain landscape at sunset with camera slowly panning right", "model": "seedance-2.0", "ratio": "16:9", "duration": 5, "inputMode": "prompt" }, "response": { "forecastCost": 125 }, "code": 200 }Poll GET /videos/
jobidfor completion status, or usereplyUrlfor webhook callbacks. -
Validation error.
{ "error": "Parameter model (invalid-model) valid values: seedance-2.0, dreamina-3.5-pro, dreamina-3.0" } -
Invalid API token.
{ "error": "Unauthorized" } -
Subscription expired or insufficient credits.
{ "error": "Account has no subscription or subscription expired" } -
All accounts at maximum capacity. Wait for current jobs to complete or increase
maxJobs.{ "error": "All accounts at capacity" } -
Account session expired. Re-add the account using POST /accounts with correct credentials.
{ "error": "Session expired" }
Model
{
jobid: string // Unique job identifier
type: 'video' // Job type
status: 'created' // Initial status
model: string // Model used
created: string // ISO 8601 timestamp
request: {
prompt?: string
model: string
ratio?: string // "16:9", "9:16", etc.
duration?: number // Seconds
inputMode: string // "prompt" | "first_frame" | "end_frame" | "multi_frame"
firstFrameRef?: string // imageRef for first frame
endFrameRef?: string // imageRef for end frame
frames?: number // Number of keyframes (multi_frame mode)
replyUrl?: string // Webhook URL
replyRef?: string // Custom reference
}
response: {
forecastCost: number // Estimated credit cost
}
code: number // HTTP status code
error?: string // Error message
}
Examples
-
# Text-to-video curl -X POST \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "prompt": "A serene mountain landscape at sunset", "model": "seedance-2.0", "ratio": "16:9", "duration": 5 }' \ "https://api.useapi.net/v1/dreamina/videos" # Image-to-video (first frame) curl -X POST \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "prompt": "Camera slowly pans across the scene", "model": "seedance-2.0", "firstFrameRef": "US:[email protected]:w685:h900:s86866-uri:tos-useast5-i-wopfjsm1ax-tx/abc123", "duration": 5 }' \ "https://api.useapi.net/v1/dreamina/videos" -
const token = 'YOUR_API_TOKEN'; const apiUrl = 'https://api.useapi.net/v1/dreamina/videos'; // Text-to-video const response = await fetch(apiUrl, { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ prompt: 'A serene mountain landscape at sunset', model: 'seedance-2.0', ratio: '16:9', duration: 5 }) }); const result = await response.json(); console.log('Job created:', result.jobid); // Poll for completion const poll = async (jobid) => { while (true) { const res = await fetch(`https://api.useapi.net/v1/dreamina/videos/${jobid}`, { headers: { 'Authorization': `Bearer ${token}` } }); const job = await res.json(); console.log('Status:', job.status); if (job.status === 'completed') { console.log('Video URL:', job.response.videoUrl); return job; } if (job.status === 'failed') throw new Error(job.error); await new Promise(r => setTimeout(r, 10000)); } }; const completed = await poll(result.jobid); -
import requests import time token = 'YOUR_API_TOKEN' api_url = 'https://api.useapi.net/v1/dreamina/videos' headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'application/json' } # Text-to-video data = { 'prompt': 'A serene mountain landscape at sunset', 'model': 'seedance-2.0', 'ratio': '16:9', 'duration': 5 } response = requests.post(api_url, headers=headers, json=data) result = response.json() print(f"Job created: {result['jobid']}") # Poll for completion jobid = result['jobid'] while True: job = requests.get( f'https://api.useapi.net/v1/dreamina/videos/{jobid}', headers={'Authorization': f'Bearer {token}'} ).json() print(f"Status: {job['status']}") if job['status'] == 'completed': print(f"Video URL: {job['response']['videoUrl']}") break if job['status'] == 'failed': raise Exception(job.get('error')) time.sleep(10)