# ANTHROPIC_FOUNDRY_RESOURCE

> It names the Foundry resource Claude Code uses.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** ANTHROPIC_FOUNDRY_RESOURCE environment variable, ANTHROPIC_FOUNDRY_BASE_URL

## Think of it like

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

## 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

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

## Example code

```bash
export CLAUDE_CODE_USE_FOUNDRY=1
export ANTHROPIC_FOUNDRY_RESOURCE=my-resource
claude
```

Point Claude Code at your Foundry resource.

## Why it matters

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

## Common mistake

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

## Three principles

- **Name only.** Not a URL.
- **Or the base URL.** One of the two.
- **Needs USE_FOUNDRY.** To matter.

## Related terms

- [ANTHROPIC_FOUNDRY_API_KEY](https://learn.benibix.com/term/ai/anthropic-foundry-api-key-variable)
- [CLAUDE_CODE_USE_BEDROCK](https://learn.benibix.com/term/ai/claude-code-use-provider-variables)
- [Microsoft Foundry](https://learn.benibix.com/term/ai/microsoft-foundry)

---

Source: https://learn.benibix.com/term/ai/anthropic-foundry-resource-variable
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
