Upload a source file
Upload a file into your library and receive a file_uuid. This is the single ingest route for the whole API: pass the uuid to the image endpoints (/v1/images/vary, /fuse, /upscale, /remove-background, /describe, /instagram-enhance), as a video start frame, to /v1/audio/transcribe, or to /v1/videos/merge.
ACCEPTED TYPES (this list is read from the server's own allowlist, not restated): image/png, image/jpeg, image/webp, image/gif, audio/mpeg, audio/wav, video/mp4. The type is SNIFFED from the bytes; the filename extension is not trusted.
SIZE LIMITS, and they are MEASURED against the deployed server rather than copied from a constant:
- images: 25 MB
- audio and video: 48 MB
The 48 MB figure is deliberately below the gateway request-body limit of 50 MB, which was measured byte-for-byte on the deployed stack: a 52,428,800-byte request body was accepted and 52,428,801 bytes was cut off mid-upload with an HTML error page. The margin exists so that an oversized upload gets THIS API's JSON 413 with a usable message instead of the gateway's HTML. Note the gateway limit applies to the whole multipart REQUEST BODY - the file plus framing plus the filename - not to the file alone. A body past that limit does not produce a JSON error at all.
width and height are returned for images and are null for audio and video. The response shape is otherwise unchanged from when this route was images-only.
Request
- Base URL: https://contentmaschine.ai/api
- URL: https://contentmaschine.ai/api/v1/files/upload
- Auth: one of:
- HTTP bearer
- OAuth 2 (authorization code, authorization URL https://contentmaschine.ai/api/oauth/authorize, token URL https://contentmaschine.ai/api/oauth/token)
Response
Stored
Example response
{
"success": true
}Changes
No recorded changes to this operation across all 1 revision of this API.