Upload Assets
February 23, 2026 (November 16, 2026)
Table of contents
Upload images, videos, and audio files to Dreamina for use in video and image generation.
Images (max 10 MB):
| Content-Type | File Extension |
|---|---|
| image/jpeg | jpeg, jpg |
| image/png | png |
| image/webp | webp |
Videos (max 50 MB, 1.8-30.2 seconds, 300-6000px):
| Content-Type | File Extension |
|---|---|
| video/mp4 | mp4 |
| video/quicktime | mov |
| video/webm | webm |
Audio (max 15 MB, 1.8-30.2 seconds):
| Content-Type | File Extension |
|---|---|
| audio/mpeg | mp3 |
| audio/mp3 | mp3 |
| audio/wav | wav |
| audio/mp4 | m4a |
| audio/aac | aac |
The returned assetRef is used as:
- Images:
firstFrameRef,endFrameRef,frame_N_imageRef, oromni_N_imageRefin POST /videos, andimageRef_Nin POST /images. - Videos:
omni_N_videoRefin POST /videos Omni Reference mode, oreditVideoRefthere to re-cut the video in Edit mode. - Audio:
omni_N_audioRefin POST /videos Omni Reference mode.
The duration and dimension limits above are the loosest any model accepts, so one upload can be reused across models. Each model applies its own tighter caps when you submit the generation — seedance-2.5 and seedance-2.5-draft take 10 videos and 10 audio clips per request, seedance-2.5-flash takes 5 of each, the Seedance 2.0 family takes 3 of each with videos up to 15.4s and audio up to 15s. See the reference-limit table on POST /videos.
https://api.useapi.net/v1/dreamina/assets/
account
Request Headers
Authorization: Bearer {API token}
Content-Type: select from the table above
API tokenis required, see Setup useapi.net for details.Content-Typeis required, see table above.
Path Parameters
accountis required.
Request Body
Binary image content (raw bytes).
Responses
-
Asset uploaded successfully. Returns the
assetReffor use in video and image generation.Image response:
{ "assetRef": "CA:user@example.com-image:w2560:h1440:s580914-uri:tos-alisg-i-wopfjsm1ax-sg/abc123", "account": "CA:user@example.com", "width": 2560, "height": 1440, "size": 580914 }Video response:
{ "assetRef": "CA:user@example.com-video:w1070:h1904:s1656759:d5880-vid:v10762g50003d77lv1nog65ie0vi8oh0", "account": "CA:user@example.com", "type": "video", "width": 1070, "height": 1904, "duration": 5880, "size": 1656759 }Audio response:
{ "assetRef": "CA:user@example.com-audio:w480:h360:s562605:d14040-vid:v10762g50003d77l5uvog65nl4esjs2g", "account": "CA:user@example.com", "type": "audio", "duration": 14040, "size": 562605 }assetRef- Reference ID for use in generation endpoints.type- Asset type:image,video, oraudio(omitted for images for backward compatibility).width- Width in pixels (images and videos).height- Height in pixels (images and videos).duration- Duration in milliseconds (videos and audio).size- File size in bytes.account- Account used for the upload.
assetRef formats:
- Image:
<account>-image:w<width>:h<height>:s<size>-uri:<nativeUri> - Video:
<account>-video:w<width>:h<height>:s<size>:d<durationMs>-vid:<videoId> - Audio:
<account>-audio:w<width>:h<height>:s<size>:d<durationMs>-vid:<videoId>
-
Invalid request (empty content, unsupported content type, file too large, duration out of range, or an account that is not configured).
{ "error": "Content-Type (image/bmp) not supported. Valid values: image/jpeg, image/png, image/webp, video/mp4, video/quicktime, video/webm, audio/mpeg, audio/mp3, audio/wav, audio/x-wav, audio/mp4, audio/aac" }{ "error": "video exceeds 50MB limit (52.1MB)" }{ "error": "Audio duration 31.4s exceeds 30.2s limit" }{ "error": "Unable to find configuration for account US:user@example.com. Please add configuration via POST /v1/dreamina/accounts", "code": 400 } -
Invalid API token.
{ "error": "Unauthorized" } -
596 Session Error
The account’s session expired or Dreamina locked it, or the account is in its sign-out pause. Check GET /accounts: an account with
signedOutPauseUntilcomes back by itself after the pause, any other account needs to be re-added using POST /accounts with correct credentials.{ "error": "Dreamina account session expired or locked. Please re-add account via POST /v1/dreamina/accounts", "code": 596 }When Dreamina signs an account out again right after a fresh sign-in, the account is paused for 30 minutes. While the pause runs, GET /accounts shows
signedOutPauseUntil(an ISO 8601 time) on that account, requests that name it answer596, and automatic account selection uses your other accounts. When every account is paused, requests answer596. After the pause the account is used again. If Dreamina signs it out right after a fresh sign-in again, after the pause and within 24 hours, the account is marked with anerrorand answers596until you re-add it with POST /accounts. Re-adding an account also ends its pause.A sign-in that fails for a temporary reason, not because Dreamina refused the account, answers
503with aRetry-After: 30header. The account is fine: retry in about 30 seconds.
Model
The uploaded file’s assetRef for POST videos and POST images, with its size and its dimensions or duration.
The uploaded file, field by field
{
assetRef: string // Reference ID for POST /videos and POST /images
account: string // "CA:user@example.com"
type?: string // "image", "video", or "audio" (omitted for images)
width?: number // Width in pixels (images and videos)
height?: number // Height in pixels (images and videos)
duration?: number // Duration in milliseconds (videos and audio)
size?: number // File size in bytes
imageRef?: string // Legacy alias for assetRef (backward compatibility, images only)
error?: string // Error message
}
Examples
-
curl -X POST \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: image/jpeg" \ --data-binary @/path/to/your/image.jpeg \ "https://api.useapi.net/v1/dreamina/assets/US:user@example.com" -
const token = 'YOUR_API_TOKEN'; const account = 'US:user@example.com'; const apiUrl = `https://api.useapi.net/v1/dreamina/assets/${encodeURIComponent(account)}`; // Load image - Example 1: From local file (Node.js) const fsp = require('fs').promises; const blob = new Blob([await fsp.readFile('./image.jpeg')]); // Load image - Example 2: From file input element // const imageFile = document.getElementById('image-file'); // const blob = imageFile.files[0]; const response = await fetch(apiUrl, { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': blob.type || 'image/jpeg' }, body: blob }); const result = await response.json(); console.log('Upload result:', result); console.log('assetRef:', result.assetRef); -
import requests from urllib.parse import quote token = 'YOUR_API_TOKEN' account = 'US:user@example.com' api_url = f'https://api.useapi.net/v1/dreamina/assets/{quote(account, safe="")}' with open('./image.jpeg', 'rb') as image_file: file_content = image_file.read() headers = { 'Authorization': f'Bearer {token}', 'Content-Type': 'image/jpeg' } response = requests.post(api_url, headers=headers, data=file_content) result = response.json() print('Upload result:', result) print('assetRef:', result.get('assetRef'))