Loading
Loading
Pass user — a stable identifier of your end user. Then a policy violation blocks only that user, not your whole account.
Without an identifier, all of a key’s requests look like one person to the provider. If someone sends prohibited content, the provider may block our entire account rather than the offender. With an identifier, both the provider and we see the specific user and restrict only them.
Add a user or safety_identifier field to the body of any request (if both are present, safety_identifier wins). The value is any stable string up to 256 characters: your internal user id or a hash of their email. Don’t send emails, phone numbers or other personal data as is.
resp = client.chat.completions.create( model="mistralai/mistral-nemo", messages=[{"role": "user", "content": "Hello!"}], user="customer-4821",)
The raw value is never sent to the provider. We compute an HMAC-SHA256 of it scoped to your account (64 hex characters) and put the result in the field the provider accepts. Your user and safety_identifier are always stripped from the body.
| Provider | Field |
|---|---|
| OpenAI | safety_identifier (user for embeddings) |
| Anthropic | metadata.user_id (chat only) |
| OpenRouter, DeepSeek, xAI | user |
| Google, fal, Replicate | No such field — only our own moderation applies |
All of a key’s requests count as one end user. Violations by one of your customers will block the whole key — the end_user_suspended error message says so. A block issued by a provider for a key applies to all keys of the account at that provider.
content_policy_violation). For images, any flagged category is refused.moderation_unavailable.| Who | When | What the client sees |
|---|---|---|
| An end user | By default, 10 flagged requests within 24 hours. Blocked for 7 days or until lifted manually; then the count starts over | 403 end_user_suspended, with the period in the message |
| An end user at a provider | The provider blocked the identifier itself (OpenAI replies identifier blocked). We remember this and stop sending such requests to that provider; the request may go to another provider | 403 end_user_blocked if there are no other providers |
| An account | Suspended only manually; with a high share of flagged requests it’s just marked for review | 403 account_under_review |
When one user is blocked, the account’s other users keep working as usual. If you think a block is a mistake, contact .