Developer Documentation

Easy Image Edit API specification

Integrate powerful AI image processing into your application. Easy Image Edit uses a RESTful API with standard OAuth2 authentication and JSON payloads.

Getting Started

Quickstart Guide

Follow these three steps to perform your first image transformation.

1. Authentication

Exchange your credentials for a Bearer JWT.

curl -sS -X POST https://api.easyimgedit.com/oauth/token \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=${ID}&client_secret=${SECRET}"

2. Process Image

Post your image data with the token in the header.

Authorization: Bearer <token>
Content-Type: application/json

3. Handle Result

Success returns a JSON object with the processed image.

{ "imageData": "data:image/png;base64,..." }

Reference

Available Endpoints

All endpoints process base64 strings and return a data:image URI.

POST /api/colorize

Adds realistic color to grayscale images.

Required Scope: colorize

Input: PNG, JPEG, WEBP, BMP


Request Body Example:

{ "imageData": "data:image/png..." }
POST /api/remove-background

AI-powered subject isolation with transparency.

Required Scope: remove_background

Output: Transparent PNG


Request Body Example:

{ "imageData": "data:image/png..." }
POST /api/replace-background

Remove background and replace it with a solid hex color.

Required Scope: replace-background

Input: imageData + color (#RGB/#RRGGBB)


Request Body Example:

{
  "imageData": "data:image/png...",
  "color": "#00AEEF"
}
POST /api/convert-image

Fast conversion between multiple web formats.

Required Scope: convert


Request Body Example:

{
  "imageData": "data:image/png...",
  "outputFormat": "webp"
}
POST /api/compress-image

Reduce file size while maintaining visual quality.

Required Scope: compress


Request Body Example:

{
  "imageData": "data:image/png...",
  "quality_level": 1
}
POST /api/watermark

Add a text watermark to an image.

Required Scope: watermark


Request Body Example:

{
  "imageData": "data:image/png...",
  "text": "© Easy Image Edit",
  "fontSize": 36,
  "opacity": 0.35,
  "color": "#ffffff",
  "position": "bottom-right"
}
POST /api/upscale-image

Increase image dimensions by 2x or 4x.

Required Scope: upscale


Request Body Example:

{
  "imageData": "data:image/png...",
  "scale": 4
}

Reliability

Errors & Responses

We use standard HTTP response codes to indicate the success or failure of an API request.

Error Schema

Errors contain a machine-readable string.

{
  "error": "insufficient_scope"
}

Common Status Codes

  • 400 – Invalid input or malformed JSON
  • 401 – Authentication failed/Token expired
  • 403 – Permissions error (check scopes)
  • 429 – Rate limit exceeded
  • 500 – Internal server error