---
title: "AI provider settings"
summary: "Chat is disabled unless a provider is selected; its API key is then required."
description: "The provider, key, model and base URL backing the built-in agent."
status: preview
generated: true
read_when:
  - "The built-in agent is disabled and you want it on."
  - "You are pointing Fanout at a self-hosted or proxied model endpoint."
---

Every setting below is read once at startup and requires a restart to change.
Built-in defaults are overridden by nonempty environment values.
Unknown `FANOUT_` names fail startup; platform-injected service names are tolerated.
Vendor credentials and endpoints keep the vendor's documented names.

Fanout also recognizes `ANTHROPIC_API_KEY`, `ANTHROPIC_BASE_URL`,
`OPENAI_API_KEY`, and `OPENAI_BASE_URL`. Other vendor/tool variables are
ignored; only the explicitly selected AI provider's key and endpoint are used.

| Environment variable | Type | Default |
|---|---|---|
| `ANTHROPIC_API_KEY` or `ANTHROPIC_API_KEY_FILE` | string · secret | — |
| `ANTHROPIC_BASE_URL` | string | — |
| `FANOUT_AI_MODEL` | string | — |
| `FANOUT_AI_PROVIDER` | string | — |
| `OPENAI_API_KEY` or `OPENAI_API_KEY_FILE` | string · secret | — |
| `OPENAI_BASE_URL` | string | — |

## Notes

### `ANTHROPIC_API_KEY`

Required when FANOUT_AI_PROVIDER is anthropic.

### `ANTHROPIC_BASE_URL`

Defaults to https://api.anthropic.com. Fanout appends /v1/messages, preserving any gateway path prefix. Use an HTTP(S) base URL without embedded credentials, a query, or a fragment.

### `FANOUT_AI_MODEL`

Overrides the provider's default: claude-sonnet-5-5 for Anthropic and gpt-6.1-sol for OpenAI. The OpenAI provider expects a reasoning model supporting reasoning.encrypted_content for stateless Responses replay. A 400 rejecting encrypted content is reported as a server-side configuration error; choose a compatible reasoning model with FANOUT_AI_MODEL.

### `FANOUT_AI_PROVIDER`

Enables chat by selecting exactly anthropic or openai. Empty disables chat.

### `OPENAI_API_KEY`

Required when FANOUT_AI_PROVIDER is openai.

### `OPENAI_BASE_URL`

Defaults to https://api.openai.com/v1. Fanout appends /responses, preserving the API version and any gateway path prefix. Use an HTTP(S) base URL without embedded credentials, a query, or a fragment.

> **Secrets**
>
> Settings marked `secret` are redacted from Fanout's startup configuration
> log. Supply either the value or its `_FILE` path, never both. File contents
> lose exactly one trailing newline (LF or CRLF); empty secrets fail startup.
