Upload API Documentation
Learn how to upload files using our API
Endpoint: /files/
POSTUpload files to the E-Z.host API
Valid File MIME Types
- Image
- Video
- Audio
- Application
Headers
Name | Value | Description |
---|---|---|
Content-Type | multipart/form-data | The type of the request body. |
key | Your API key | Your API key for authentication. |
Body
Name | Type | Description |
---|---|---|
file | file (multipart) | The file to upload |
Example Request
Here's how you can upload a file:
bash
curl -X POST 'https://api.e-z.host/files' \
-H 'key: YOUR_API_KEY' \
-F 'file=@/path/to/file'
Response
Successful response example:
json
{
"success": true,
"message": "File Uploaded",
"imageUrl": "https://i.e-z.host/filename",
"rawUrl": "https://r2.e-z.host/uuid/filename",
"deletionUrl": "https://api.e-z.host/delete?key=random-deletion-key"
}
File Size Limits
Standard: 25MBPremium: 100MB
Error Handling
Possible error responses include:
- 400 Bad Request: Invalid file type.
- 401 Unauthorized: Invalid API key.
- 403 Forbidden: File size limit exceeded.
- 422 Unprocessable Entity: Validation error due to missing or invalid parameters.
- 429 Too Many Requests: Rate limit exceeded.
Need Help?
If you need assistance with our Upload API, feel free to:
- • Ask our Discord community and staff
- • Email us at [email protected]
- • Check our FAQ