Installation
- Python
- TypeScript
Make sure the Anthropic SDK is installed:Make sure the Voker Python SDK is installed.
pip install anthropic
uv add anthropic
poetry add anthropic
Make sure the Anthropic SDK is installed:Make sure the Voker Typescript SDK is installed.
npm install @anthropic-ai/sdk
pnpm add @anthropic-ai/sdk
bun add @anthropic-ai/sdk
yarn add @anthropic-ai/sdk
the SDK does not currently support Audio, Video or Image modalities.
Usage
- Python
- TypeScript
Messages
from anthropic import Anthropic
from voker.ai.provider_anthropic import Anthropic
client = Anthropic()
client.messages.create(
voker_agent="customer-support-agent", # required
voker_session="user-session-1", # required
model="claude-haiku-4-5",
messages=[
{
"role": "user",
"content": "Write a haiku about autumn.",
}
],
max_tokens=1024,
)
Async Messages
from anthropic import AsyncAnthropic
from voker.ai.provider_anthropic import AsyncAnthropic
client = AsyncAnthropic()
await client.messages.create(
voker_agent="customer-support-agent", # required
voker_session="user-session-1", # required
model="claude-haiku-4-5",
messages=[
{
"role": "user",
"content": "Write a haiku about autumn.",
}
],
max_tokens=1024,
)
Beta Messages
from anthropic import Anthropic
from voker.ai.provider_anthropic import Anthropic
client = Anthropic()
client.beta.messages.create(
voker_agent="customer-support-agent", # required
voker_session="user-session-1", # required
model="claude-haiku-4-5",
messages=[
{
"role": "user",
"content": "Write a haiku about autumn.",
}
],
max_tokens=1024,
betas=[],
)
Async Beta Messages
from anthropic import AsyncAnthropic
from voker.ai.provider_anthropic import AsyncAnthropic
client = AsyncAnthropic()
await client.beta.messages.create(
voker_agent="customer-support-agent", # required
voker_session="user-session-1", # required
model="claude-haiku-4-5",
messages=[
{
"role": "user",
"content": "Write a haiku about autumn.",
}
],
max_tokens=1024,
)
Messages
import { Anthropic } from '@anthropic-ai/sdk';
import { Anthropic } from '@voker/voker/ai/provider-anthropic';
const client = new Anthropic();
await client.messages.create({
vokerAgent: 'customer-support-agent', // required
vokerSession: 'user-session-1', // required
model: 'claude-4-sonnet-20250514',
max_tokens: 100,
messages: [
{
role: 'user',
content: 'Hello, world!',
},
],
});
Beta Messages
import { Anthropic } from '@anthropic-ai/sdk';
import { Anthropic } from '@voker/voker/ai/provider-anthropic';
const client = new Anthropic();
await client.beta.messages.create({
vokerAgent: 'customer-support-agent', // required
vokerSession: 'user-session-1', // required
model: 'claude-4-sonnet-20250514',
max_tokens: 100,
messages: [
{
role: 'user',
content: 'Hello, world!',
},
],
});
Next steps
- Python SDK reference - environment setup, API key configuration, and full method reference.
- TypeScript SDK reference - installation, configuration, and type definitions.