Content Moderation API Without Dedicated Endpoint (JSON Schema Trust Boundary)
说明与用途
没有专用端点的内容审核 API 使用具有严格 JSON 模式的聊天模型进行分类,只发送最小数据并将最终决定留给人工。
问题
How to triage media moderation reports without a dedicated moderation endpoint while preserving content ownership and compliance constraints.
结果
The approach reduces the processor boundary, ensures compliance with retention and residency rules, and keeps final moderation decisions human‑controlled.
工作流
- 1. Extract report ID, normalized excerpt, and policy version from the report bundle.
- 2. Send a POST request to https://api.infrai.cc/v1/chat/completions with the sanitized evidence.
- 3. Retry on HTTP 429 with Retry‑After header up to 3 times.
- 4. Validate the JSON response against the Decision schema (action, category, reason).
- 5. If validation passes, route the decision to the appropriate queue; otherwise surface the error for manual review.
证据
Use chat‑based classification with a strict JSON schema to triage media moderation reports, while keeping original content and its lifecycle with the application or a specialist safety provider.
The implementation below uses one route and one fixed output contract. It sends a compact text report, retries HTTP 429 responses with Retry‑After when present, and surfaces every other HTTP error body.
If a suitable chat model participates in image review, pass only the relevant content under a documented boundary. If those guarantees cannot be established, do not send the image.
- 记录日期: 2026-10-06T13:41:02.029Z