이미지 위조 감지
API

1번의 API 호출로 모든 이미지에서 위조를 감지

요청 및 응답 예제

이 예제를 사용하여 통합을 구축하고 디버그하세요

샘플 HTTP 요청

POST https://{your-api-domain}/forgery_detection
헤더:
  Authorization: Bearer {YOUR_API_TOKEN}
  Content-Type: application/json; charset=UTF-8

Body:
{
  "image": "<BASE64_IMAGE_WITHOUT_PREFIX>",
  "return_heatmap": "false",
  "detect_proportion": "false",
  "restrict_probability": "0.8"
}

샘플 응답

성공 응답

When the request is valid and the image is processed successfully, the API returns detection_result indicating whether the image is tampered (fake) or authentic (real), along with optional tampering confidence, heatmap, and location coordinates.

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8

{
  "code": 0,
  "data": {
    "detection_result": "fake",
    "tampered_proportion": 0.000587,
    "heatmap": "<BASE64_HEATMAP_IMAGE>",
    "tampered_location": [
      {
        "left": 100,
        "top": 200,
        "width": 150,
        "height": 100,
        "probability": 0.95
      }
    ]
  },
  "message": "Success"
}

비즈니스 오류 응답

업스트림 서비스가 비즈니스 오류를 보고하면 API는 오류 = "API_ERROR"와 0이 아닌 코드를 반환합니다. 아래 오류 코드 테이블을 사용하여 이 코드를 매핑할 수 있습니다.

HTTP/1.1 400 Bad Request
Content-Type: application/json; charset=UTF-8

{
  "error": "API_ERROR",
  "code": 1004,
  "message": "Image size error. Please ensure the image is less than 5MB and the longest side is less than 4000px."
}

API 소개

위조 감지에 특화된 인공지능 기술이 ImgAuth.com API를 사용하여 그 어느 때보다 쉬워졌습니다. 몇 줄의 코드만으로 이 기술을 애플리케이션에 통합할 수 있습니다.

1

패키지 구매

API 전용 패키지 구매

2

API 이메일 수신

구매 후 2시간 이내에 전용 API 도메인과 AppCode가 포함된 이메일을 받게 됩니다.

3

코드 샘플 사용

다음 코드 샘플을 사용하여 빠르게 시작

4

매개변수 조정

매개변수 참조로 돌아가 요청 조정

인증

전용 API 도메인과 계정별 Bearer 토큰을 사용하여 요청을 인증합니다. API 패키지를 구매한 후 고유한 API 도메인과 토큰을 이메일로 보내드립니다. 보안상의 이유로 API 토큰을 공개하지 마세요.

API 엔드포인트

POST https://{your-api-domain}/forgery_detection

{your-api-domain}을 구매 후 이메일로 보내드리는 API 도메인으로 교체하세요. 각 개발자에게는 전용 도메인과 토큰이 있습니다.

헤더

인증:
Bearer {YOUR_API_TOKEN}
{YOUR_API_TOKEN}을 이메일로 보내드리는 Bearer 토큰으로 교체하세요. 비밀로 유지하고 공개 저장소에 커밋하지 마세요.
Content-Type:
application/json; charset=UTF-8

코드 예제

코드 샘플로 빠르게 시작하세요

#!/usr/bin/env bash

set -euo pipefail

# Domain and token for the image processing proxy
API_DOMAIN="https://{your-api-domain}"
API_PATH="/forgery_detection"
API_TOKEN="{YOUR_API_TOKEN}"

# Image file passed as first argument (default: testpaper.jpg)
IMAGE_FILE="${1:-testpaper.jpg}"

if [ ! -f "$IMAGE_FILE" ]; then
  echo "Image file not found: $IMAGE_FILE" >&2
  echo "Usage: $0 path/to/image.jpg" >&2
  exit 1
fi

