馬賽克內容移除
API

一鍵移除圖片中的馬賽克內容

API 介紹

專門用於馬賽克內容移除的人工智能技術,通過 MosaicRemoval.com API 變得前所未有的簡單。只需幾行代碼,您就可以將這項技術集成到您的應用程序中。

1

購買套餐

購買專用於 API 的套餐

2

獲取 AppCode

發送郵件至 [email protected] 獲取您的專用 AppCode

3

使用代碼示例

使用以下代碼示例快速開始

4

調整參數

參考參數說明調整請求

身份驗證

我們使用特殊的 API 密鑰(或 App Code)對用戶進行身份驗證。您可以在這裡輕鬆獲取。API 密鑰是唯一的,與其他密鑰完全不同。出於安全考慮,請不要公開您的 App Code。

API 端點

POST https://api.mosaicremoval.com/sjccup

請求頭

Authorization:
APPCODE YourAppCode
Content-Type:
application/json; charset=UTF-8

代碼示例

使用我們的代碼示例快速開始

public static void main(String[] args) {
    String host = "https://api.mosaicremoval.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_idstring圖片的 Base64 編碼值,最長邊不超過 4000px;移除前綴 data:image/png;base64
keep_distortionbooleanfalse – 自動糾正失真,true – 禁用糾正
keep_oribooleanfalse – 圖片將旋轉到正確方向,true – 保持上傳時的方向

錯誤代碼

API 響應代碼參考

錯誤代碼錯誤信息描述
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 定價方案

以下方案專用於 API

基礎版

$499$0.10 / 積分
5,000 積分
6個月有效期
無風險:7天退款保證
最受歡迎

熱門版

$799$0.08 / 積分
10,000 積分
6個月有效期
無風險:7天退款保證
專屬

專屬版

$3999$0.04 / 積分
100,000 積分
1年有效期
無風險:7天退款保證

100% 退款保證!

放心購買。如果您發現此工具不符合您的需求,我們提供7天無理由退款保證。您可以放心付款。我們有退款政策來確保您付款的安全。