# `SuperPi.AI.Providers.Anthropic`
[🔗](https://github.com/oleksandr/super-pi-beam/blob/v0.1.0/lib/super_pi/ai/providers/anthropic.ex#L1)

Anthropic Messages API (`claude-*`).

Configure with `ANTHROPIC_API_KEY` or `config :super_pi, anthropic_api_key: "..."`.
Other settings (all optional):

| Config key | Default |
|---|---|
| `:anthropic_base_url` | `https://api.anthropic.com` |
| `:anthropic_models` | the models listed in `/v1/models` and the CLI |
| `:anthropic_max_tokens` | `8192` (the API requires a limit) |
| `:anthropic_version` | `2023-06-01` |

What is not done:

- **Extended thinking is not enabled.** A thinking block in the history (for example from an
  earlier turn on another provider) is dropped, because Anthropic needs the signed block back
  unchanged and thinking is off. Turning thinking on needs the signatures to round-trip, which
  has not been verified against the live API.
- `--json-schema` structured output is ignored.
- Prompt caching markers are not sent.

The request and the stream parsing are tested against a local server that replays the documented
event format. They have not run against the live API (no key was available); see
`test/super_pi/ai/live_provider_test.exs` for the opt-in live test.

# `build_body`

The request body for a provider payload.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
