SexismAi is a Reddit-first Devvit moderation app for communities that want help identifying sexist, hateful, harassing, or toxic posts and comments.
The app is deployed through Reddit Devvit. It does not need Vercel, Render, Discord, Python, mock data, or a separate backend server.
- Devvit app slug:
sexismai - Playtest subreddit:
r/sexismai_dev - App dashboard: https://developers.reddit.com/apps/sexismai
- Source entry:
src/index.ts - Devvit config:
devvit.json - Runtime: native Devvit menu/form handlers, no Node endpoint bridge
- Adds Reddit moderator menu actions for scanning posts and comments.
- Sends real Reddit post/comment text to Gemini for structured moderation scoring.
- Scores sexism and general toxicity separately from
0to1. - Opens a moderation review form with suggested action, reason, and target ID.
- Stores recent scan records in Devvit Redis.
- Reuses a recent scan for the same Reddit item for 10 minutes to avoid repeated provider calls.
- Starts in monitor-only mode unless subreddit settings are changed.
Open the subreddit where the app is installed and find a post or comment that needs review.
Use the post/comment moderation menu item:
Scan with SexismAi
SexismAi will fetch the live Reddit content, call Gemini, then open a review form. The form shows the classification result, scores, reason, and recommended action.
Available review actions:
Remove: removes the post or comment.Lock: locks the post or comment.Approve: approves the post or comment.No action: records the scan but leaves the content unchanged.
If Reddit does not show the post/comment app action in the menu you opened, use the subreddit overflow menu and run:
Scan newest post with SexismAi
That action scans the newest live post in the current subreddit.
Automatic submit triggers are currently disabled. Moderation is manual: a moderator chooses when to scan and what action to apply.
SexismAi currently uses Gemini with structured JSON output for live moderation classification. A fine-tuned classifier model ID is not required.
Do not put the Gemini key in .env. Store it in Devvit settings:
npm run settings:gemini-keyPaste the Gemini API key when Devvit prompts for it. Real moderation will not run until this key is configured.
The default Gemini model is gemini-3.1-flash-lite. You can change the geminiModel installation setting in Reddit if your Google AI Studio account should route to a different supported model.
If scans fail with a Gemini quota error, the app reached Google successfully but the API key's Google AI Studio project does not have available quota for the selected model. Use a different Google AI Studio project/key with quota, change the geminiModel setting to a model your key can use, or enable billing/quota in Google.
If scans fail with a Devvit "too many requests" message, wait briefly and try again. SexismAi sets a short cooldown after Devvit rate-limits outbound HTTP fetches.
The app requests this Devvit HTTP fetch domain:
generativelanguage.googleapis.com- Used to call the Gemini API for real moderation classification of Reddit posts and comments.
npm installnpm run check
npm run buildHusky runs on commit and calls:
npx lint-staged
npm run checkLog in once:
npx devvit login --copy-pasteUpload the app to Reddit's Devvit App Directory:
npm run uploadUploaded apps are private to the app owner until published through Reddit's review flow.
Run a real Reddit playtest against the default test subreddit:
npm run playtest sexismai_devOpen the subreddit:
https://www.reddit.com/r/sexismai_dev
Create real posts or comments there, then follow the moderator usage flow above.
To install the latest uploaded build into the playtest subreddit:
npx devvit install sexismai_dev sexismai@latestThe app exposes subreddit settings in Reddit:
actionMode: monitor only or remove flagged content.geminiModel: Gemini model name, defaultgemini-3.1-flash-lite.sexismThreshold: default0.72.toxicityThreshold: default0.85.notifyAuthor: whether to reply with the removal message.removalMessage: message used when auto-removing content.
Keep actionMode on monitor-only while testing Gemini results. Enable automatic removal only after reviewing real subreddit behavior.
A successful scan opens the SexismAi review form. The form text includes:
- Overall verdict:
FLAGGEDorCLEAR. - Combined score.
- Sexism score.
- Toxicity score.
- Gemini's explanation.
When content crosses the configured threshold, the default recommended action is Remove. When content stays below threshold, the default recommended action is No action.
Gemini API key is required: runnpm run settings:gemini-key.Gemini quota blocked this real scan: the Google AI Studio key/project has no available quota for the selected model.Devvit is temporarily rate-limiting Gemini HTTP fetches: wait about a minute and scan once.- No menu item appears: confirm the app is installed in the subreddit and you are viewing Reddit as a moderator.