API Documentation
Access remove.sh tools programmatically via our REST API. Free, no authentication required, CORS enabled.
Base URL
All endpoints are relative to this base URL. HTTPS required.
Endpoints
/health Returns the current status of the API. Use this to verify the service is running before making other requests.
Response
Content-Type: application/json
JSON object with a status field.
Sample Response
{"status": "ok"} Example
curl https://api.remove.sh/health /remove 去除 Gemini Nano Banana 闪光水印。上传 PNG、JPG 或 WebP 文件,几秒内获得干净图片 —— 无需注册。
Parameters
| Name | Type | Description |
|---|---|---|
file | file | Image file with a Gemini watermark (PNG, JPG, or WebP). Also accepts field name image. |
Response
Content-Type: image/png
Clean PNG image with the watermark removed via reverse alpha blending.
Example
curl -X POST \
-F "[email protected]" \
https://api.remove.sh/remove \
--output cleaned.png /tools/image-compress 通过智能压缩将图片文件大小减少多达 80%。选择画质等级和输出格式,完美适用于网页优化。
Parameters
| Name | Type | Description |
|---|---|---|
file | file | Image file to compress (PNG, JPG, or WebP). Also accepts field name image. |
quality | integer | Compression quality level. Default: 80 Values: 0–100 |
format | string | Output image format. Default: jpg Values: jpg, png, webp |
Response
Content-Type: image/jpeg (varies by format)
Compressed image in the requested format.
Response Headers
x-original-size — Original file size in bytes
x-compressed-size — Compressed file size in bytes
Example
curl -X POST \
-F "[email protected]" \
-F "quality=60" \
-F "format=webp" \
https://api.remove.sh/tools/image-compress \
--output compressed.webp /tools/image-convert 在所有主流网页格式间转换图片:PNG、JPG 和 WebP。为网页优化或确保跨平台兼容性。
Parameters
| Name | Type | Description |
|---|---|---|
file | file | Image file to convert (PNG, JPG, or WebP). Also accepts field name image. |
format | string | Target output format. Values: png, jpg, webp |
quality | integer | Quality for lossy formats (JPG, WebP). Values: 0–100 |
Response
Content-Type: image/* (matches target format)
Image converted to the requested format.
Example
curl -X POST \
-F "[email protected]" \
-F "format=webp" \
https://api.remove.sh/tools/image-convert \
--output photo.webp /tools/image-resize 按指定像素尺寸调整图片大小。使用 Fit 模式保持宽高比、裁剪填充或拉伸至精确尺寸。
Parameters
| Name | Type | Description |
|---|---|---|
file | file | Image file to resize (PNG, JPG, or WebP). Also accepts field name image. |
width | integer | Target width in pixels. Omit to auto-calculate from height. |
height | integer | Target height in pixels. Omit to auto-calculate from width. |
mode | string | How the image is fitted to the target dimensions. Default: fit Values: fit, fill, stretch |
Response
Content-Type: image/png
Resized image as a PNG.
Response Headers
x-original-dimensions — Original image dimensions (e.g. 1920x1080)
x-new-dimensions — Dimensions after resize (e.g. 800x450)
Example
curl -X POST \
-F "[email protected]" \
-F "width=800" \
-F "mode=fit" \
https://api.remove.sh/tools/image-resize \
--output resized.png /tools/exif-remove 清除图片中的 EXIF 元数据,包括 GPS 定位、相机型号、拍摄日期等个人信息。在线分享照片前保护您的隐私。
Parameters
| Name | Type | Description |
|---|---|---|
file | file | Image file to strip metadata from (PNG, JPG, or WebP). Also accepts field name image. |
Response
Content-Type: image/* (preserves original format)
Image with all EXIF metadata (GPS, camera, date, etc.) removed. Original format is preserved.
Response Headers
x-original-size — Original file size in bytes
x-metadata-removed — Always "true" on success
Example
curl -X POST \
-F "[email protected]" \
https://api.remove.sh/tools/exif-remove \
--output clean.jpg /tools/what-is-my-ip 即时获取您的公网 IP 地址及详细的地理位置数据,包括国家、城市、地区、ISP、时区等。在交互式地图上查看您的大致位置。数据库每日更新。
Response
Content-Type: application/json
Geolocation and network data for the requesting IP address. Uses GeoLite2 databases updated daily.
Sample Response
{
"query": "101.190.80.155",
"continent": "Oceania",
"continentCode": "OC",
"country": "Australia",
"countryCode": "AU",
"region": "NSW",
"regionName": "New South Wales",
"city": "Sydney",
"zip": "2164",
"lat": -33.8437,
"lon": 150.9625,
"timezone": "Australia/Sydney",
"isp": "Telstra Limited",
"as": "AS1221 Telstra Limited"
} Example
curl https://api.remove.sh/tools/what-is-my-ip /tools/ip-lookup 输入任意 IPv4 或 IPv6 地址,获取详细的地理位置数据,包括国家、城市、地区、ISP、时区和坐标。在交互式地图上查看位置。使用每日更新的 GeoLite2 数据库。
Parameters
| Name | Type | Description |
|---|---|---|
ip | string | IPv4 or IPv6 address to look up. |
Response
Content-Type: application/json
Geolocation and network data for the specified IP address. Same response format as /tools/what-is-my-ip.
Sample Response
{
"query": "8.8.8.8",
"continent": "North America",
"continentCode": "NA",
"country": "United States",
"countryCode": "US",
"region": "CA",
"regionName": "California",
"city": "Los Angeles",
"lat": 34.0544,
"lon": -118.2441,
"timezone": "America/Los_Angeles",
"isp": "Google LLC",
"as": "AS15169 Google LLC"
} Example
curl "https://api.remove.sh/tools/ip-lookup?ip=8.8.8.8" Rate Limits & Usage
Rate Limiting
60 requests per minute per IP address. Contact us for higher limits.
Authentication
No authentication required. The API is free and open for everyone.
CORS
CORS enabled for all origins. Call directly from browser applications.
Error Handling
Errors are returned as JSON with an appropriate HTTP status code.
| Status | Meaning |
|---|---|
200 | Success — result returned in the response body. |
400 | Bad request — missing required field, unsupported format, or invalid parameters. |
413 | File too large — maximum upload size is 20 MB. |
429 | Rate limited — too many requests. Wait and retry. |
500 | Internal error — something went wrong processing the request. |
Limits
Max upload size
20 MB
Per file, per request.
Supported formats
Image endpoints accept these formats as input.