Anvia
Providers

Anthropic

Use Anthropic models through the Anvia provider layer.

Use AnthropicClient when you want Anthropic completion models through Anvia's normalized runtime.

Environment

export ANTHROPIC_API_KEY=...

Completion Model

import { AgentBuilder } from "@anvia/core";
import { AnthropicClient } from "@anvia/anthropic";

const client = new AnthropicClient({ apiKey });
const model = client.completionModel("claude-sonnet-4-20250514");

const agent = new AgentBuilder("support", model)
  .instructions("Answer support questions clearly.")
  .build();

Anthropic models can be used anywhere Anvia expects a completion model.

Custom Client Options

const client = new AnthropicClient({
  apiKey: config.anthropic.apiKey,
  baseUrl: config.anthropic.baseUrl,
});

Use this form when secrets are injected by your app framework instead of read directly from process.env.

Provider Notes

Provider support can vary for attachments, tool behavior, streaming fields, and model-specific parameters. Anvia normalizes the SDK surface, but it does not make every model capability identical.