API 소개
손글씨 제거에 특화된 인공지능 기술이 MosaicRemoval.com API를 사용하여 이전보다 훨씬 쉬워졌습니다. 몇 줄의 코드만으로 이 기술을 애플리케이션에 통합할 수 있습니다.
1
패키지 구매
API 전용 패키지 구매
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_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일 환불 보장