echo "Encoding image to Base64: $IMAGE_FILE"
# Encode image to Base64 and remove newlines (use -i for BSD base64 on macOS)
BASE64_IMAGE=$(base64 -i "$IMAGE_FILE" | tr -d '
')

echo "Building JSON body..."
read -r -d '' JSON_BODY <<EOF || true
{
  "image": "$BASE64_IMAGE",
  "return_heatmap": "false",
  "detect_proportion": "false",
  "restrict_probability": "0.8"
}
EOF

echo "Calling proxy API..."
curl -X POST "${API_DOMAIN}${API_PATH}" \
  -H "Authorization: Bearer ${API_TOKEN}" \
  -H "Content-Type: application/json; charset=UTF-8" \
  -d "$JSON_BODY" \
  -o response.json \
  -s -w "\nHTTP status: %{http_code}\n"

echo "Response saved to response.json"

요청 매개변수

이 매개변수로 API 요청 구성

매개변수유형설명
imagestringBase64 encoded image data, urlencoded. Size must not exceed 10MB. Shortest side at least 512px, longest side max 8192px. Supports jpg/jpeg/png/bmp formats. Either image or url is required.
urlstringComplete image URL, length not exceeding 1024 bytes. Image size must not exceed 10MB after base64 encoding. Shortest side at least 512px, longest side max 8192px. Supports jpg/jpeg/png/bmp formats. Either image or url is required. Please disable URL hotlink protection.
return_heatmapstringWhether to return forgery region heatmap. Default: false. true: returns base64-encoded heatmap, false: does not return
detect_proportionstringWhether to return image tampering confidence. Default: false. true: returns tampering confidence, false: does not return
restrict_probabilitystringThreshold for returning forgery region coordinates. Range: 0.1 to 1, supports 1 decimal place. Default: 0.8. When forgery region coordinate confidence score (probability) ≥ threshold, tampered_location returns coordinates meeting the threshold, otherwise does not return coordinates

Response Parameters

Reference for API response fields

ParameterTypeDescription
detection_resultstringTampering detection result: "fake" indicates tampering detected, "real" indicates no tampering
tampered_proportionfloatImage tampering confidence (returned when detect_proportion = true in request)
heatmapstringBase64-encoded heatmap of tampered regions (returned when return_heatmap = true in request)
tampered_locationarrayArray of forgery region coordinate information (returned when probability ≥ restrict_probability threshold). Each item contains: left, top, width, height (coordinates), and probability (confidence score)
leftuint32Horizontal coordinate of the top-left vertex of the forgery region
topuint32Vertical coordinate of the top-left vertex of the forgery region
widthuint32Width of the forgery region
heightuint32Height of the forgery region
probabilityfloatConfidence score indicating the probability of forgery in this region

오류 코드

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 전용입니다

Starter

$99$0.198 / 크레딧
500 크레딧
3개월 유효
  • 대부분의 이미지 형식 지원
  • 문서 수정 및 향상
  • 문서 위조 감지
  • 이미지 모아레 패턴 제거
  • 처리 속도 ~2초
가장 인기

Popular

$349$0.07 / 크레딧
5,000 크레딧
6개월 유효
  • 대부분의 이미지 형식 지원
  • 문서 수정 및 향상
  • 문서 위조 감지
  • 이미지 모아레 패턴 제거
  • 처리 속도 ~2초

Business

$749$0.05 / 크레딧
15,000 크레딧
1년 유효
  • 대부분의 이미지 형식 지원
  • 문서 수정 및 향상
  • 문서 위조 감지
  • 이미지 모아레 패턴 제거
  • 처리 속도 ~2초
독점

Enterprise

$1999$0.04 / 크레딧
50,000 크레딧
1년 유효
  • 대부분의 이미지 형식 지원
  • 문서 수정 및 향상
  • 문서 위조 감지
  • 이미지 모아레 패턴 제거
  • 처리 속도 ~2초

개발자가 우리 API를 신뢰하는 이유

프로덕션 워크로드를 위해 구축된 우리의 위조 감지 API는 품질, 성능 및 비용의 균형을 맞춰 실제 애플리케이션에서 신뢰할 수 있습니다.

프로덕션 준비 신뢰성

실제 트래픽에 최적화된 높은 가용성과 안정적인 성능.

위조 감지에 최적화

더 일관된 결과를 위해 조작 감지 기능이 있는 문서, 인증서 및 청구서에 중점을 둔 모델.

예측 가능한 API 전용 가격

장기 통합을 위한 명확한 크레딧당 비용이 있는 전용 API 플랜.

필요할 때 지원

문제를 진단하고 시간이 지남에 따라 통합을 개선하는 데 도움이 되는 이메일 지원.

이미지 위조 탐지 API – AI로 조작 탐지