Quickstart
Get a file uploaded and listed via the API in under five minutes.
Step 0 — Get your API key
Go to Settings → API Keys in the MediaNest dashboard and click Create key. Copy the key — it starts with mn_ and is only shown once.
Step 1 — Upload a file
curl -X POST https://medianest.app/api/v1/upload \
-H "X-API-Key: mn_your_key_here" \
-F "file=@/path/to/photo.jpg"
A successful response returns the new file's id and cdnUrl:
{
"success": true,
"data": {
"id": "clx1abc123",
"filename": "photo.jpg",
"fileType": "IMAGE",
"fileSize": 204800,
"cdnUrl": "https://...",
"createdAt": "2026-05-11T00:00:00.000Z"
}
}
Step 2 — List your files
curl https://medianest.app/api/v1/files \
-H "X-API-Key: mn_your_key_here"
Step 3 — Fetch a single file
curl https://medianest.app/api/v1/files/clx1abc123 \
-H "X-API-Key: mn_your_key_here"
Next steps
- Authentication — key permissions and expiry
- Rate Limits — understand your quota headers
- Files endpoint — full parameter reference