Upload Assets
February 23, 2026 (April 3, 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, 2-15.4 seconds, 200-2160px):
| Content-Type | File Extension |
|---|---|
| video/mp4 | mp4 |
| video/quicktime | mov |
| video/webm | webm |
Audio (max 15 MB, 2-15 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 (max 3 per request, total duration max 15.4s). - Audio:
omni_N_audioRefin POST /videos Omni Reference mode (max 3 per request, total duration max 15s).
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:[email protected]:w2560:h1440:s580914-uri:tos-alisg-i-wopfjsm1ax-sg/abc123", "account": "CA:[email protected]", "width": 2560, "height": 1440, "size": 580914 }Video response:
{ "assetRef": "CA:[email protected]:w1070:h1904:s1656759:d5880-vid:v10762g50003d77lv1nog65ie0vi8oh0", "account": "CA:[email protected]", "type": "video", "width": 1070, "height": 1904, "duration": 5880, "size": 1656759 }Audio response:
{ "assetRef": "CA:[email protected]:w480:h360:s562605:d14040-vid:v10762g50003d77l5uvog65nl4esjs2g", "account": "CA:[email protected]", "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, or duration out of range).
{ "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 16.5s exceeds 15s limit" } -
Invalid API token.
{ "error": "Unauthorized" } -
Account not found or not configured.
{ "error": "Unable to find configuration for account US:[email protected]" } -
Account session expired. Re-add the account using POST /accounts with correct credentials.
{ "error": "Session expired" }
Model
{
assetRef: string // Reference ID for POST /videos and POST /images
account: string // "CA:[email protected]"
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:[email protected]" -
const token = 'YOUR_API_TOKEN'; const account = 'US:[email protected]'; 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:[email protected]' 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'))