Anthropic (Claude)
Anthropic builds the Claude model family and provides access via an API. In Fased you can authenticate with Sign in (Claude Code OAuth), an Anthropic token (setup-token), or an Anthropic API key. Anthropic is a current Fased model provider. The code route isanthropic; if
it does not appear in Agent > Models, add Anthropic auth first or check
provider health from the Models page.
Where to set it up
Use the same Anthropic methods in every setup surface:| Surface | What to do |
|---|---|
| Control UI | Open Agents, select an Agent, then use Agent > Models. Choose Anthropic, then Sign in, Token, or API key, and assign the Agent’s model roles there. Chat can override the model for the current session. |
| Onboarding | Choose Set up model providers only if you want provider setup during onboarding, then choose Anthropic and pick Anthropic OAuth (Claude Code), Anthropic token (paste setup-token), or Anthropic API key. |
| CLI | Use fased models auth login --provider anthropic --method anthropic-oauth, fased models auth setup-token --provider anthropic, fased models auth paste-token --provider anthropic, or fased onboard --anthropic-api-key "$ANTHROPIC_API_KEY". |
Option A: Sign in (Claude Code OAuth)
Best for: using Claude sign-in from the Claude Code auth flow.OAuth control UI setup
- Open Agents and select the Agent.
- Open Agent > Models.
- Open Anthropic.
- Choose Sign in.
- Open or copy the sign-in URL shown in the modal.
- Finish Anthropic login in the browser.
- Paste the Anthropic authorization code if the modal asks for it.
- Return to Agent > Models after the modal reports success, then choose a model role for the Agent or use Chat to override a single session.
OAuth onboarding setup
OAuth CLI setup
Option B: Anthropic token (setup-token)
Best for: using a Claude setup-token generated by the Claude Code CLI. Setup-tokens are created by the Claude Code CLI, not the Anthropic Console. You can generate one on any machine:Token control UI setup
- Open Agents and select the Agent.
- Open Agent > Models.
- Open Anthropic.
- Choose Token.
- Paste the setup-token generated by
claude setup-token. - Return to Agent > Models after the modal reports success, then choose a model role for the Agent or use Chat to override a single session.
Token onboarding setup
Token CLI setup
Option C: Anthropic API key
Best for: standard API access and usage-based billing. Create your API key in the Anthropic Console.API key control UI setup
- Open Agents and select the Agent.
- Open Agent > Models.
- Open Anthropic.
- Use API key and paste an Anthropic Console API key.
- Choose the Agent’s Anthropic model roles.
API key onboarding setup
API key CLI setup
Config snippet
Prompt caching (Anthropic API)
Fased supports Anthropic’s prompt caching feature. This is API-only; subscription auth does not honor cache settings.Configuration
Use thecacheRetention parameter in your model config:
| Value | Cache Duration | Description |
|---|---|---|
none | No caching | Disable prompt caching |
short | 5 minutes | Default for API Key auth |
long | 1 hour | Extended cache (requires beta flag) |
Defaults
When using Anthropic API Key authentication, Fased automatically appliescacheRetention: "short" (5-minute cache) for all Anthropic models. You can override this by explicitly setting cacheRetention in your config.
Per-agent cacheRetention overrides
Use model-level params as your baseline, then override specific agents viaagents.list[].params.
agents.defaults.models["provider/model"].paramsagents.list[].params(matchingid, overrides by key)
Legacy parameter
The oldercacheControlTtl parameter is still supported for backwards compatibility:
"5m"maps toshort"1h"maps tolong
cacheRetention parameter.
Fased includes the extended-cache-ttl-2025-04-11 beta flag for Anthropic API
requests; keep it if you override provider headers (see /gateway/configuration).
1M context window (Anthropic beta)
Anthropic’s 1M context window is beta-gated. In Fased, enable it per model withparams.context1m: true for supported Opus/Sonnet models.
anthropic-beta: context-1m-2025-08-07 on Anthropic
requests.
Note: Anthropic currently rejects context-1m-* beta requests when using
OAuth/subscription tokens (sk-ant-oat-*). Fased automatically skips the
context1m beta header for OAuth auth and keeps the required OAuth betas.
Notes
- Generate setup-tokens with
claude setup-tokenand paste them in Agent > Models, onboarding, orfased models auth paste-token --provider anthropic. - If you see “OAuth token refresh failed …” on a Claude subscription, re-auth with a setup-token. See /gateway/troubleshooting#oauth-token-refresh-failed-anthropic-claude-subscription.
- Auth details + reuse rules are in /concepts/oauth.
Troubleshooting
401 errors / token suddenly invalid- Claude subscription auth can expire or be revoked. Re-run
claude setup-tokenand paste it into the gateway host. - If the Claude CLI login lives on a different machine, use
fased models auth paste-token --provider anthropicon the gateway host.
- Auth is per agent. New agents don’t inherit the main agent’s keys.
- Re-run onboarding for that agent, or paste a setup-token / API key on the
gateway host, then verify with
fased models status.
anthropic:default
- Run
fased models statusto see which auth profile is active. - Re-run onboarding, or paste a setup-token / API key for that profile.
- Check
fased models status --jsonforauth.unusableProfiles. - Add another Anthropic profile or wait for cooldown.