API Overview
The Reimage API is organized around REST principles. It uses predictable resource-oriented URLs, accepts JSON-encoded request bodies for POST requests, and returns JSON-encoded responses.
Base URL
https://api.reimage.devAuthentication
All API endpoints (except public image URLs) require authentication using an API key passed in the Authorization header:
Authorization: Bearer YOUR_API_KEYSee the Authentication Guide for detailed examples.
Endpoints
Upload & Management
| Endpoint | Method | Description |
|---|---|---|
/upload/ | POST | Upload a new image or video |
/get/ | GET | Retrieve a list of your images |
/get/tags | GET | Filter images by tags |
/get/search | GET | Semantic search with AI |
/update/<object_id> | POST | Update image tags |
/delete/<object_id> | DELETE | Delete an image |
User Information
| Endpoint | Method | Description |
|---|---|---|
/user/ | GET | Get user account information |
Image Transformations
| Endpoint | Method | Description |
|---|---|---|
/create/<params> | GET | Generate and cache transformed images |
Request Format
Query Parameters
Most GET requests support query parameters:
GET /get/?page=1&page_size=20&tags=productJSON Bodies
POST requests typically use JSON:
POST /update/xyz789
Content-Type: application/json
{
"tags": ["product", "featured"]
}Multipart Form Data
File uploads use multipart/form-data:
POST /upload/
Content-Type: multipart/form-data
file: [binary data]
tags: product,hero
folder: productsResponse Format
All API responses are returned as JSON.
Success Response
{
"object_id": "xyz789",
"object_url": "https://files.reimage.dev/abc123/xyz789/",
"status": "success"
}Error Response
{
"error": "Storage limit exceeded"
}HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success |
| 401 | Unauthorized - Invalid or missing API key |
| 403 | Forbidden - Storage limit exceeded or feature not enabled |
| 404 | Not Found - Resource doesn't exist |
| 500 | Internal Server Error |
Rate Limits
Rate limits are based on your subscription tier. Contact support if you need higher limits.
Pagination
List endpoints support pagination:
// Page 1, 10 items per page
GET /get/?page=1&page_size=10
// Page 2, 20 items per page
GET /get/?page=2&page_size=20Response includes pagination metadata:
{
"page": 1,
"page_size": 10,
"objects": [...],
"urls": [...],
"thumbnails": [...]
}Image URL Structure
After uploading, images are accessible via CDN URLs:
https://files.reimage.dev/{bucket_id}/{object_id}/{transformations}.{format}Examples:
https://files.reimage.dev/abc123/xyz789/original
https://files.reimage.dev/abc123/xyz789/w-800.webp
https://files.reimage.dev/abc123/xyz789/h-400_w-600_bg-remove.pngStorage Backends
Reimage supports two storage backends:
- Google Cloud Storage (default):
https://files.reimage.dev - Cloudflare R2:
https://storage.reimage.dev
Your backend is configured in your account settings.
Video URLs
Videos use Mux for HLS streaming:
https://files.reimage.dev/{bucket_id}/{object_id}/original.m3u8Quick Reference
Popular Endpoints
Upload an Image
curl -X POST https://api.reimage.dev/upload/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]" \
-F "tags=product,hero"Get User Info
curl https://api.reimage.dev/user/ \
-H "Authorization: Bearer YOUR_API_KEY"List Images
curl "https://api.reimage.dev/get/?page=1&page_size=10" \
-H "Authorization: Bearer YOUR_API_KEY"Next Steps
Explore detailed documentation for each endpoint:
- Upload API - Upload images and videos
- Get Images API - Retrieve and filter images
- Update API - Modify image metadata
- Delete API - Remove images
- User API - Account information
- Search API - AI-powered semantic search