Skip to Content

Direct Uploads

Direct upload allows you to push assets directly to Mux storage instead of needing to go through your own first. When you create a new direct upload, we'll give you back a signed URL for a Google Cloud Storage bucket. Their storage API is S3 compatible, so whatever tool you use to upload to either GCS or S3 should work, just remember you're probably uploading large video files and should take advantage of things like resumable or multipart uploads.

Particularly for customers that deal with a lot of user-generated content, it's common to expect quite a few abandoned uploads. To keep those abandoned uploads from cluttering up your asset lists, we don't create an asset for you until the upload is complete. Once that asset is created, you can expect all of the normal asset-related webhooks.

id
string

Unique identifier for the Direct Upload.

timeout
integer (default: 3600, minimum: 60, maximum: 604800)

Max time in seconds for the signed upload URL to be valid. If a successful upload has not occurred before the timeout limit, the direct upload is marked timed_out

status
string
Possible values: "waiting""asset_created""errored""cancelled""timed_out"
new_asset_settings
object

The settings to be used when creating a new asset. You can use any of the usual settings when creating an asset normally, with the exception to not include file url for creating the asset in input. You could optionally add overlay_setting and input urls to add Subtitles / Captions.

asset_id
string

Only set once the upload is in the asset_created state.

error
object

Only set if an error occurred during asset creation.

error.type
string

Label for the specific error

error.message
string

Human readable error message

cors_origin
string

If the upload URL will be used in a browser, you must specify the origin in order for the signed URL to have the correct CORS headers.

url
string

The URL to upload the associated source media to.

test
boolean

Indicates if this is a test Direct Upload, in which case the Asset that gets created will be a test Asset.