# OpenAI's CSAM image classifier: what a gateway must not log

URL: https://infro.io/blog/openai-s-csam-image-classifier-what-a-gateway-must-not-log
Author: INFRO Editorial (https://infro.io/blog/editorial)
Publisher: INFRO
Published: 2026-11-20
Last modified: 2026-11-20
Last reviewed: 2026-11-20 (next review due 2026-12-20)
Topic: Security and governance
Format: Brief

> Run the classifier in a restricted service before an upload reaches the gateway, and keep image bytes, image URLs and scores out of general logs and traces. Flagged items go to a separate store with named reviewers, and counsel decides what that store may hold.

Key takeaways:
- The classifier takes one image per standalone /v1/moderations request, needs an approved organization's key, and has no inline or Batch mode, so it sits beside the gateway, not inside a chat request.
- A flag is a signal for review, not a finding, and the classifier does not report to authorities for you.
- Keep image bytes, base64 data URLs, signed image URLs and raw scores out of request logs, traces and OpenTelemetry attributes.
- Flagged items belong in a separate, access-logged case store with named reviewers; what that store may hold is a question for counsel.
- Fail closed: an upload whose classifier call errored or was rate limited should wait, not pass.

## Where the check sits in the request path

The classifier is a model, `omni-moderation-csam-latest`, called through a standalone `POST /v1/moderations` request. It takes exactly one still image of up to 20 MB, as an HTTP(S) URL or a base64 data URL, and returns two signals: `likely-csam` and `likely-csam/gen-ai`. It does not classify text. It is available to approved organizations, and it does not support inline moderation or the Batch API.[1] The Responses and Chat Completions APIs likewise don't accept it for inline moderation.[2]

Two consequences follow. First, the call is not a flag you add to a chat request, so it does not belong in the middle of a vision call. Second, access is tied to an approved organization's key. Treat that key as a restricted credential used by one trust-and-safety service, not as another route target.

The path that holds up:

1. The upload lands in quarantine storage, tied to a user.
2. Hash matching for known material runs, if you have it. OpenAI's guidance recommends it alongside classifiers.[3]
3. The classifier service sends the image once and records the decision.
4. Only a cleared image is passed to the gateway for a vision, edit or generation call.
5. A flagged image never reaches the gateway or any second provider. It stays in the restricted store.

If the classifier call fails or is rate limited, hold the upload. A pass-through on error turns an outage into a hole. The trade-offs are the same as in [fail open or fail closed](https://infro.io/blog/gateway-down-should-ai-traffic-fail-open-or-fail-closed).

## What to keep out of logs and traces

A gateway log is the wrong place for anything that points at a flagged image. Keep these out of request logs, traces, OpenTelemetry span attributes, error trackers and reverse-proxy access logs:

- image bytes and base64 data URLs, including inside a failed request body that an error handler dumps;
- image URLs, especially signed ones, since a URL with its query string is a retrievable pointer;
- raw category scores in shared dashboards. OpenAI says scores are not calibrated probabilities and are comparable only within the same category and model snapshot, so they mislead outside a review tool.[1]
- user emails or usernames in clear text. OpenAI's guidance suggests a stable per-user identifier and hashing emails or usernames before sending them.[3]

On the INFRO side, content logging is off until an owner or admin turns it on, and a per-request `logging: false` disables capture even then. When capture is on, images carried by a request are stored as files beside the record under the same retention.[4] Captured bodies need separate payload access on the key.[5] So for any route that carries user images, decide the logging setting deliberately, and send `logging: false` from the code path that handles uploads.

What a general log may hold is a metadata record:

> **Example: Illustrative record**
> These field names and values are made up to show the shape, not a standard.
> 
> ```json
> {
>   "event": "image_screen",
>   "case_ref": "c_8f21",
>   "user_ref": "u_hash_3a9",
>   "model": "omni-moderation-csam-latest",
>   "flagged": false,
>   "decided_at": "2026-11-20T09:14:02Z"
> }
> ```

There is a tension to settle with counsel. OpenAI's guidance also says to keep usable records and identifiers when you report, so you can respond to law enforcement.[3] Both can hold if the retained material lives in a separate case store, not in the shared log pipeline.

## Who gets access to flagged items

Give the case store its own access list, not the engineering or observability roles. OpenAI's guidance calls for human review of high-severity signals with tools that limit unnecessary exposure and protect reviewer well-being, and for a response playbook that names who reviews, who escalates and who decides on enforcement.[3] In practice:

- a small named group, with every open, export and delete recorded in an audit trail;
- no bulk export, no copies into tickets, chat or analytics;
- engineers debug with the metadata record, never the image;
- support for the reviewers themselves.

The gateway helps at its own edge, not in your case store. INFRO's [request traces](https://infro.io/docs/observability/traces) record metadata, project-scoped access limits who reads which requests, and the audit log records member and policy changes. INFRO's guardrails are pattern checks on chat prompts and responses, and are not an image classifier, so they do not replace this step.

## What to ask counsel

OpenAI states that its recommendations are not legal advice or a universal standard of care.[3] Take these to counsel before launch:

- Does holding a flagged image for review, even briefly or in encrypted form, create exposure in each jurisdiction we operate in? Who may handle it?
- What must we report, to whom and by when, and what do we include in a report?
- May we retain a hash, a score or a user identifier of a flagged image, and for how long?
- What do our contracts with the gateway vendor and providers say about material that reaches them, and what do we tell users?
- What happens to a flagged user's other data, and how do we answer a law-enforcement request?

A flag is a prioritization signal. The classifier states that a category flag doesn't establish that an image is CSAM.[1] Decisions about accounts and reports sit with your people and your counsel.

## Questions

### Can I send suspected CSAM to omni-moderation-latest instead?

No. OpenAI says never to submit known CSAM and not to send suspected CSAM to omni-moderation-latest; approved organizations use the separate CSAM Image Classifier for images.[2]

### Does a flag mean we must report?

The classifier does not report to authorities and a flag does not establish that an image is CSAM. Your own review, escalation and reporting process applies, and reporting duties vary by jurisdiction, so that is a question for counsel.[1]

## Sources

1. CSAM classifier — OpenAI. https://developers.openai.com/api/docs/guides/csam-classifier.md (accessed 2026-11-20)
2. Moderation — OpenAI. https://developers.openai.com/api/docs/guides/moderation.md (accessed 2026-11-20)
3. CSAM guidance — OpenAI. https://developers.openai.com/api/docs/guides/csam-guidance.md (accessed 2026-11-20)
4. Privacy & data — INFRO. https://infro.io/docs/privacy (accessed 2026-11-20)
5. Request traces — INFRO. https://infro.io/docs/observability/traces (accessed 2026-11-20)
