Claude Platform Docs

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

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 the bedrock-mantle client, which you create with AnthropicBedrockMantle. 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 call InvokeModel through AnthropicBedrock, 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-sdk or Anthropic.Bedrock.

    On the API version that the latest SDK sends, InvokeModel requests can fail with a 400 for 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_id to the body of requests for models that accept it, using extra_body. Leave the rest of the body as it is, because the SDK builds the URL from the body’s model and, 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 with user_profile_id.

  • InvokeModel called directly: Put the model ID in the request’s URL (modelId in an AWS SDK) rather than the body. The body also needs an anthropic_version field, 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

If you use Claude Models on Google Cloud (Anthropic managed)

If you use Claude Models on Google Cloud (Google managed)

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_profiles endpoints 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-id header once the link exists. Until then, every request that carries a user profile ID returns a 400.

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?