v1 · 7 endpoints · live
Image editing
API for developers
Seven AI image processing endpoints behind one API key — background removal, upscaling, watermark and text removal, restoration, colorization, and text-to-image. Plain REST, a JSON response, and nothing stored after the call returns.
- 7 endpoints, 1 key
- REST over HTTPS
- No watermark
- Nothing stored
$ curl -X POST app.imggen.ai/v1/remove-background \
-H "Authorization: Bearer sk_live_..." \
-F image=@photo.jpg
→ 200 OK · 128 ms · X-Credit-Remaining: 385
{
"success": true,
"image": "iVBORw0KGgoAAAANSUhEUg..."
}What is the ImgGen AI image editing API?
The ImgGen AI image editing API is a REST service that performs AI image processing on demand. You POST an image — or a text prompt — to an endpoint over HTTPS, and the processed result comes back base64-encoded in the JSON response. There is no model to host and no GPU to provision.
Every endpoint shares the same base URL, the same API key, and the same response shape, so adding a second capability to your workflow is a change of path rather than a new integration. If you want to try the models before writing any code, the same models power the free ImgGen AI tools in the browser.
How do I use the image editing API?
Generate an API key, then send a multipart request with your image. This example removes a background; every other editing endpoint follows the same pattern with a different path. Image generation is the one exception — it takes a JSON body with your prompt, sample count and aspect ratio instead of a file.
curl --request POST \
--url 'https://app.imggen.ai/v1/remove-background' \
--header 'Authorization: Bearer sk_live_YOUR_API_KEY' \
--form image=@/path/to/photo.jpgimport fs from 'node:fs';
const form = new FormData();
form.append('image', new Blob([fs.readFileSync('photo.jpg')]), 'photo.jpg');
const res = await fetch('https://app.imggen.ai/v1/remove-background', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.IMGGEN_API_KEY}` },
body: form,
});
const { image } = await res.json();
fs.writeFileSync('result.png', Buffer.from(image, 'base64'));import base64, os, requests
with open("photo.jpg", "rb") as f:
res = requests.post(
"https://app.imggen.ai/v1/remove-background",
headers={"Authorization": f"Bearer {os.environ['IMGGEN_API_KEY']}"},
files={"image": f},
)
with open("result.png", "wb") as out:
out.write(base64.b64decode(res.json()["image"]))The seven endpoints
Each has its own reference page with parameters, code samples in three languages, and its exact credit cost.
Background Removal API
Remove image backgrounds programmatically with a single POST request. One API key, transparent PNG output, and a stateless service that never stores the images you send.
Image Upscaling API
Increase image resolution 2x or 4x from your own backend. Optional face enhancement and sharpening, JPEG or PNG output, and pricing that scales with the factor you ask for.
Watermark Removal API
Detect and erase watermarks from images in a single request. Generative inpainting reconstructs the pixels behind the mark, and this is the one endpoint that also accepts a batch of images.
Text Removal API
Erase captions, overlays, timestamps and burned-in labels from images programmatically. Detection is automatic — and if there is no text in the image, you are not charged.
Photo Restoration API
Repair old, damaged and faded photographs from your own backend. Optionally colorize and increase resolution in the same request instead of chaining three calls.
Photo Colorization API
Turn black-and-white photographs into naturally coloured images with one request. Optional tear repair in the same call, and no manual colour picking anywhere in the process.
AI Image Generation API
Generate images from a text prompt with a single JSON request. Up to four samples per call, three models to trade speed against quality, and full commercial rights on the output.
How much does the image editing API cost?
Usage is credit-based rather than a flat per-call fee, so a heavy month and a quiet month cost the same per image. Credits are shared across every endpoint and the web editor — one balance, not a separate quota per tool. A call that fails is refunded automatically, and every successful response returns your remaining balance on the X-Credit-Remaining header.
| Endpoint | Path | Credits / call |
|---|---|---|
| Background Removal | /v1/remove-background | 1 |
| Image Upscaling | /v1/upscale-image | 2–4 |
| Watermark Removal | /v1/remove-watermark | 2 |
| Text Removal | /v1/remove-text | 2 |
| Photo Restoration | /v1/image-restoration | 2 |
| Photo Colorization | /v1/colorize-photo | 2 |
| Image Generation | /v1/generate-image | 3+ |
| Plan | Price | Credits | API | Notes |
|---|---|---|---|---|
| Free | $0 | 50 one-time free credits | No API access | No credit card required |
| Starter | $9.99 / month | 400 credits / month | API access included | Unused credits roll over |
| Pro | $29.99 / month | 1,400 credits / month | API access + priority support | Unused credits roll over |
| Enterprise | Custom | Custom volume | Dedicated infrastructure | support@imggen.ai |
Credit costs and limits last verified 2026-08-27. Full details on the pricing page.
How the API works
Deliberately boring: one request, one response, no orchestration on your side.
Synchronous, not queued
The processed image is in the body of the same response. No job ID to poll, no webhook endpoint to stand up, no queue to reconcile. Requests are subject to a 60-second ceiling.
Multipart in, base64 out
Send your input image as a multipart form — JPEG (JPG), PNG and WebP, up to 25 MB. The result comes back base64-encoded in the JSON body: decode it and write it wherever you store assets.
Charged on success only
Credits are deducted atomically and refunded automatically if processing fails, so you are only billed for images that actually come back. Text removal even returns 422 free of charge when there is no text to remove.
Keys you can rotate
Keys are shown once and stored only as a hash. Revocation propagates in about a minute, so a leaked key is a one-minute problem rather than an incident.
Does the API store or train on my images?
No. The API is stateless. Unlike the web editor, which saves your projects so you can come back to them, an API call creates no project, no task record, and no stored file. Your upload is written to a temporary object, processed, and deleted as soon as the response is returned. The only thing retained is a usage log recording that a call happened and how many credits it cost.
Your images are never used to train models. That matters if you are processing customer photos you are contractually not allowed to retain — the architecture, not just the policy, is what keeps them out of our storage.
Error responses
Failures return a JSON envelope of the shape { "error": { "message", "code" } }, with the HTTP status matching the code.
| Status | Code | Meaning |
|---|---|---|
| 401 | UNAUTHORIZED | The API key is missing, malformed, or has been revoked. |
| 402 | INSUFFICIENT_CREDITS | Your account does not have enough credits for this call. |
| 403 | FORBIDDEN | Your plan does not grant access to this tool. |
| 404 | NOT_FOUND | The endpoint path does not exist. |
| 409 | CONFLICT | The request conflicts with the current state of the resource. |
| 422 | VALIDATION_ERROR | The request was rejected — a bad file type, a missing field, or nothing to process. No credits are charged. |
Who uses the ImgGen API?
Where an image processing API earns its place in a product.
E-commerce and marketplaces
Normalize supplier and seller imagery on upload — cut out backgrounds, strip overlaid text, and upscale small legacy shots so every listing looks like it came from the same studio.
Print-on-demand and product mockups
Isolate artwork, raise resolution to print standards, and composite onto templates without a designer touching each order.
Design and editor SaaS
Ship one-click editing features inside your own product without hosting GPUs, fine-tuning models, or maintaining an inference stack.
Archives, genealogy and digitization
Repair, colorize and enlarge scanned photographs in an automated pipeline instead of retouching every frame by hand.
Content and publishing platforms
Generate original imagery from a prompt and clean up contributor uploads as part of your existing editorial workflow.
Agencies and internal tooling
Automate the repetitive image work that sits between a client brief and a finished asset, driven from the tools your team already uses.
Image editing API FAQ
- Yes. The ImgGen AI image editing API exposes seven REST endpoints — background removal, image upscaling, watermark removal, text removal, photo restoration, colorization, and text-to-image generation — all under https://app.imggen.ai and all reachable with a single API key.
- It performs a specific edit on an image you send and returns the result in the same response. You can remove a background to a transparent PNG, upscale by 2x or 4x, erase watermarks or burned-in text, repair and colorize damaged photographs, and generate new images from a text prompt.
- Create an ImgGen account at https://editor.imggen.ai and generate a key from your account settings. The key is shown once and stored only as a hash, so copy it somewhere safe — if it is lost you generate a new one rather than recovering the old. Revoking a key takes effect within about a minute.
- Send your key as a bearer token: Authorization: Bearer sk_live_… on every request. Keys issued before the current scheme can also authenticate with the legacy x-imggen-key header, which is still accepted.
- Usage is measured in credits rather than a flat per-call fee, and the cost depends on the endpoint: background removal is 1 credit; watermark removal, text removal, restoration and colorization are 2; upscaling is 2 at factor=2 and 4 at factor=4; image generation starts at 3 and varies by model. Starter gives you 400 credits a month for $9.99 and Pro gives you 1,400 for $29.99, with unused credits rolling over while your subscription is active.
- A free ImgGen account comes with 50 credits and no credit card, which is enough to evaluate the models in the web tools. API access itself is part of the paid Starter and Pro plans — there is no permanently free API tier, and we would rather state that plainly than advertise one that quietly throttles.
- The API accepts JPEG (JPG), PNG and WebP files up to 25 MB per image. Results are returned as a base64-encoded image in the JSON response.
- Synchronous. There is no job ID to poll, no queue to manage, and no webhook to configure — the processed image is in the body of the same response. Requests are subject to a 60-second ceiling.
- No. The API is stateless: it does not create a project, save a file, or keep your image. Your upload is written to a temporary object, processed, and deleted as soon as the response is returned. The only thing retained is a usage log recording that a call happened and how many credits it cost. Your images are never used to train models.
- Yes. Every plan, including Free, includes full commercial usage rights, and no output carries a watermark. You can sell, print, or publish anything the API returns.
- The watermark removal endpoint accepts a batch of files under image[] and returns an images array. Every other endpoint takes one image per request — for volume, run requests concurrently from your own worker, since each call is independent.
- Not currently. The API is plain REST over HTTPS with multipart uploads, so any HTTP client works, and the docs give copy-paste examples in cURL, Node.js and Python. There is no official client library and no published OpenAPI specification yet.
Get started
Ship your first call in five minutes
Create a key, copy the cURL example, and you have background removal running. One key covers all seven endpoints, on every plan that includes API access.
Get your API key