Skip to main content

Real-time reply moderation guide now uses Grok

By Steven Van ·

The updated X API guide replaces the deprecated Perspective API with Grok, and includes Python and Node.js webhook examples for hiding abusive replies.

The X guide to moderating replies in real time has been rewritten around Grok. It receives replies through the X Activity API post.reply.create event and classifies each one with Grok through the xAI API, using structured outputs. High-confidence violations are then hidden with the Hide Replies endpoint.

The previous version relied on the deprecated Perspective API and the Account Activity API.

The guide includes complete Python and Node.js webhook examples, guidance on writing the moderation policy, and recommendations for keeping users in control of what is hidden.

X
X
The real-time everything app — posts, news, and conversation, plus the X API and a hosted MCP server for connecting AI agents to real-time data.
View X →

Original source

Read Real-time reply moderation guide now uses Grok on Creators Toolbox