Upload Assets
February 23, 2026 (March 2, 2026)
Table of contents
Upload images to Dreamina for use as video or image generation reference frames. Supported formats are JPEG, PNG, and WebP with a maximum file size of 10 MB.
| Content-Type | File Extension |
|---|---|
| image/jpeg | jpeg, jpg |
| image/png | png |
| image/webp | webp |
The returned assetRef is used as firstFrameRef, endFrameRef, or frame_N_imageRef in POST /videos, and as imageRef_N in POST /images.
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
-
Image uploaded successfully. Returns the
assetReffor use in video and image generation.{ "assetRef": "US:[email protected]:w685:h900:s86866-uri:tos-useast5-i-wopfjsm1ax-tx/3605b150c6b949f5acea2eac3ca59544", "account": "US:[email protected]", "width": 685, "height": 900, "size": 86866 }assetRef- Reference ID for use in POST /videos asfirstFrameRef,endFrameRef, orframe_N_imageRef, and in POST /images asimageRef_N.width- Image width in pixels.height- Image height in pixels.size- Image size in bytes.account- Account used for the upload.
assetRef format:
<account>-image:w<width>:h<height>:s<size>-uri:<nativeUri> -
Invalid request (empty content, unsupported content type, or file too large).
{ "error": "Content-Type (image/bmp) not supported. Valid values: image/jpeg, image/png, image/webp" }{ "error": "Image is empty" } -
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 // "US:[email protected]"
width: number // Image width in pixels
height: number // Image height in pixels
size: number // Image size in bytes
imageRef?: string // Legacy alias for assetRef (backward compatibility)
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'))