Use user profiles on a cloud platform
Where to create user profiles, what to link first, and how to send a user profile ID on each cloud platform that offers Claude.
If you use Claude through a cloud platform, setting up user profiles depends on that platform. The platform determines which organization holds your user profiles, what you link to that organization first, and where each request carries a user profile’s ID. For what user profiles do and whether you need them, see How user profiles work. For who gets a user profile and how to create one, see Create user profiles and attribute requests.
Which organization holds your user profiles
On Amazon Bedrock, Claude Models on Google Cloud (Google managed), and Microsoft Foundry, you create user profiles in an Anthropic organization on another platform. This is usually the Claude API. That organization’s credentials are only for managing user profiles, and your requests to Claude still use your cloud platform’s credentials. Each platform’s section says which organizations work.
On Claude Models on Google Cloud (Google managed) and Amazon Bedrock, either access type works.
If you use Amazon Bedrock
- Where you create user profiles: In an organization on the Claude API. An organization on Claude Platform on AWS works too, but its user profiles don’t report restrictions or bans.
- What you link first: Each AWS account that sends requests with user profile IDs to Amazon Bedrock. Link each one to the organization that creates your user profiles. For the steps, see Link an AWS account or Google Cloud project. You don’t need to link an account you use only for your own usage.
- Where the ID goes: In the
user_profile_idfield at the top level of the request body, not in theanthropic-user-profile-idheader. Send it only on the requests that can carry a user profile ID. See How each platform checks the ID.
Requests that can carry a user profile ID
User profiles work on Claude in Amazon Bedrock (bedrock-mantle) and with InvokeModel on Claude on Amazon Bedrock (bedrock-runtime), including streaming with InvokeModelWithResponseStream. Send a user profile ID only on requests for these models, though not every one of them is on both endpoints:
- Claude 4.7 and later models
- Claude Sonnet 4.6
- Claude Haiku 4.5
Leave the ID out of requests for any other model, because a request that carries it can fail with a 400. Leave it out of Amazon Bedrock batch inference jobs as well.
Requests without the ID aren’t attributed to an end customer.
User profiles are not available with the Converse API. Use InvokeModel or the bedrock-mantle endpoint instead.
Send the ID in the request body
Here’s where the ID goes in a bedrock-mantle body. For a bedrock-runtime body, see the last two items in the following list.
{
"model": "anthropic.claude-opus-5-5",
"max_tokens": 1024,
"user_profile_id": "uprof_011CZkZCu8hGbp5mYRQgUmz9",
"messages": [{ "role": "user", "content": "Hello, Claude" }]
}How the ID gets into the body depends on how you call Amazon Bedrock:
-
The standard SDK client: Don’t send a user profile ID to Amazon Bedrock through the client you use for the Claude API. That client puts the ID in the header, whatever base URL you give it.
-
The SDK client for
bedrock-mantle: Use the latest version of thebedrock-mantleclient, which you create withAnthropicBedrockMantle. Pass the ID in the SDK’s user profile argument, and the client puts it in the body. -
The SDK client for
bedrock-runtime: If you callInvokeModelthroughAnthropicBedrock, the latest version of the SDK puts the user profile argument in the request body for you. An earlier version doesn’t, so unless you add the ID yourself, the request isn’t attributed. In TypeScript and C#, the version that counts is the Bedrock package’s,@anthropic-ai/bedrock-sdkorAnthropic.Bedrock.On the API version that the latest SDK sends,
InvokeModelrequests can fail with a400for some models. These are the models numbered 4.6 or lower in the model table of Claude on Amazon Bedrock (bedrock-runtime). For these models, stay on the previous major version of the SDK. To install it, use the commands in Install an SDK for accessing Bedrock.With an earlier version, add
user_profile_idto the body of requests for models that accept it, usingextra_body. Leave the rest of the body as it is, because the SDK builds the URL from the body’smodeland, if you stream,stream: true. In the TypeScript and C# SDKs, that option replaces the whole body, so include every field of the request along withuser_profile_id. -
InvokeModelcalled directly: Put the model ID in the request’s URL (modelIdin an AWS SDK) rather than the body. The body also needs ananthropic_versionfield, such as"anthropic_version": "bedrock-2023-05-31".
If you start from an example in Making requests, change its model to one that accepts a user profile ID.
If you use Claude Platform on AWS
- Where you create user profiles: In your organization on Claude Platform on AWS, using that platform’s base URL and authentication. The calling principal needs the user profile IAM actions.
- What you link first: Nothing, if you create the user profiles in this organization. If another organization created them, see If a request returns a
400. - Where the ID goes: In the
anthropic-user-profile-idheader, which the SDK’s user profile argument sets. - Restrictions and bans: Not reported. For what the enforcement fields show instead, see Manage user profiles on Claude Platform on AWS.
If you use Claude Models on Google Cloud (Anthropic managed)
- Where you create user profiles: In your organization on Claude Models on Google Cloud (Anthropic managed), where you can create, retrieve, list, and update them. Authenticate with Google Cloud credentials, not an API key, and use the latest version of the SDK client for Claude Models on Google Cloud (Anthropic managed) or the organization-level base URL.
- What you link first: Nothing, if you create the user profiles in this organization. If another organization created them, see If a request returns a
400. - Where the ID goes: In the
anthropic-user-profile-idheader, which the SDK’s user profile argument sets.
If you use Claude Models on Google Cloud (Google managed)
- Where you create user profiles: In an organization on the Claude API. An organization on Claude Platform on AWS works too, but its user profiles don’t report restrictions or bans.
- What you link first: Each Google Cloud project that sends requests with user profile IDs to Claude Models on Google Cloud (Google managed). Link each one to the organization that creates your user profiles. For the steps, see Link an AWS account or Google Cloud project. You don’t need to link a project you use only for your own usage.
- Where the ID goes: In the
anthropic-user-profile-idheader, not in the request body. See How each platform checks the ID.
With an SDK, use the latest version of the SDK client for Claude Models on Google Cloud (Google managed), which you create with AnthropicVertex. Pass the ID in its user profile argument, and the client sends the header.
If you use Microsoft Foundry
The following details are for deployments of Claude in Microsoft Foundry hosted on Anthropic.
- Where you create user profiles: In an organization on the Claude API. The
/v1/user_profilesendpoints are not available on Microsoft Foundry. - What you link first: The organization that holds your Foundry resource. Anthropic links it to the organization that creates your user profiles. To request the link, contact your account team.
- Where the ID goes: In the
anthropic-user-profile-idheader once the link exists. Until then, every request that carries a user profile ID returns a400.
Rules and special cases
How each platform checks the ID
Some platforms check the ID on every request. For which ones, and what they return, see If a request returns a 400.
Claude Models on Google Cloud (Google managed) rejects a malformed ID with a 400. So does Amazon Bedrock on the requests that can carry a user profile ID. Both accept any well-formed ID. On these two platforms, a successful response doesn’t confirm that the ID matches one of your user profiles.
Was this page helpful?