马赛克内容移除
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天无理由退款保证。您可以放心付款。我们有退款政策来确保您付款的安全。

马赛克内容移除 API – 使用 AI 移除马赛克内容