user parameter. Supplying a stable per-end-user identifier helps isolate abuse blocks and improves your application’s reporting.
What is User Tracking?
User tracking enables you to specify an arbitrary string identifier for your end-users in API requests. This optional metadata helps OpenRouter understand your sub-users.How It Works
Include auser parameter in chat-completions requests with a stable identifier for your end-user. This can be a user ID, client-side hash, pseudonym, or another stable identifier. OpenRouter folds it into the hashed identity sent upstream and never forwards it raw.
Implementation Example
Per-User Abuse Isolation
Send a stable per-end-user identifier with every request:user on chat completions, or safety_identifier on the Responses API. A client-side hash or pseudonym works — when a provider requires a user identity, OpenRouter folds it into the hashed identity sent upstream and never forwards the raw value. Requests that include neither field share a single account-level identity upstream, so a provider policy block triggered by one end-user can affect your whole account.
Best Practices
Choose Stable Identifiers
Use consistent, stable identifiers for the same user across requests:- Good:
user_12345,customer_abc123,account_xyz789 - Avoid: Random strings that change between requests
Consider Privacy
When using user identifiers, consider privacy implications:- Use internal user IDs rather than exposing personal information
- Avoid including personally identifiable information in user identifiers
- Consider using anonymized identifiers for better privacy protection