# safety\\\_identifier request field

By Steven Van · 2026-09-01

Developers can tag each API request with a hashed end-user ID so policy violations are traced to one user, not the whole API key.

The [Grok](<https://creatorstoolbox.com/tools/grok>) API now accepts a safety\_identifier field, an opaque string that an application assigns to the end user behind each request. When a request breaks the usage policies, SpaceXAI can attribute the violation to that identifier instead of to the whole API key, and it will reference the identifier when it contacts the developer.

The field works on Chat Completions, the Responses API (including streaming and WebSocket mode), deferred chat completions, the Batch API and the gRPC GetCompletionsRequest. The [Security FAQ](<https://docs.x.ai/developers/faq/security#how-do-i-identify-which-of-my-end-users-caused-a-policy-violation>) says it is the same field as OpenAI's safety\_identifier. The older user field is still accepted for compatibility, but safety\_identifier is the documented field going forward.

The identifier should be stable and assigned by the application, never chosen by the end user. The docs recommend sending a hash of an internal user ID or another opaque value, not an email address, phone number or display name. SpaceXAI does not validate the format. Gateways and platforms that route many end users through one API key should set it per user, so an abuse report can be scoped to that user rather than to the key.

![Grok](<https://www.google.com/s2/favicons?domain=grok.com&sz=128>)

Grok

AI assistant by xAI — chat, reason, generate images, and analyze data with real-time information access.

[View Grok →](<https://creatorstoolbox.com/tools/grok>)

[Original source](<https://docs.x.ai/developers/faq/security#how-do-i-identify-which-of-my-end-users-caused-a-policy-violation>)

[Read safety\\\_identifier request field on Creators Toolbox](<https://creatorstoolbox.com/blog/grok-safety-identifier-request-field>)

---
Canonical source: https://creatorstoolbox.com/blog/grok-safety-identifier-request-field
