Imager API Reference

Welcome to the official API reference for Imager. Below you will find information on the available endpoints, request formats, and how to interact with the platform programmatically.

Authentication

To interact with the Imager API, you need an API key. You can obtain it by signing up and accessing your account settings.

All API requests must include the API key in the header:

Authorization: Bearer YOUR_API_KEY

Endpoints

Here are the key endpoints available for interacting with the Imager API:

1. Upload an Image

POST /api/images/upload

Upload an image to the platform. You must send the image as part of the request body in multipart/form-data format.

curl -X POST \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -F "image=@/path/to/your/image.jpg" \\ https://api.imager.com/api/images/upload

Response:


            {
              "status": "success",
              "data": {
                "id": "12345",
                "url": "https://imager.com/image/12345"
              }
            }
            

2. Get Image Details

GET /api/images/{image_id}

Fetch the details of an uploaded image using its unique ID.

curl -X GET \\ -H "Authorization: Bearer YOUR_API_KEY" \\ https://api.imager.com/api/images/12345

Response:


            {
              "status": "success",
              "data": {
                "id": "12345",
                "url": "https://imager.com/image/12345",
                "width": 800,
                "height": 600
              }
            }
            

Error Handling

In case of an error, the API will return an appropriate HTTP status code along with a message detailing the issue.

Example of a 400 Bad Request error:


            {
              "status": "error",
              "message": "Invalid image format"
            }
            

Rate Limits

The API has rate limits to prevent abuse. The current rate limit is 1000 requests per hour. If you exceed the limit, you will receive a 429 Too Many Requests status code.

Contact Support

If you need any help or have questions about the API, feel free to reach out to our support team.

Contact Support