Files
Get a short-lived download link and a preview for a file you own
The JSON form of GET /v1/files/{uuid}/download, built for agent callers that cannot follow an authenticated URL or show a binary body. No credits are charged and the file stays private: its visibility is not changed.
- download_url is a presigned, unauthenticated URL for the ORIGINAL file, valid for 15 minutes (expires_at). It is a credential for that time: anyone holding it can read the file. Do not log it or pass it on. It is null for a file stored only on the server disk (no expiring link can be issued); link_unavailable_reason then says why.
- preview is set for raster images only: a reduced JPEG (at most 1024 px on the long edge and about 350 KB), base64-encoded. It is never the original bytes. null for other files, SVG, or an image that cannot be decoded.
Authorization is the same two-layer check as the download route: files:read at the gate, then the read scope of the file's own container. A denial is a 404, never a 403.
get/v1/files/{uuid}/download-link
Request
- Base URL: https://contentmaschine.ai/api
- URL: https://contentmaschine.ai/api/v1/files/{uuid}/download-link
- 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)
Path parameters
uuidstring uuid required
The file uuid of an item in your library (from the gallery or library list, or a finished job).
Response
File metadata, a 15-minute download link and, for images, a preview.
Changes
No recorded changes to this operation across all 1 revision of this API.