关于api:方便好用的图片审核API

47次阅读

共计 1552 个字符,预计需要花费 4 分钟才能阅读完成。

图片审核 API 有什么作用呢?

  • 躲避守法、违规危险
    图片信息可能带来的恶心攻打、网络欺骗、个人信息泄露以及诱发违法犯罪等守法违规行为。
  • 进步审核效率
    解放人工,提高效率的同时又节约了老本。

APISpace 的 图片审核 API,反对对图片进行政治敏感辨认、色情辨认、暴恐辨认、恶心图像识别、广告检测、图像品质检测。APISpace 下面有很有类别的 API,比方短信类、天气类、物流类、智能辨认类、教育文化类等等,并且所有的 API 都提供收费的调用次数,大家能够下来看看有没有本人须要的~

接口信息

  • 申请形式:POST
  • 申请格局:FORMDATA
  • 申请参数:

    • imageUrl:图片资源拜访链接
    • BizType:配置不同的内容审核策略,通过接口调用,默认不填为 0,后端应用默认策略
  • 申请代码示例:
OkHttpClient client = new OkHttpClient().newBuilder().build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "imageUrl=&BizType=");
Request request = new Request.Builder()
  .url("https://eolink.o.apispace.com/nrsh/imgcheck")
  .method("POST",body)
  .addHeader("X-APISpace-Token","")
  .addHeader("Authorization-Type","apikey")
  .addHeader("Content-Type","")
  .build();

Response response = client.newCall(request).execute();
  • 返回示例:
{
    tradeNo: "796078182020423680",
    chargeStatus: 1,
    message: "胜利",
    data: {
        RequestId: "6b84d8a8-c9b8-438e-a811-b67171311ee7",
        SubLabel: "",
        LabelResults: [{
                Suggestion: "Pass",
                Score: 0,
                Details: [],
                SubLabel: "",
                Label: "Normal",
                Scene: "Terror",
                HitFlag: 0
            },
            {
                Suggestion: "Pass",
                Score: 0,
                Details: [],
                SubLabel: "",
                Label: "Normal",
                Scene: "Porn",
                HitFlag: 0
            },
            {
                Suggestion: "Pass",
                Score: 41,
                Details: [],
                SubLabel: "",
                Label: "Normal",
                Scene: "Sexy",
                HitFlag: 0
            }
        ],
        LibResults: [{
            Suggestion: "Pass",
            Score: 0,
            SubLabel: "",
            Label: "Normal",
            Scene: "Similar",
            HitFlag: 0
        }],
        Label: "Normal",
        ObjectResults: [{Names: [],
            Suggestion: "Pass",
            Score: 68,
            Details: [],
            SubLabel: "",
            Label: "Normal",
            Scene: "PolityFace",
            HitFlag: 0
        }],
        BizType: "0",
        HitFlag: 0,
        Suggestion: "Pass",
        Score: 0,
        OcrResults: [],
        DataId: "",
        Extra: ""
    },
    code: "200000"
}

返回参数阐明可查看官网详情页。

正文完
 0