REST API Reference
Welcome to the T11N Upload REST API documentation. This API allows developers to easily integrate image upload and delete capabilities (supporting single or bulk actions) directly into their own applications. All endpoints return standard JSON responses and support CORS.
ℹ️ Authentication: No API key required for public use.
Upload one or multiple images at once. Supports formats: JPG, PNG, GIF, WEBP, and AVIF. Maximum size limit is 50MB per file.
Request Headers
| Header |
Value |
Description |
| Content-Type |
multipart/form-data |
Required for file transmission. |
Parameters (Form Data)
| Field |
Type |
Required |
Description |
| files[] |
file[] |
Yes* |
An array of image files to upload. Brackets [] are mandatory for uploading multiple files. |
| file |
file |
Yes* |
A single image file (fallback option if not using array field). |
💡 Field Name Flexibility
While files[] and file are standard, the API automatically scans all fields inside the upload payload. However, using files[] is highly recommended for bulk uploads.
cURL Examples
Success Response (200 OK)
{
"success": true,
"data": [
{
"name": "a1b2c3d4..._1739245678_image1.jpg",
"original_name": "image1.jpg",
"status": "success",
"url": "http://up.t11n.dev/uploads/a1b2c3d4..._1739245678_image1.jpg",
"size": 123456,
"mime": "image/jpeg",
"width": 1920,
"height": 1080
}
]
}
Delete one or multiple image files previously uploaded to the server.
Request Headers
| Header |
Value |
Description |
| Content-Type |
application/json |
Required for transmitting request body. |
JSON Body Parameters
| Field |
Type |
Required |
Description |
| names |
string[] |
Yes* |
Array of filenames to delete (e.g. ["a1b2..._image1.jpg", "x1y2..._image2.png"]). |
| name |
string |
Yes* |
Single filename to delete (fallback if names array is not provided). |
cURL Example
curl -X POST "http://up.t11n.dev/api.php?action=delete" \
-H "Content-Type: application/json" \
-d '{"names": ["a1b2c3d4e5f678901234567890abcdef_1739245678_image1.jpg"]}'
Response (200 OK)
{
"success": true,
"data": [
{
"name": "a1b2c3d4e5f678901234567890abcdef_1739245678_image1.jpg",
"status": "success"
}
]
}