Assets

Create upload asset

Creates a pre-signed upload URL. Upload your file directly to the returned upload_url via PUT, then use asset_id in generation requests.

Send a Content-Type header on the PUT that matches the media you are uploading. Storage keeps whatever the PUT declares and nothing converts an upload afterwards, so a default application/octet-stream uploads successfully and is then rejected when you try to generate from it.

curl -X PUT -T ad.mp4 -H 'Content-Type: video/mp4' "$UPLOAD_URL"
post/v2/assets

Request

  • Base URL: https://api.mirelo.ai
  • URL: https://api.mirelo.ai/v2/assets
  • Auth: HTTP bearer

Request body

content_typestring

MIME type of the file (e.g. video/mp4). Send the same value as the Content-Type header on your PUT.

Example request

{
  "content_type": "video/mp4"
}

Response

Asset created

asset_idstring required

Use as asset_id in the video object: {type: "asset", asset_id: "..."}

upload_urlstring uri required

PUT your file to this URL. Short-lived — upload promptly after creating the asset, and create a new asset if it expires.

Changes

No recorded changes to this operation across all 1 revision of this API.