# ANTHROPIC_BETAS

> It turns on API betas for each request.

**Field:** Artificial Intelligence  
**Category:** Claude Code  
**Also known as:** ANTHROPIC_BETAS environment variable, anthropic-beta header

## Think of it like

It is like you ask to try a new ride early.

## Definition

ANTHROPIC_BETAS adds more beta header values to each API request. Put commas between them. It lets you try an API beta before Claude Code supports it. Claude Code already sends the betas it needs. Unlike the --betas flag, it works with any sign-in, a plan too.

## Example

Lucy wants to try a new API beta on her Max plan. The --betas flag needs an API key, so she sets ANTHROPIC_BETAS instead.

## Example code

```bash
export ANTHROPIC_BETAS="new-feature-2026-01-01"
claude
```

Try a new API beta in every session.

## Why it matters

You can try a new API feature the day it ships, without waiting for an update.

## Common mistake

Using --betas on a Claude plan. That flag only works with an API key. Use this variable.

## Three principles

- **Comma list.** anthropic-beta values.
- **Every request.** Every session.
- **Any sign-in.** Unlike --betas.

## Related terms

- [--betas Flag](https://learn.benibix.com/term/ai/betas-flag)
- [HTTP Header](https://learn.benibix.com/term/infrastructure/http-header)
- [ANTHROPIC_CUSTOM_HEADERS](https://learn.benibix.com/term/ai/anthropic-custom-headers-variable)

## Told apart from

- [--betas vs ANTHROPIC_BETAS](https://learn.benibix.com/compare/betas-flag-vs-anthropic-betas-variable): People think the --betas flag and the ANTHROPIC_BETAS variable are one switch in two places. Both add anthropic-beta headers, but they reach different runs. The flag lasts for one run, and it only works when you sign in with an API key. The variable lasts for each session that sees it, and it works with any sign-in, a plan too. On a plan, only the variable works.

---

Source: https://learn.benibix.com/term/ai/anthropic-betas-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-16
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
