API Documentation
1. File Upload
Upload files up to 30MB. Supports images, videos, audio, documents, and archives.
Standard Upload
curl -X POST -F "file=@/path/to/your/file.jpg" /api/uploadResponse:
{
"success": true,
"url": "/images/abc1",
"filename": "photo.jpg",
"fileType": "images"
}Temporary Upload (5 minutes, max 5MB)
curl -X POST -F "file=@/path/to/file.jpg" -F "tmp=true" /api/uploadResponse:
{
"success": true,
"url": "/tmp/xyz1",
"filename": "photo.jpg",
"fileType": "temporary"
}2. URL Shortener
Create short URLs with automatic or custom codes (4 characters).
Auto-generated Code
curl -X POST -H "Content-Type: application/json" \
-d '{"url":"https://example.com/very/long/url"}' \
/api/shortenResponse:
{
"success": true,
"url": "/s/abc1",
"shortCode": "abc1",
"originalUrl": "https://example.com/very/long/url"
}Custom Code
curl -X POST -H "Content-Type: application/json" \
-d '{"url":"https://example.com","customCode":"cool"}' \
/api/shortenCustom codes must be exactly 4 lowercase alphanumeric characters (a-z, 0-9).
Access URLs
• Permanent files: /{fileType}/{shortCode}
• Temporary files: /tmp/{shortCode}
• Short URLs: /s/{shortCode}