API Documentation

Endpoint

POST /v1/images

Request

Headers

Header Value Description
Content-Type multipart/form-data Indicates the request contains a file upload.
Authorization apikey API_KEY You can acquire the API on your profile. Remember to add a space-character between Bearer and your key.

Body

Field Type Description
file File The image file to upload. Supported formats: PNG, JPG, JPEG, BMP, GIF, TIF, TIFF, WEBP, HEIC, AVIF.

Response

Success

Status: 200 OK

{
    "filename": "example.jpg",
    "url": "https://image.srvimg.com/abcd1234/example.jpg"
}

Errors

Status Code Message Description
401 Unauthorized Authentication required. Missing Authorization header with value "apikey <API-KEY>".
401 Unauthorized Premium required. Premium membership is required.
400 Bad Request File is required No file was uploaded.
400 Bad Request Unsupported file format The uploaded file format is not supported.
500 Internal Server Error Unable to process file An error occurred while processing the file.

Example Request

curl -X POST https://api.srvimg.com/v1/images \
-H "Content-Type: multipart/form-data" \
-F "image=@path/to/your/image.jpg"