ImgyX Documentation
ImgyX is a fast, anonymous file hosting platform with a simple HTTP API. No authentication required. Upload files up to 20MB and get shareable links instantly. All files are stored on encrypted cloud infrastructure.
https://imgyx.pages.devUpload a file
/api/uploadAccepts multipart/form-data for direct file upload, or application/json with a url field to upload from a remote URL.
cURL — file upload
curl -X POST https://imgyx.pages.dev/api/upload \
-F "file=@/path/to/image.png"cURL — URL upload
curl -X POST https://imgyx.pages.dev/api/upload \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/photo.jpg"}'JavaScript (fetch)
// File upload
const form = new FormData();
form.append('file', fileInput.files[0]);
const res = await fetch('/api/upload', {
method: 'POST',
body: form,
});
const data = await res.json();
console.log(data.url); // => "/abc12"
// URL upload
const res = await fetch('/api/upload', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ url: 'https://example.com/file.pdf' }),
});
const data = await res.json();Python
import requests
# File upload
with open('image.png', 'rb') as f:
res = requests.post('https://imgyx.pages.dev/api/upload', files={'file': f})
data = res.json()
print(data['url'])
# URL upload
res = requests.post(
'https://imgyx.pages.dev/api/upload',
json={'url': 'https://example.com/file.pdf'}
)
data = res.json()
print(data['url'])Response schema
{
"id": "abc12", // Unique file ID
"url": "/abc12", // Raw file URL (relative)
"preview_url": "/p/abc12", // Preview page URL (relative)
"file_name": "image.png",
"size": 204800, // bytes
"mimetype": "image/png"
}Get file info
/api/info?id=abc12cURL
curl https://imgyx.pages.dev/api/info?id=abc12Response schema
{
"id": "abc12",
"file_name": "image.png",
"size": 204800,
"mimetype": "image/png",
"views": 42,
"created_at": "2024-01-15T10:30:00Z",
"url": "/abc12",
"preview_url": "/p/abc12"
}Download / serve file
/[id]Returns the raw file content streamed from encrypted cloud storage. Images and PDFs are served inline; other types as attachments. Append ?inline to force inline delivery.
# Download
curl -O https://imgyx.pages.dev/abc12
# Force inline (for browsers)
curl "https://imgyx.pages.dev/abc12?inline"Platform stats
/api/stats{
"total_files": 1234,
"total_views": 56789,
"total_storage_bytes": 2147483648
}Error codes
| HTTP | Code | Meaning |
|---|---|---|
| 400 | NO_FILE | No file was provided |
| 400 | NO_URL | URL field is missing |
| 400 | INVALID_BODY | Malformed JSON |
| 404 | NOT_FOUND | File not found |
| 413 | FILE_TOO_LARGE | File exceeds size limit |
| 415 | UNSUPPORTED_CONTENT_TYPE | Content-Type not supported |
| 429 | RATE_LIMITED | Too many uploads |
| 500 | UPLOAD_FAILED | Internal upload error |
| 502 | — | Cloud storage error |
Usage limits
FAQ
Is there a size limit?
Yes, 20MB per file by default. This is configurable per deployment.
Do I need an account?
No. ImgyX is fully anonymous. No sign-up, no login.
How long are files stored?
Files are stored indefinitely on encrypted cloud infrastructure.
What happens if I upload the same file twice?
ImgyX deduplicates uploads. You'll receive the same URL as the original upload.
Can I use ImgyX in my app?
Yes. The API is open and CORS-enabled. Just POST to /api/upload.
Where are my files stored?
Files are stored on encrypted cloud infrastructure. No personal data is collected.