Auto Remover V2
5/7/25About 1 min
Auto Remover V2
AI-powered automatic watermark detection and removal. Upload an image and receive the processed result directly in a single call.
Before you begin
Obtain your API key from API Key Settings before making requests.
Overview
| Item | Value |
|---|---|
| Endpoint | POST /api/unwatermark/api/v1/auto-unWaterMark |
| Auth | ZF-API-KEY header |
| Credits | 2 per request |
| Result availability | 24 hours |
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 | Description |
|---|---|---|---|
original_image_file | file | Yes | Image to process |
Example
HTML
<!DOCTYPE html>
<html lang="en">
<body>
<input type="file" id="file" accept="image/*" />
<button onclick="send()">Remove Watermark</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);
const res = await fetch(
'https://api.unwatermark.ai/api/unwatermark/api/v1/auto-unWaterMark',
{ 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>Python
import requests
url = "https://api.unwatermark.ai/api/unwatermark/api/v1/auto-unWaterMark"
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})
print(response.json())Java
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"))
)
.build();
Request request = new Request.Builder()
.url("https://api.unwatermark.ai/api/unwatermark/api/v1/auto-unWaterMark")
.post(body)
.addHeader("ZF-API-KEY", "YOUR_API_KEY")
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println(response.body().string());
}
}
}PHP
<?php
$url = "https://api.unwatermark.ai/api/unwatermark/api/v1/auto-unWaterMark";
$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'),
],
]);
$data = json_decode(curl_exec($curl), true);
curl_close($curl);
print_r($data);Response
Success (100000)
{
"code": 100000,
"message": {
"en": "Image generated successfully.",
"zh": "图片生成成功。"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"need_credits": 2,
"input_image_url": "https://xxxxxx.jpg",
"output_image_url": "https://xxxxxx.jpg"
}
}Error (300001)
{
"code": 300001,
"message": {
"en": "Request Failure",
"zh": "提交任务失败",
"id": "Permintaan Gagal"
},
"result": {
"job_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
}Status Codes
| Code | Meaning |
|---|---|
100000 | Success |
300001 | Request submission failed |
