Skip to content

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.dev

Authentication

All API endpoints (except public image URLs) require authentication using an API key passed in the Authorization header:

http
Authorization: Bearer YOUR_API_KEY

See the Authentication Guide for detailed examples.

Endpoints

Upload & Management

EndpointMethodDescription
/upload/POSTUpload a new image or video
/get/GETRetrieve a list of your images
/get/tagsGETFilter images by tags
/get/searchGETSemantic search with AI
/update/<object_id>POSTUpdate image tags
/delete/<object_id>DELETEDelete an image

User Information

EndpointMethodDescription
/user/GETGet user account information

Image Transformations

EndpointMethodDescription
/create/<params>GETGenerate and cache transformed images

Request Format

Query Parameters

Most GET requests support query parameters:

http
GET /get/?page=1&page_size=20&tags=product

JSON Bodies

POST requests typically use JSON:

http
POST /update/xyz789
Content-Type: application/json

{
  "tags": ["product", "featured"]
}

Multipart Form Data

File uploads use multipart/form-data:

http
POST /upload/
Content-Type: multipart/form-data

file: [binary data]
tags: product,hero
folder: products

Response Format

All API responses are returned as JSON.

Success Response

json
{
  "object_id": "xyz789",
  "object_url": "https://files.reimage.dev/abc123/xyz789/",
  "status": "success"
}

Error Response

json
{
  "error": "Storage limit exceeded"
}

HTTP Status Codes

CodeMeaning
200Success
401Unauthorized - Invalid or missing API key
403Forbidden - Storage limit exceeded or feature not enabled
404Not Found - Resource doesn't exist
500Internal Server Error

Rate Limits

Rate limits are based on your subscription tier. Contact support if you need higher limits.

Pagination

List endpoints support pagination:

javascript
// 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=20

Response includes pagination metadata:

json
{
  "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.png

Storage 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.m3u8

Quick Reference

Popular Endpoints

Upload an Image

bash
curl -X POST https://api.reimage.dev/upload/ \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "tags=product,hero"

Get User Info

bash
curl https://api.reimage.dev/user/ \
  -H "Authorization: Bearer YOUR_API_KEY"

List Images

bash
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:

Released under the MIT License.