Visual Moderation

Visual Moderation API is for identifying visual risks or business labels.

Visual Moderation APIs — Choosing the Right Endpoint

The Visual Moderation service exposes four image-moderation endpoints. They all run the same detection pipeline (political sensitivity, pornography, advertising, terrorism, faces, logos, etc.); they differ only in how images are submitted and how results are delivered.

Quick comparison

APIImages per requestResult deliveryMax image sizeRecommended timeoutBest for
Sync API (Single)1Returned directly in the response10 MB10 sReal-time gating — block-on-decision flows where you must wait for a verdict (chat send, post publish, avatar upload).
Sync API (Bulk)Up to 12 per requestReturned directly in the response, one result per image10 MB / image20 sOne user submitting several images at once (e.g. multi-image post or gallery upload) and the caller can afford to block briefly.
Async API (Single)1Acknowledged immediately; final result pushed to your callback URL30 MB5 s (ack only)Larger images, looser SLAs, or pipelines that already process callbacks (UGC moderation queues, batch ingest).
Async API (Bulk)Up to 12 per requestAcknowledged immediately with requestIds; final results pushed per-image to your callback URL30 MB / image5 s (ack only)High-throughput batch ingestion in one request.

Choosing between Sync and Async

  • Sync gives you the verdict in the same request, at the cost of a longer client-side timeout and a smaller image-size budget. Pick it when the user is waiting on the decision.
  • Async acknowledges fast and pushes the verdict to your callback URL. Pick it when you can decouple submission from disposition, or when images exceed the 10 MB sync limit.

Choosing between Single and Bulk

  • Single is the simplest contract — one image, one set of user metadata, one result.
  • Bulk lets you amortize HTTP overhead across many images.

Notes

  • The sync endpoints accept a callback URL — supplying one converts the same call into async behavior, so the "Async Single" workflow is really the sync single endpoint invoked with a callback. The dedicated /images/v4 (bulk) endpoint, however, is async-only.
  • type (POLITY, EROTIC, VIOLENT, QRCODE, ADVERT, IMGTEXTRISK, BOCR) and businessType (custom labels) work identically across all four endpoints — at least one must be supplied per request.