Automotion docs
API

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.

FieldTypeDefaultDescription
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

curl -X POST https://api.automotion.dev/v1/assets \
  -H "Authorization: Bearer $AUTOMOTION_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "filename": "sneaker.png",
    "contentType": "image/png",
    "kind": "image"
  }'

Responses

  • 201 — The presigned upload slot. Returns AssetUploadResource.

AssetUploadResource

FieldTypeDefaultDescription
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.

On this page