ADK.Model.Claude (adk_ex v1.2.0)

Copy Markdown View Source

Anthropic Claude model provider.

Calls the Claude Messages API with format conversion between ADK types and Anthropic's content block format.

Configuration

%ADK.Model.Claude{
  model_name: "claude-sonnet-4-5-20250929",
  api_key: System.fetch_env!("ANTHROPIC_API_KEY"),
  base_url: "https://api.anthropic.com/v1",
  extra_headers: [{"anthropic-beta", "prompt-caching-2024-07-31"}],
  receive_timeout: 180_000
}

Options

  • :extra_headers — additional request headers appended after the required x-api-key, anthropic-version, and content-type headers. Defaults to [].
  • :receive_timeout — HTTP receive timeout in milliseconds. Defaults to 120_000.

Summary

Types

t()

@type t() :: %ADK.Model.Claude{
  api_key: String.t(),
  base_url: String.t(),
  extra_headers: [{String.t(), String.t()}],
  model_name: String.t(),
  receive_timeout: non_neg_integer()
}