Auto Remover V2.3
Auto Remover V2.3
The latest V2.3 model with stronger watermark detection, better edge preservation, and optional image enhancement. Supports both synchronous (direct result) and asynchronous (job queue) modes with identical request parameters.
Before you begin
Obtain your API key from API Key Settings before making requests.
Overview
| Item | Value |
|---|---|
| Sync endpoint | POST /api/web/v1/sync/auto-unwatermark-upgrade-api/creat-job |
| Async endpoint | POST /api/web/v1/async/auto-unwatermark-upgrade-api/creat-job |
| Query endpoint | GET /api/web/v1/async/auto-unwatermark-upgrade-api/get-job/{job_id} |
| Auth | ZF-API-KEY header |
| Credits | 2 per request |
| Result availability | 24 hours |
Synchronous API
Returns the processed result directly in the response.
Request
Headers
| Name | Required | Value |
|---|---|---|
ZF-API-KEY | Yes | Your API key |
Content-Type | Yes | multipart/form-data |
Body (multipart/form-data)
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
original_image_file | file | Yes | ā | Image to process |
is_remove_text | boolean | No | false | Remove text watermarks |
is_remove_logo | boolean | No | false | Remove logo watermarks |
is_enhancer | boolean | No | false | Apply image enhancement |
output_format | string | No | jpg | Output format (jpg, png, webp) |
Example
<!DOCTYPE html>
<html lang="en">
<body>
<input type="file" id="file" accept="image/*" /><br/>
<label><input type="checkbox" id="rmText" /> Remove Text</label>
<label><input type="checkbox" id="rmLogo" /> Remove Logo</label>
<label><input type="checkbox" id="enhancer" /> Enhancer</label>
<select id="fmt"><option value="jpg">JPG</option><option value="png">PNG</option><option value="webp">WebP</option></select><br/>
<button onclick="send()">Remove Watermark (Sync)</button>
<pre id="out"></pre>
<script>
async function send() {
const file = document.getElementById('file').files[0];
if (!file) return alert('Please select an image.');
const form = new FormData();
form.append('original_image_file', file);
form.append('is_remove_text', document.getElementById('rmText').checked);
form.append('is_remove_logo', document.getElementById('rmLogo').checked);
form.append('is_enhancer', document.getElementById('enhancer').checked);
form.append('output_format', document.getElementById('fmt').value);
const res = await fetch(
'https://api.unwatermark.ai/api/web/v1/sync/auto-unwatermark-upgrade-api/creat-job',
{ method: 'POST', headers: { 'ZF-API-KEY': 'YOUR_API_KEY' }, body: form }
);
document.getElementById('out').textContent =
JSON.stringify(await res.json(), null, 2);
}
</script>
</body>
</html>import requests
url = "https://api.unwatermark.ai/api/web/v1/sync/auto-unwatermark-upgrade-api/creat-job"
headers = {"ZF-API-KEY": "YOUR_API_KEY"}
with open("/path/to/image.jpg", "rb") as f:
response = requests.post(url, headers=headers, files={
"original_image_file": f,
}, data={
"is_remove_text": "false",
"is_remove_logo": "false",
"is_enhancer": "false",
"output_format": "jpg",
})
print(response.json())import okhttp3.*;
import java.io.File;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
RequestBody body = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart(
"original_image_file", "image.jpg",
RequestBody.create(new File("/path/to/image.jpg"), MediaType.parse("image/jpeg"))
)
.addFormDataPart("is_remove_text", "false")
.addFormDataPart("is_remove_logo", "false")
.addFormDataPart("is_enhancer", "false")
.addFormDataPart("output_format", "jpg")
.build();
Request request = new Request.Builder()
.url("https://api.unwatermark.ai/api/web/v1/sync/auto-unwatermark-upgrade-api/creat-job")
.post(body)
.addHeader("ZF-API-KEY", "YOUR_API_KEY")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
}
}<?php
$url = "https://api.unwatermark.ai/api/web/v1/sync/auto-unwatermark-upgrade-api/creat-job";
$apiKey = "YOUR_API_KEY";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["ZF-API-KEY: {$apiKey}"],
CURLOPT_POSTFIELDS => [
'original_image_file' => new CURLFile('/path/to/image.jpg'),
'is_remove_text' => 'false',
'is_remove_logo' => 'false',
'is_enhancer' => 'false',
'output_format' => 'jpg',
],
]);
$data = json_decode(curl_exec($curl), true);
curl_close($curl);
print_r($data);Response
Success (300007)
{
"code": 300007,
"message": {
"en": "Task completed successfully",
"zh": "ä»»å”å®ęęå",
"id": "Tugas berhasil diselesaikan"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"need_credits": 2,
"input_url": "https://xxxxxx.jpg",
"output_url": "https://xxxxxx.jpg"
}
}Error (300008)
{
"code": 300008,
"message": {
"en": "Task processing failed",
"zh": "ä»»å”å¤ē失蓄",
"id": "Pemrosesan tugas gagal"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}Asynchronous API
Creates a job and returns a job_id. Poll the query endpoint to retrieve the result.
Create Job
Example
<!DOCTYPE html>
<html lang="en">
<body>
<input type="file" id="file" accept="image/*" /><br/>
<label><input type="checkbox" id="rmText" /> Remove Text</label>
<label><input type="checkbox" id="rmLogo" /> Remove Logo</label>
<label><input type="checkbox" id="enhancer" /> Enhancer</label>
<select id="fmt"><option value="jpg">JPG</option><option value="png">PNG</option><option value="webp">WebP</option></select><br/>
<button onclick="send()">Create Async Job</button>
<pre id="out"></pre>
<script>
async function send() {
const file = document.getElementById('file').files[0];
if (!file) return alert('Please select an image.');
const form = new FormData();
form.append('original_image_file', file);
form.append('is_remove_text', document.getElementById('rmText').checked);
form.append('is_remove_logo', document.getElementById('rmLogo').checked);
form.append('is_enhancer', document.getElementById('enhancer').checked);
form.append('output_format', document.getElementById('fmt').value);
const res = await fetch(
'https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/creat-job',
{ method: 'POST', headers: { 'ZF-API-KEY': 'YOUR_API_KEY' }, body: form }
);
document.getElementById('out').textContent =
JSON.stringify(await res.json(), null, 2);
}
</script>
</body>
</html>import requests
url = "https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/creat-job"
headers = {"ZF-API-KEY": "YOUR_API_KEY"}
with open("/path/to/image.jpg", "rb") as f:
response = requests.post(url, headers=headers, files={
"original_image_file": f,
}, data={
"is_remove_text": "false",
"is_remove_logo": "false",
"is_enhancer": "false",
"output_format": "jpg",
})
print(response.json())import okhttp3.*;
import java.io.File;
import java.io.IOException;
public class Main {
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
RequestBody body = new MultipartBody.Builder()
.setType(MultipartBody.FORM)
.addFormDataPart(
"original_image_file", "image.jpg",
RequestBody.create(new File("/path/to/image.jpg"), MediaType.parse("image/jpeg"))
)
.addFormDataPart("is_remove_text", "false")
.addFormDataPart("is_remove_logo", "false")
.addFormDataPart("is_enhancer", "false")
.addFormDataPart("output_format", "jpg")
.build();
Request request = new Request.Builder()
.url("https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/creat-job")
.post(body)
.addHeader("ZF-API-KEY", "YOUR_API_KEY")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
}
}<?php
$url = "https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/creat-job";
$apiKey = "YOUR_API_KEY";
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ["ZF-API-KEY: {$apiKey}"],
CURLOPT_POSTFIELDS => [
'original_image_file' => new CURLFile('/path/to/image.jpg'),
'is_remove_text' => 'false',
'is_remove_logo' => 'false',
'is_enhancer' => 'false',
'output_format' => 'jpg',
],
]);
$data = json_decode(curl_exec($curl), true);
curl_close($curl);
print_r($data);Request parameters are identical to the synchronous API.
Success (300000)
{
"code": 300000,
"message": {
"en": "Task created successfully",
"zh": "ä»»å”å建ęå",
"id": "Tugas berhasil dibuat"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"need_credits": 2
}
}Error (300008)
{
"code": 300008,
"message": {
"en": "Task processing failed",
"zh": "ä»»å”å¤ē失蓄",
"id": "Pemrosesan tugas gagal"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}Query Job
GET /api/web/v1/async/auto-unwatermark-upgrade-api/get-job/{job_id}
Polling required
This endpoint must be polled until the job completes. Keep polling every 5 seconds until code returns 100000 (completed) or 300008 (failed). Do not poll more frequently to avoid rate limiting.
code | Meaning | Action |
|---|---|---|
300006 | Processing | Wait 5 s and retry |
100000 | Completed | Read result.output_url |
300008 | Failed | Stop polling |
Headers
| Name | Required | Value |
|---|---|---|
ZF-API-KEY | Yes | Your API key |
Path Parameters
| Parameter | Type | Description |
|---|---|---|
job_id | string | ID returned by the create-job API |
Example
<!DOCTYPE html>
<html lang="en">
<body>
<label>Job ID: <input type="text" id="jobId" placeholder="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" size="40" /></label>
<button onclick="startPolling()">Poll Job</button>
<p id="status"></p>
<pre id="out"></pre>
<script>
const POLL_INTERVAL = 5000; // 5 seconds
let timer = null;
async function poll(jobId) {
const res = await fetch(
`https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/get-job/${jobId}`,
{ method: 'GET', headers: { 'ZF-API-KEY': 'YOUR_API_KEY' } }
);
const data = await res.json();
document.getElementById('out').textContent = JSON.stringify(data, null, 2);
if (data.code === 300006) {
document.getElementById('status').textContent = 'Processing⦠next check in 5s';
timer = setTimeout(() => poll(jobId), POLL_INTERVAL);
} else {
clearTimeout(timer);
document.getElementById('status').textContent =
data.code === 100000 ? 'ā
Completed' : 'ā Failed';
}
}
function startPolling() {
const jobId = document.getElementById('jobId').value.trim();
if (!jobId) return alert('Please enter a job ID.');
clearTimeout(timer);
document.getElementById('status').textContent = 'Pollingā¦';
poll(jobId);
}
</script>
</body>
</html>import time
import requests
job_id = "YOUR_JOB_ID"
url = f"https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/get-job/{job_id}"
headers = {"ZF-API-KEY": "YOUR_API_KEY"}
INTERVAL = 5 # seconds
while True:
response = requests.get(url, headers=headers)
data = response.json()
print(data)
if data.get("code") == 300006:
print("Processing⦠retrying in 5s")
time.sleep(INTERVAL)
else:
if data.get("code") == 100000:
print("ā
Completed:", data["result"]["output_url"])
else:
print("ā Failed:", data.get("message"))
breakimport okhttp3.*;
import org.json.JSONObject;
import java.io.IOException;
public class Main {
static final int POLL_INTERVAL_MS = 5000;
public static void main(String[] args) throws IOException, InterruptedException {
String jobId = "YOUR_JOB_ID";
String url = "https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/get-job/" + jobId;
OkHttpClient client = new OkHttpClient();
while (true) {
Request request = new Request.Builder()
.url(url)
.get()
.addHeader("ZF-API-KEY", "YOUR_API_KEY")
.build();
try (Response response = client.newCall(request).execute()) {
String body = response.body().string();
System.out.println(body);
JSONObject json = new JSONObject(body);
int code = json.getInt("code");
if (code == 300006) {
System.out.println("Processing⦠retrying in 5s");
Thread.sleep(POLL_INTERVAL_MS);
} else {
System.out.println(code == 100000 ? "ā
Completed" : "ā Failed");
break;
}
}
}
}
}<?php
$jobId = "YOUR_JOB_ID";
$url = "https://api.unwatermark.ai/api/web/v1/async/auto-unwatermark-upgrade-api/get-job/{$jobId}";
$apiKey = "YOUR_API_KEY";
$interval = 5; // seconds
while (true) {
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPGET => true,
CURLOPT_HTTPHEADER => ["ZF-API-KEY: {$apiKey}"],
]);
$data = json_decode(curl_exec($curl), true);
curl_close($curl);
echo json_encode($data, JSON_PRETTY_PRINT) . "\n";
if ($data['code'] === 300006) {
echo "Processing⦠retrying in {$interval}s\n";
sleep($interval);
} else {
echo $data['code'] === 100000 ? "ā
Completed\n" : "ā Failed\n";
break;
}
}Processing (300006)
{
"code": 300006,
"message": {
"en": "Task is processing",
"zh": "ä»»å”å¤ēäø",
"id": "Tugas sedang diproses"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"input_url": "https://xxxxxx.jpg"
}
}Completed (100000)
{
"code": 100000,
"message": {
"en": "Task completed successfully",
"zh": "ä»»å”å®ęęå",
"id": "Tugas berhasil diselesaikan"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"input_url": "https://xxxxxx.jpg",
"output_url": "https://xxxxxx.jpg"
}
}Error (300008)
{
"code": 300008,
"message": {
"en": "Task processing failed",
"zh": "ä»»å”å¤ē失蓄",
"id": "Pemrosesan tugas gagal"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"input_url": "https://xxxxxx.jpg"
}
}Status Codes
| Code | Meaning |
|---|---|
100000 | Success |
300000 | Job created (async) |
300006 | Job processing |
300007 | Job completed (sync) |
300008 | Job failed |
