On Oct 28 xAI announced on the official @grok account that all API customers can now add a guidelines array to text requests and set the nsfw, violence and profanity categories to decline, so Grok tightens that content while it writes rather than through after-the-fact filtering. The field works on the Responses API, Chat Completions and the xAI Python SDK; multi-agent models and deferred completions are not supported, and invalid values are rejected with 400 or 422 before the model runs.
Key Takeaways
- ✓Three categories: nsfw, violence and profanity; the only behavior today is decline, and unlisted categories keep the default (docs)
- ✓Works on the Responses API, Chat Completions and chat.create in the xAI Python SDK; with the OpenAI Python SDK pass it via extra_body
- ✓Applies only to the request that carries it, so send it on every turn; the xAI SDK chat object stores it for you
- ✓Not supported on multi-agent models such as grok-4.20-multi-agent or deferred completions; duplicate categories return 400 and unknown values return 422
- ✓The official post had about 592K views and 271 likes when this was written

Key Decision Metrics at a Glance
Turn your technical choice into a development budget
Compare 40 dev plans & simulate token costs vs $20/mo subscriptions
Project Links & Resources
Direct AccessIn-Depth Technical Analysis
Background and pain point
Teams shipping LLMs in consumer products often need different content standards for different surfaces: education, support and workplace tools want stricter output, while creative apps do not want blanket filtering. The usual fix is an extra moderation model or keyword filter in front of the LLM, which adds latency and over-blocks. On Oct 28 xAI announced on the official @grok account that the Grok API now lets every customer declare, per request, which content categories to tighten.
How it works
A request carries a guidelines array; each entry has type (always policy), a category and a behavior. Categories are nsfw, violence and profanity, and the only behavior today is decline. Grok follows the guidelines while it writes, rewriting its answer in its own words rather than blocking output afterward, and the response shape is unchanged. Unlisted categories keep the default behavior. The API validates guidelines before running the model and returns an error instead of partial output.
Benchmarks and results
xAI has not published block rates, false-positive rates or latency figures, and the docs say the details of each behavior may be refined over time. What is documented: duplicate categories return 400, unknown categories or behaviors return 422, and multi-agent models and deferred completions are rejected.
For developers
With the OpenAI Python SDK, pass guidelines in extra_body and point base_url at api.x.ai/v1; on Chat Completions it is a top-level field next to messages. It applies only to the request that carries it, so multi-turn apps must send it every turn; chat.create in the xAI Python SDK stores it. Requests with no server-side tools or files cannot combine it with stop or n greater than 1. Apps for minors or enterprises should compare outputs with and without it before dropping an external moderation layer.
Benchmark side-by-side against alternatives, or calculate monthly token cost vs subscription break-even.
Discussion & Comments
0Sign in to join the discussion
Connect with AI developers to exchange benchmark insights.