SpaceXAIapi
October 28, 2026·Source

Custom Moderation Guidelines in the Grok API

Developers can now tell the Grok API to steer clear of sexual content, graphic violence, or profanity on a per-request basis, for anyone building on the API.

  • You add a guidelines list to a request naming one or more categories (sexual content, violence, profanity), and Grok writes around them in its own words instead of returning a blocked message
  • Declining is the only setting today. Grok still answers educational or clinical questions and covers news and history without graphic detail
  • Guidelines apply only to the request they're attached to, so a multi-turn chat needs them on every message
  • Available to all API customers on the Chat Completions and Responses APIs. Not supported on multi-agent models

Best for

Putting Grok behind a customer-facing app or brand tool where the output has to stay clean.

When to use it

You want to build on Grok but its default tone is looser than your brand or audience allows.

Who benefits

Developers and product teams building chatbots, content tools, or support assistants on Grok.

Join the newsletter to get ahead with AI.

I share strategies, new modules, free guides, and tools to get you better at using AI in your work.

Leading a team? See team programs →