Skip to content
Back

xAIGrok API

Custom moderation controls

AI summary

Written by AI from the official notes. Check them for exact details.

Grok now allows users to set custom content moderation guidelines for API requests.

  • Set content guidelines for text API requests
  • Control handling of nsfw, violence, and profanity
  • Add guidelines using a guidelines array in requests

Why it matters: Developers using Grok's API should implement these controls to ensure appropriate content handling.

Full release notes

You can now set content guidelines on text API requests. Add a guidelines array to a Chat Completions or Responses API request to set how Grok handles content in the nsfw, violence, and profanity categories. Grok follows the guidelines as it writes its response. See Custom Moderation Controls.