moderation
backend.api.moderation
Section titled “backend.api.moderation”content moderation api endpoints.
Functions
Section titled “Functions”create_report source
Section titled “create_report source”create_report(request: Request, body: CreateReportRequest, session: Session = Depends(require_auth)) -> CreateReportResponsesubmit a content report.
requires authentication. rate limited to 10 reports per hour per user. the report is forwarded to the moderation service for storage and admin review.
get_sensitive_images source
Section titled “get_sensitive_images source”get_sensitive_images(request: Request, response: Response) -> SensitiveImagesResponseget all flagged sensitive images.
proxies to the moderation service which is the source of truth for sensitive image data.
returns both image_ids (for R2-stored images) and full URLs (for external images like avatars). clients should check both.
cached at edge (5 min) and browser (1 min) to reduce load from SSR page loads hitting this endpoint on every request.
Classes
Section titled “Classes”SensitiveImagesResponse source
Section titled “SensitiveImagesResponse source”list of sensitive image identifiers.
ReportReason source
Section titled “ReportReason source”valid reasons for content reports.
CreateReportRequest source
Section titled “CreateReportRequest source”request to create a content report.
CreateReportResponse source
Section titled “CreateReportResponse source”response after creating a report.