画像偽造検出
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"とゼロ以外のコードを返します。以下のエラーコードテーブルを使用してこのコードをマッピングできます。

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で改ざんを検出