Skip to main content
POST
Imports a file into your Unsora media library. Every upload is stored and recorded as an asset, and the returned url can be used anywhere a media URL is accepted — post media, reference images, or clipping input. Available to every authenticated user (no paid plan required).

Two ways to send the file

Provide exactly one of the two. fileName is required with base64.
For large local files, use the signed-URL flow instead: Mint a signed upload URL, PUT the bytes directly to storage, then register the asset. The file bytes never pass through the API server.

Examples

Response

The asset type is derived from the MIME type: IMAGE, VIDEO, AUDIO, or DOCUMENT.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
url
string

Public http(s) URL to import (max 200MB).

base64
string

Base64 file contents (raw or data: URL). Requires fileName.

fileName
string

Stored file name (required with base64, optional with url).

contentType
string

MIME type override, e.g. image/png.

Response

Uploaded asset

success
boolean
data
object