API 介紹
使用 RemoveHandwriting.com API,專門用於手寫移除的人工智慧技術變得前所未有的簡單。只需幾行程式碼,您就可以將這項技術引入您的應用程式中。
1
購買方案
購買專用於 API 的方案
2
取得 AppCode
發送電子郵件至 service@removehandwriting.com 以獲取您專屬的 AppCode
3
使用程式碼範例
使用以下程式碼範例快速入門
4
調整參數
返回參數參考以調整請求
身份驗證
我們使用特殊的 API 金鑰(或 App Code)來驗證用戶身份。可在此處輕鬆獲取。API 金鑰是唯一的,與其他金鑰截然不同。出於安全原因,請勿發布您的 App Code。
API 端點
POST https://api.removehandwriting.com/sjccup
標頭
Authorization:
APPCODE YourAppCode
Content-Type:
application/json; charset=UTF-8
程式碼範例
使用我們的程式碼範例快速入門
public static void main(String[] args) {
String host = "https://api.removehandwriting.com";
String path = "/sjccup";
String method = "POST";
String appcode = "YourAppCode";
Map<String, String> headers = new HashMap<String, String>();
// The final format in the header (with a space in between) is Authorization:APPCODE 83359fd73fe94948385f570e3c139105
headers.put("Authorization", "APPCODE " + appcode);
// Define the corresponding Content-Type according to API requirements
headers.put("Content-Type", "application/json; charset=UTF-8");
Map<String, String> querys = new HashMap<String, String>();
String bodys = "{\"media_id\":\"Base64 encoded image value, with the longest side not exceeding 4000px; remove the prefix data:image/png;base64\",\"keep_distortion\":boolean type, false - auto-corrects distortion, true - disables correction\",\"keep_ori\":boolean type, false - the image will be rotated to the correct orientation, true - retains the orientation when uploaded}";
try {
HttpResponse response = HttpUtils.doPost(host, path, method, headers, querys, bodys);
System.out.println(response.toString());
// Get the body of the response
// System.out.println(EntityUtils.toString(response.getEntity()));
} catch (Exception e) {
e.printStackTrace();
}
}請求參數
使用這些參數配置您的 API 請求
| 參數 | 類型 | 描述 |
|---|---|---|
| media_id | string | 影像的 Base64 編碼值,最長邊不超過 4000px;移除前綴 data:image/png;base64 |
| keep_distortion | boolean | false – 自動校正失真,true – 停用校正 |
| keep_ori | boolean | false – 影像將旋轉至正確方向,true – 保留上傳時的方向 |
錯誤代碼
API 回應代碼參考
| 錯誤代碼 | 錯誤訊息 | 描述 |
|---|---|---|
| 0 | success | Success |
| 1000 | body error | Request body error |
| 1001 | param error | Request parameter error |
| 1002 | content type error | Content-Type error |
| 1003 | image not exists | Image file not found |
| 1004 | image size error | Image size error |
| 1005 | image format error | Image format error |
| 1006 | invalid signature | Invalid signature |
| 1007 | body size error | Body size error |
| 1008 | no authorization | Authorization failed |
| 2000 | server unknown error | Server unknown error |
| 2001 | server timeout | Server timeout |
| 2003 | no content recognition | No content recognized |
| 2004 | validate data error | Validation data error |
| 3000 | remote server error | Remote server error |
| 4000 | base server error | Base server error |
API 定價方案
以下方案為 API 專屬
基本
$499$0.10 / 積分
5,000 積分
6 個月有效期
無風險:7 天退款保證
最受歡迎
熱門
$799$0.08 / 積分
10,000 積分
6 個月有效期
無風險:7 天退款保證
專屬
專屬
$3999$0.04 / 積分
100,000 積分
1 年有效期
無風險:7 天退款保證