Assets
Upload files to Automotion-managed storage via presigned URLs and reference them from movie documents. Elements also accept any public URL, so this is a convenience, not a requirement.
Upload files to Automotion-managed storage via presigned URLs and reference them from movie documents. Elements also accept any public URL, so this is a convenience, not a requirement.
All endpoints live under https://api.automotion.dev/v1, require Authorization: Bearer <api key>, and answer with the standard envelopes.
POST /assets
Create an asset upload. Request a presigned upload URL scoped to your asset space. PUT the file bytes to uploadUrl (with the echoed contentType as Content-Type), then use assetUrl directly in movie documents.
Request body
The file to upload.
| Field | Type | Default | Description |
|---|---|---|---|
filename * | string (non-empty, ≤ 256 chars) | — | Original file name; sanitized, its final segment is preserved in the key. |
contentType * | string (non-empty) | — | MIME type of the file. Must be on the per-kind allowlist (no SVG). |
kind * | "image" | "video" | "audio" | — | Asset kind: image, video or audio. |
Example
Responses
201— The presigned upload slot. ReturnsAssetUploadResource.
AssetUploadResource
| Field | Type | Default | Description |
|---|---|---|---|
uploadUrl * | string (uri) | — | Presigned PUT URL, valid 15 minutes. Upload the file bytes here with the echoed contentType as the Content-Type header (it is part of the signature). |
assetUrl * | string (uri) | — | Public CDN URL of the asset once uploaded — usable directly in movie documents. |
key * | string (non-empty) | — | Storage key of the asset within your namespace. |
contentType * | string (non-empty) | — | The normalized MIME type the upload was signed for; send it as Content-Type. |
expiresAt * | string (date-time) | — | When the presigned upload URL expires (ISO-8601). |
Errors
VALIDATION_ERROR · ASSET_UNSUPPORTED_TYPE · STORAGE_FAILED · USER_NOT_FOUND — plus the pipeline-wide UNAUTHORIZED · RATE_LIMITED · INTERNAL.