Files and delivery
Obtain a private signed URL or a public CDN URL for a completed file.
Get file metadata
GET /files/:id returns JSON, not the file bytes. Use the account that created the download.
A shortened illustrative response:
{
"file": {
"fileName": "video.mp4",
"mimeType": "video/mp4",
"sizeBytes": 123456,
"delivery": "private",
"url": "https://storage.example.invalid/signed-download"
}
}Fetch file.url to retrieve the file. Never forward Authorization: ApiKey ... to storage or another returned host. A private file that is absent, expired, or inaccessible to your account can return 404.
Private versus public
Rendering diagram…
View Mermaid source
flowchart TD
accTitle: Private and public file delivery
accDescr: Private file lookup checks the owning account and issues an expiring URL; public delivery returns a shareable CDN URL.
C[Caller] --> A[GET /files/:id]
A --> D{Delivery type}
D -->|Private| P[Check owning account]
P --> U[Return signed URL]
U --> T[Fetch before expiry]
D -->|Public| B[Return shareable CDN URL]
B --> F[Fetch public file]
T --> K[Do not send API key to storage]
F --> K| Delivery | Behavior |
|---|---|
private | Owning-account lookup returns a time-limited signed URL |
public | Uses a dedicated public bucket/CDN and a shareable URL |
The hosted private URL lifetime is normally 900 seconds. Re-request the file endpoint for a fresh URL if the artifact still exists. Anyone holding a valid signed URL can use it until expiry. Do not post private URLs in public logs.
Public video results can also provide a thumbnail URL. Public delivery does not imply permanent storage or a guaranteed retention period. API key revocation prevents future authenticated calls but does not revoke an already issued storage URL.
Keep the URL intact
Do not re-encode the query, change its hostname, append tracking parameters, or include surrounding chat punctuation. Private URLs may end in a protective #download fragment; keep the returned URL intact.
In Discord:
[Download](RETURNED_FILE_URL)No arbitrary uploads
This endpoint retrieves files produced by MediaFilez jobs. It is not an upload endpoint and does not accept your own disk path or storage key. Handle every entry in a completed album's result.files list.
Request examples
Choose a language. JavaScript and Node.js examples use a server environment, not a public browser key. Replace illustrative IDs with your own.
Get a file URL
GET /files/fil_example
curl --fail-with-body -X GET 'https://api.mediafilez.online/api/v1/files/fil_example' \
-H "Authorization: ApiKey $MEDIAFILEZ_API_KEY"