Developers

API Reference

Integrate ImageAI's editing models into your own products with a simple REST API.

Introduction

The ImageAI API lets you run our editing models programmatically. All endpoints are served over HTTPS from https://api.imageaiapp.top/v1 and accept and return JSON. Images can be supplied as a public URL or as a base64-encoded string.

The API is available on the Team plan and above. Generate a key from your dashboard under Settings → API keys.

Authentication

Authenticate every request with your secret key in the Authorization header as a bearer token. Keep your key server-side — never ship it in client code.

HTTP
Authorization: Bearer sk_live_3f8c0a1d9b2e4c7a6f5d8e9b0c1a2d3e

Quickstart

Enhance an image with a single request:

cURL
curl https://api.imageaiapp.top/v1/enhance \
  -H "Authorization: Bearer $IMAGEAI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image_url": "https://example.com/photo.jpg",
    "operations": ["auto", "denoise"],
    "output_format": "png"
  }'

And the same call from Node.js using the official SDK:

JavaScript
import ImageAI from "@imageai/sdk";

const client = new ImageAI(process.env.IMAGEAI_KEY);

const result = await client.enhance({
  image_url: "https://example.com/photo.jpg",
  operations: ["auto", "denoise"],
});

console.log(result.output_url);

Enhance

POST /v1/enhance

Applies automatic exposure, color and detail correction. Combine operations to chain effects in one pass.

ParameterTypeDescription
image_url required*stringPublic URL of the source image. *Provide either image_url or image_b64.
image_b64stringBase64-encoded image data, up to 25 MB.
operationsarrayAny of auto, denoise, sharpen, color. Defaults to ["auto"].
output_formatstringpng, jpg or webp. Defaults to png.

Example response:

JSON
{
  "id": "img_9f2a7c1e",
  "status": "succeeded",
  "output_url": "https://cdn.imageaiapp.top/o/9f2a7c1e.png",
  "credits_used": 1
}

Remove background

POST /v1/remove-background

Returns the subject on a transparent background, with per-pixel edge refinement for hair and soft edges.

ParameterTypeDescription
image_url required*stringSource image URL.
refine_edgesbooleanEnable hair-level edge refinement. Defaults to true.
bg_colorstringOptional hex color to fill behind the subject, e.g. "#ffffff".

Upscale

POST /v1/upscale

Increases resolution up to 4× with detail-preserving super-resolution.

ParameterTypeDescription
image_url required*stringSource image URL.
scaleinteger2 or 4. Defaults to 2.

Errors

The API uses conventional HTTP status codes. Errors include a machine-readable code and a human-readable message.

StatusCodeMeaning
400invalid_requestA parameter is missing or malformed.
401unauthorizedMissing or invalid API key.
402insufficient_creditsYour account is out of image credits.
429rate_limitedToo many requests — back off and retry.
500internal_errorSomething went wrong on our side.

Rate limits

Team accounts may make up to 60 requests per minute and run 10 concurrent jobs. Every response includes X-RateLimit-Remaining and X-RateLimit-Reset headers. If you need higher limits, talk to us.

SDKs

Official libraries wrap the REST API with retries, typed responses and streaming uploads:

  • JavaScript / TypeScriptnpm install @imageai/sdk
  • Pythonpip install imageai-sdk
  • Gogo get github.com/imageai/imageai-go
Need a language we don't list? The REST API is plain JSON over HTTPS — any HTTP client works.