API Documentation

The Image Conversion API allows you to convert, resize, compress, crop, and watermark images with a simple REST API. All endpoints support both file uploads and image URLs.

Base URL

https://convert.endpnt.dev/api/v1

Authentication

All API requests require an API key passed in the x-api-key header.

x-api-key: your_api_key_here

Response Format

All successful responses follow this structure:

{
  "success": true,
  "data": {
    "image": "base64_encoded_output...",
    "format": "webp",
    "width": 800,
    "height": 600,
    "file_size_bytes": 45200,
    "original_size_bytes": 284720,
    "savings_percent": 84.1
  },
  "meta": {
    "request_id": "req_c1d2e3",
    "processing_ms": 120,
    "remaining_credits": 96
  }
}

Error Codes

Error responses include a descriptive error code and message:

{
  "success": false,
  "error": {
    "code": "FILE_TOO_LARGE",
    "message": "Image file exceeds 10MB limit"
  }
}

Common Error Codes

AUTH_REQUIREDMissing API key (401)
INVALID_API_KEYInvalid API key (401)
RATE_LIMIT_EXCEEDEDToo many requests (429)
FILE_TOO_LARGEFile exceeds 10MB (400)
UNSUPPORTED_FORMATInvalid image format (400)
PROCESSING_FAILEDImage processing error (500)

Endpoints

Convert Format

Convert images between PNG, JPEG, WebP, AVIF, and TIFF formats.

POST /api/v1/convert

Upload Test Image

Drop your image here

or click to browse

Supports PNG, JPEG, WebP, AVIF, TIFF (max 10MB)

Authentication

Your API key is required to test the endpoint. Get one at /pricing

Parameters

Target format: "png", "jpeg", "webp", "avif", or "tiff"

Output quality 1-100 (lossy formats only)

Remove EXIF and other metadata

cURL Command

curl -X POST https://convert.endpnt.dev/api/v1/convert \
  -H "x-api-key: YOUR_API_KEY" \

Resize Image

Resize images with various fit modes and optional format conversion.

POST /api/v1/resize

Upload Test Image

Drop your image here

or click to browse

Supports PNG, JPEG, WebP, AVIF, TIFF (max 10MB)

Authentication

Your API key is required to test the endpoint. Get one at /pricing

Parameters

Target width in pixels (required if height not specified)

Target height in pixels (required if width not specified)

How to fit the image in the target dimensions

Convert format during resize (optional)

Output quality 1-100

cURL Command

curl -X POST https://convert.endpnt.dev/api/v1/resize \
  -H "x-api-key: YOUR_API_KEY" \

Compress Image

Reduce file size while maintaining visual quality.

POST /api/v1/compress

Upload Test Image

Drop your image here

or click to browse

Supports PNG, JPEG, WebP, AVIF, TIFF (max 10MB)

Authentication

Your API key is required to test the endpoint. Get one at /pricing

Parameters

Target quality 1-100

Convert to format optimized for compression (optional)

cURL Command

curl -X POST https://convert.endpnt.dev/api/v1/compress \
  -H "x-api-key: YOUR_API_KEY" \

Crop Image

Crop images with manual coordinates or smart attention-based cropping.

POST /api/v1/crop

Upload Test Image

Drop your image here

or click to browse

Supports PNG, JPEG, WebP, AVIF, TIFF (max 10MB)

Authentication

Your API key is required to test the endpoint. Get one at /pricing

Parameters

Crop width in pixels

Crop height in pixels

Left offset in pixels (required for manual crop)

Top offset in pixels (required for manual crop)

Use attention-based smart crop instead of manual coordinates

cURL Command

curl -X POST https://convert.endpnt.dev/api/v1/crop \
  -H "x-api-key: YOUR_API_KEY" \

Add Watermark

Add text or image watermarks with customizable positioning and opacity.

POST /api/v1/watermark

Upload Test Image

Drop your image here

or click to browse

Supports PNG, JPEG, WebP, AVIF, TIFF (max 10MB)

Authentication

Your API key is required to test the endpoint. Get one at /pricing

Parameters

Watermark text (required if watermark_url not provided)

URL to watermark image (alternative to text)

Watermark position

Watermark opacity 1-100

cURL Command

curl -X POST https://convert.endpnt.dev/api/v1/watermark \
  -H "x-api-key: YOUR_API_KEY" \