# `LlmCore.LLM.Anthropic`
[🔗](https://github.com/fosferon/llm_core/blob/v0.5.0/lib/llm_core/llm/anthropic.ex#L1)

Anthropic Claude API provider implementing `LlmCore.LLM.Provider`.

# `available?`

```elixir
@spec available?() :: boolean()
```

Checks if the Anthropic API key is configured.

# `available?`

```elixir
@spec available?(map()) :: boolean()
```

Checks availability using the TOML-resolved auth config.

When a provider alias reuses this module with a different `api_key_env`,
this callback checks the correct env var instead of the hardcoded
`ANTHROPIC_API_KEY` default.

# `capabilities`

```elixir
@spec capabilities() :: LlmCore.LLM.Provider.capabilities()
```

Returns Anthropic's capability map including streaming, structured output,
tool use, and supported models.

# `provider_type`

```elixir
@spec provider_type() :: :api
```

Returns `:api` — Anthropic is a cloud API provider.

# `send`

```elixir
@spec send(
  LlmCore.LLM.Provider.prompt(),
  keyword()
) :: {:ok, LlmCore.LLM.Response.t()} | {:error, LlmCore.LLM.Error.t()}
```

Sends a prompt to the Anthropic Messages API and returns the response.

When `opts[:tools]` contains a list of `LlmToolkit.Tool` structs, tool
definitions are encoded into the request body. If the model responds
with `stop_reason: "tool_use"`, the returned `Response.tool_calls`
will contain decoded `LlmToolkit.Tool.Call` structs.

# `stream`

```elixir
@spec stream(
  LlmCore.LLM.Provider.prompt(),
  keyword()
) :: {:ok, Enumerable.t()} | {:error, LlmCore.LLM.Error.t()}
```

Streams a response from the Anthropic Messages API using Server-Sent Events.

---

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