@byokey/anthropic
v0.2.0
Published
Anthropic provider adapter for the BYOK Infrastructure Toolkit
Maintainers
Readme
@byokey/anthropic
Anthropic Claude provider adapter for the BYOK Infrastructure Toolkit.
Supports Claude Opus 4.6, Sonnet 4.6, and Haiku 4.5.
Installation
npm install @byokey/core @byokey/anthropicUsage
import { createClient } from '@byokey/core';
import { anthropic } from '@byokey/anthropic';
const client = createClient({ adapters: [anthropic()] });
const response = await client.execute({
provider: 'anthropic',
model: 'claude-sonnet-4-6',
credential: 'sk-ant-...', // Your Anthropic API key
messages: [{ role: 'user', content: 'Hello!' }]
});Configuration
anthropic({
baseUrl: 'https://api.anthropic.com/v1/messages', // Custom endpoint
apiVersion: '2024-10-22', // API version
timeoutMs: 30000, // Request timeout
});