2 credits per call
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.
- REST · JSON
- No watermark
- Nothing stored
POST /v1/remove-text
What is the Text Removal API?
The ImgGen AI text removal API is a REST endpoint that locates text in an image and removes it, reconstructing the background where the characters were. It handles captions, overlays, timestamps, and burned-in labels without a mask. If the model finds no text, the request returns 422 and no credits are deducted.
It is one of seven endpoints in the ImgGen AI image editing API, all of which share a single API key, a single base URL, and the same request and response shape. If you also need this capability in a browser rather than from code, the same AI model powers the Image Text Remover tool.
Request parameters
Send a POST request to https://app.imggen.ai/v1/remove-text, authenticated with an API key in the Authorization header.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| image | file | REQUIRED | — | The image to clean. Accepts JPEG (JPG), PNG and WebP, up to 25 MB. |
How do I integrate the remove text from image API?
Create an API key in your ImgGen account, set it as an environment variable, and call the endpoint. Here is the same request in cURL, Node.js and Python.
curl --request POST \
--url 'https://app.imggen.ai/v1/remove-text' \
--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-text', {
method: 'POST',
headers: { Authorization: `Bearer ${process.env.IMGGEN_API_KEY}` },
body: form,
});
const data = await res.json();
// data.image is a base64-encoded PNG
fs.writeFileSync('result.png', Buffer.from(data.image, 'base64'));import base64, os, requests
with open("photo.jpg", "rb") as f:
res = requests.post(
"https://app.imggen.ai/v1/remove-text",
headers={"Authorization": f"Bearer {os.environ['IMGGEN_API_KEY']}"},
files={"image": f},
)
data = res.json()
with open("result.png", "wb") as out:
out.write(base64.b64decode(data["image"]))Response
A successful call returns JSON. The result is base64-encoded — decode it before writing to disk or object storage. Every successful response also carries an X-Credit-Remaining header with your balance after the call.
{
"success": true,
"message": "Text removed successfully",
"image": "iVBORw0KGgoAAAANSUhEUgAA...SUVORK5CYII="
}Limits and behaviour worth knowing
The endpoint accepts JPEG (JPG), PNG and WebP with a 25 MB maximum file size, and responds synchronously within 60 seconds — there is no job to poll and no webhook to configure.
No text, no charge
If the model detects no text in the image, the endpoint returns 422 VALIDATION_ERROR and deducts nothing. You can point it at a mixed set of images without paying for the clean ones.
Generative fill, not blur
The area behind the characters is reconstructed to match its surroundings rather than smudged, so the result holds up against detailed backgrounds.
Automatic detection
There is no region or bounding-box parameter — the model finds the text itself, which is what makes the endpoint safe to run unattended.
What is the remove text from image API used for?
Where teams put this endpoint into production to process images programmatically, at scale.
Localization pipelines
Strip burned-in source-language copy from marketing images so a localized version can be composited for each market.
Marketplace listing hygiene
Remove promotional overlays and competitor branding that sellers add to product photos, enforcing catalog rules automatically.
Archive cleanup
Clear timestamps and camera labels burned into scanned or legacy photography before it enters a media library.
Template reuse
Recover a clean base image from a finished creative so the same artwork can carry new copy.
How much does the remove text from image API cost?
Each successful call costs 2 credits, so your effective cost per image follows whichever plan you are on. Credits come from your plan and are shared across every endpoint and the web editor, so you are not buying a separate quota per tool. A call that fails is refunded automatically. See the full pricing page for details.
| Plan | Price | Credits | API |
|---|---|---|---|
| Free | $0 | 50 one-time free credits | No API access |
| Starter | $9.99 / month | 400 credits / month | API access included |
| Pro | $29.99 / month | 1,400 credits / month | API access + priority support |
| Enterprise | Custom | Custom volume | Dedicated infrastructure |
Credit costs and limits last verified 2026-08-27.
Related endpoints and tools
Teams using the remove text from image API usually reach for these next.
Also available: Image Upscaling, Photo Restoration, Photo Colorization, Image Generation.
Text Removal API FAQ
- It is an HTTP endpoint that detects written characters in a photo and erases them, filling in the background that was hidden behind them. It is the programmatic equivalent of manually cloning text out in an editor, except it runs in a second and needs no human to mark the region.
- The request returns HTTP 422 with a VALIDATION_ERROR code and no credits are charged. That makes it safe to run the endpoint speculatively across a mixed batch — you only pay for the images that actually had text to remove.
- That is exactly what this endpoint does. Rather than painting over the characters, it detects the text region, removes it, and reconstructs the background that was hidden behind it using the surrounding pixels as reference. Everything outside the text region is left untouched, so the rest of the photo is bit-for-bit what you sent.
- Yes. Detection covers the whole image, so every text region it finds — a caption, a corner timestamp, and a label in the middle — is removed in the same single call. Note that batching multiple *images* into one request is not supported here; send one image per request, or use the watermark endpoint if you need batch uploads.
- Not outside the text region — those pixels pass through unchanged. Inside it, the content is generated rather than recovered, so a busy or highly detailed background is a harder reconstruction than a flat one. Output resolution matches your input; nothing is downscaled.
- Use the dedicated watermark removal endpoint for that. It is tuned for the semi-transparent, repeating, or tiled overlays typical of watermarks, and it is the one endpoint that accepts batch uploads. This one targets opaque text: captions, timestamps, and burned-in labels.
- Two credits per successful call, and nothing at all when no text is detected. Starter includes 400 credits a month at $9.99 and Pro includes 1,400 at $29.99, with unused credits rolling over while your subscription is active.
- No — detection is automatic and applies to the whole image. There is no region or bounding-box parameter. If you need selective removal, the ImgGen web editor has a brush-based object remover for that kind of hand-guided work.
- 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.
- 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.
Get started
Start calling the Text Removal API
One key unlocks all seven endpoints. No watermark, full commercial rights, and nothing you send is stored after the response is returned.
Get your API key