Skip to content
BENIBIX Learn

ANTHROPIC_FOUNDRY_RESOURCE

AI⌨️ Claude CodeConfiguration

Also known as ANTHROPIC_FOUNDRY_RESOURCE environment variable, ANTHROPIC_FOUNDRY_BASE_URL

It names the Foundry resource Claude Code uses.

Think of it like

It is like the name of your branch, not the full street address.

Example

Emma copies her Foundry address into this variable, and Claude Code refuses it. She puts in just the resource name, and it connects.

Why it matters

It is the one thing Claude Code needs to find your Claude models on Foundry.

Definition

ANTHROPIC_FOUNDRY_RESOURCE names your Foundry resource, such as my-resource. Claude Code sends its requests there. Give the name only. Claude Code will not take a web address here. If you set ANTHROPIC_FOUNDRY_BASE_URL to the full address, you can skip this one.

Example code

bash
export CLAUDE_CODE_USE_FOUNDRY=1
export ANTHROPIC_FOUNDRY_RESOURCE=my-resource
claude
Point Claude Code at your Foundry resource.

Common mistake

Pasting the full web address. Use the base URL variable for that, or give just the name here.

Key takeaways

  1. 1
    Name only. Not a URL.
  2. 2
    Or the base URL. One of the two.
  3. 3
    Needs USE_FOUNDRY. To matter.