API reference

Uploads

Models read input media from URLs. If your file is not already public, upload it here and pass the returned url in a generation's inputs.
POST/api/v1/uploadsrole: editor
multipart/form-data with a single field file, or JSON { "url": "https://…" } to import from a URL. Responds 201 with an asset object.

Form fields

filefilerequired
The image, video or audio file. The Content-Type of the part decides the kind.
curl https://<your-host>/api/v1/uploads \
  -H "Authorization: Bearer $AIO_KEY" \
  -F "file=@./selfie.jpg;type=image/jpeg"
201 Created
{
  "id": "5d1e…",
  "object": "asset",
  "url": "https://cdn…/allinone/uploads/7e02…/202611/9c4b….jpg",
  "kind": "image",
  "mime": "image/jpeg",
  "size": 482113,
  "name": "selfie.jpg"
}

Import from a URL#

If the file is already online (but not on a host models can read, or you want a permanent copy), send JSON instead of multipart. We download it server-side with the same type and size limits and respond with the same asset object. Only public https:// hosts are accepted; private networks and redirects to them are refused. Downloads time out after 30 s. AI agents get the same thing as the MCP tool upload_from_url.

JSON body

urlstringrequired
Public https:// URL of an image, video or audio file.
curl https://<your-host>/api/v1/uploads \
  -H "Authorization: Bearer $AIO_KEY" -H "Content-Type: application/json" \
  -d '{ "url": "https://example.com/photos/dog.jpg" }'

Supported files#

KindTypesMax size
imageJPG, PNG, WEBP, GIF20 MB
videoMP4, MOV, WEBM200 MB
audioMP3, WAV50 MB

Other types return 415 UPLOAD_UNSUPPORTED_TYPE; oversized files return 413 UPLOAD_TOO_LARGE. Uploaded files are stored on our CDN and appear in the team's assets.

Content policy applies to inputs

Sexual imagery is not allowed as input either. A flagged input is rejected with MODERATION_INPUT_FLAGGED and the request is not charged.