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日間返金保証