HandWriting Removal
API

Remove the Handwriting of any image with 1 API call

Request & Response Examples

Use these examples to build and debug your integration

Sample HTTP Request

POST https://{your-api-domain}/sjccup
Headers:
  Authorization: Bearer {YOUR_API_TOKEN}
  Content-Type: application/json; charset=UTF-8

Body:
{
  "media_id": "<BASE64_IMAGE_WITHOUT_PREFIX>",
  "keep_distortion": false,
  "keep_ori": true
}

Sample Responses

Successful response

When the request is valid and the image is processed successfully, the API returns code = 0 and a Base64-encoded processed image.

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8

{
  "code": 0,
  "data": {
    "data": {
      "mediaId": "<BASE64_PROCESSED_IMAGE>"
    }
  },
  "message": "Success"
}

Business error response

When the upstream service reports a business error, the API returns error = "API_ERROR" and a non-zero code. You can map this code using the error code table below.

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8

{
  "error": "API_ERROR",
  "code": 1004,
  "message": "Image size error. Please ensure the image is less than 5MB and the longest side is less than 4000px."
}

API Introduction

The Artificial Intelligence technology specialized in Handwriting removal has been made easier than ever before using RemoveHandwriting.com API. With just a few lines of code, you can bring this technology into your application.

1

Purchase Package

Purchase a package dedicated to the API

2

Receive API Email

Within 2 hours after your purchase, you will receive an email with your dedicated API domain and AppCode.

3

Use Code Samples

Use the following code samples to get started quickly

4

Adjust Parameters

Getting back to the parameters reference to adjust the request

Authentication

We authenticate requests using a dedicated API domain and a per-account Bearer token. After you purchase an API package, we will email you your unique API domain and token. For security reasons, please do not publish your API token.

API Endpoint

POST https://{your-api-domain}/sjccup

Replace {your-api-domain} with the API domain we email to you after purchase. Each developer has a dedicated domain and token.

Headers

Authorization:
Bearer {YOUR_API_TOKEN}
Replace {YOUR_API_TOKEN} with the Bearer token we email to you. Keep it secret and never commit it to public repositories.
Content-Type:
application/json; charset=UTF-8

Code Examples

Get started quickly with our code samples

#!/usr/bin/env bash

set -euo pipefail

# Domain and token for the image processing proxy
API_DOMAIN="https://{your-api-domain}"
API_PATH="/sjccup"
API_TOKEN="{YOUR_API_TOKEN}"

# Image file passed as first argument (default: testpaper.jpg)
IMAGE_FILE="${1:-testpaper.jpg}"

if [ ! -f "$IMAGE_FILE" ]; then
  echo "Image file not found: $IMAGE_FILE" >&2
  echo "Usage: $0 path/to/image.jpg" >&2
  exit 1
fi

echo "Encoding image to Base64: $IMAGE_FILE"
# Encode image to Base64 and remove newlines (use -i for BSD base64 on macOS)
BASE64_IMAGE=$(base64 -i "$IMAGE_FILE" | tr -d '
')

echo "Building JSON body..."
read -r -d '' JSON_BODY <<EOF || true
{
  "media_id": "$BASE64_IMAGE",
  "keep_distortion": false,
  "keep_ori": true
}
EOF

echo "Calling proxy API..."
curl -X POST "${API_DOMAIN}${API_PATH}" \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -d "$JSON_BODY" \
  -o response.json \
  -s -w "\nHTTP status: %{http_code}\n"

echo "Response saved to response.json"

Request Parameters

Configure your API requests with these parameters

ParameterTypeDescription
media_idstringBase64 encoded value of the image, with the longest side not exceeding 4000px; remove the prefix data:image/png;base64
keep_distortionbooleanfalse – auto-corrects distortion, true – disables correction
keep_oribooleanfalse – the image will be rotated to the correct orientation, true – retains the orientation when uploaded

Error Codes

Reference for API response codes

Error CodeError MessageDescription
0successSuccess
1000body errorRequest body error
1001param errorRequest parameter error
1002content type errorContent-Type error
1003image not existsImage file not found
1004image size errorImage size error
1005image format errorImage format error
1006invalid signatureInvalid signature
1007body size errorBody size error
1008no authorizationAuthorization failed
2000server unknown errorServer unknown error
2001server timeoutServer timeout
2003no content recognitionNo content recognized
2004validate data errorValidation data error
3000remote server errorRemote server error
4000base server errorBase server error

API Pricing Plans

The following plans are API-exclusive

Starter

$99$0.198 / Credit
500 credits
3-month validity
  • Support most image formats
  • Document correction & enhancement
  • Document handwriting removal
  • Image moire pattern removal
  • Processing speed ~2 seconds
Most Popular

Popular

$349$0.07 / Credit
5,000 credits
6-month validity
  • Support most image formats
  • Document correction & enhancement
  • Document handwriting removal
  • Image moire pattern removal
  • Processing speed ~2 seconds

Business

$749$0.05 / Credit
15,000 credits
1-year validity
  • Support most image formats
  • Document correction & enhancement
  • Document handwriting removal
  • Image moire pattern removal
  • Processing speed ~2 seconds
Exclusive

Enterprise

$1999$0.04 / Credit
50,000 credits
1-year validity
  • Support most image formats
  • Document correction & enhancement
  • Document handwriting removal
  • Image moire pattern removal
  • Processing speed ~2 seconds

Why developers trust our API

Built for production workloads, our handwriting removal API balances quality, performance, and cost so you can rely on it in real-world apps.

Production-ready reliability

High availability and stable performance tuned for real-world traffic.

Optimized for handwriting

Models focused on documents, notes, and forms with handwritten text for more consistent results.

Predictable, API-only pricing

Dedicated API plans with clear per-credit costs for long-term integrations.

Support when you need it

Email support to help you diagnose issues and improve your integration over time.