Upload Assets

February 23, 2026 (November 12, 2026)

Table of contents

  1. Request Headers
  2. Path Parameters
  3. Request Body
  4. Responses
  5. Model
  6. Examples
  7. Try It

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, or omni_N_imageRef in POST /videos, and imageRef_N in POST /images.
  • Videos: omni_N_videoRef in POST /videos Omni Reference mode, or editVideoRef there to re-cut the video in Edit mode.
  • Audio: omni_N_audioRef in 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 token is required, see Setup useapi.net for details.
  • Content-Type is required, see table above.

Path Parameters

  • account is required.

Request Body

Binary image content (raw bytes).

Responses

  • 200 OK

    Asset uploaded successfully. Returns the assetRef for 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, or audio (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>
  • 400 Bad Request

    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 31.4s exceeds 30.2s limit"
    }
    
  • 401 Unauthorized

    Invalid API token.

    {
      "error": "Unauthorized"
    }
    
  • 404 Not Found

    Account not found or not configured.

    {
      "error": "Unable to find configuration for account US:[email protected]"
    }
    
  • 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 signedOutPauseUntil comes 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 answer 596, and automatic account selection uses your other accounts. When every account is paused, requests answer 596. 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 an error and answers 596 until 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 503 with a Retry-After: 30 header. The account is fine: retry in about 30 seconds.

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'))
    

Try It