> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voker.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integrate Voker with Anthropic

## Installation

<Tabs>
  <Tab title="Python">
    Make sure the Anthropic SDK is installed:

    <CodeGroup>
      ```bash pip theme={null}
      pip install anthropic
      ```

      ```bash uv theme={null}
      uv add anthropic
      ```

      ```bash poetry theme={null}
      poetry add anthropic
      ```
    </CodeGroup>

    Make sure the Voker Python SDK is [installed](/sdks/python#installation).
  </Tab>

  <Tab title="TypeScript">
    Make sure the Anthropic SDK is installed:

    <CodeGroup>
      ```bash npm theme={null}
      npm install @anthropic-ai/sdk
      ```

      ```bash pnpm theme={null}
      pnpm add @anthropic-ai/sdk
      ```

      ```bash bun theme={null}
      bun add @anthropic-ai/sdk
      ```

      ```bash yarn theme={null}
      yarn add @anthropic-ai/sdk
      ```
    </CodeGroup>

    Make sure the Voker Typescript SDK is [installed](/sdks/typescript#installation).
  </Tab>
</Tabs>

<Note>the SDK does not currently support Audio, Video or Image modalities.</Note>

## Usage

<Tabs>
  <Tab title="Python">
    ### Messages

    ```py theme={null}
    from anthropic import Anthropic  # [!code --]
    from voker.ai.provider_anthropic import Anthropic  # [!code ++]

    client = Anthropic()

    client.messages.create(
        voker_agent="customer-support-agent",  # required  [!code ++]
        voker_session="user-session-1",  # required  [!code ++]
        model="claude-haiku-4-5",
        messages=[
            {
                "role": "user",
                "content": "Write a haiku about autumn.",
            }
        ],
        max_tokens=1024,
    )
    ```

    ### Async Messages

    ```py theme={null}
    from anthropic import AsyncAnthropic  # [!code --]
    from voker.ai.provider_anthropic import AsyncAnthropic  # [!code ++]

    client = AsyncAnthropic()

    await client.messages.create(
        voker_agent="customer-support-agent",  # required  [!code ++]
        voker_session="user-session-1",  # required  [!code ++]
        model="claude-haiku-4-5",
        messages=[
            {
                "role": "user",
                "content": "Write a haiku about autumn.",
            }
        ],
        max_tokens=1024,
    )
    ```

    ### Beta Messages

    ```py theme={null}
    from anthropic import Anthropic  # [!code --]
    from voker.ai.provider_anthropic import Anthropic  # [!code ++]

    client = Anthropic()

    client.beta.messages.create(
        voker_agent="customer-support-agent",  # required  [!code ++]
        voker_session="user-session-1",  # required  [!code ++]
        model="claude-haiku-4-5",
        messages=[
            {
                "role": "user",
                "content": "Write a haiku about autumn.",
            }
        ],
        max_tokens=1024,
        betas=[],
    )
    ```

    ### Async Beta Messages

    ```py theme={null}
    from anthropic import AsyncAnthropic  # [!code --]
    from voker.ai.provider_anthropic import AsyncAnthropic  # [!code ++]

    client = AsyncAnthropic()

    await client.beta.messages.create(
        voker_agent="customer-support-agent",  # required  [!code ++]
        voker_session="user-session-1",  # required  [!code ++]
        model="claude-haiku-4-5",
        messages=[
            {
                "role": "user",
                "content": "Write a haiku about autumn.",
            }
        ],
        max_tokens=1024,
    )
    ```
  </Tab>

  <Tab title="TypeScript">
    ### Messages

    ```ts theme={null}
    import { Anthropic } from '@anthropic-ai/sdk'; // [!code --]
    import { Anthropic } from '@voker/voker/ai/provider-anthropic'; // [!code ++]

    const client = new Anthropic();

    await client.messages.create({
        vokerAgent: 'customer-support-agent', // required // [!code ++]
        vokerSession: 'user-session-1', // required // [!code ++]
        model: 'claude-4-sonnet-20250514',
        max_tokens: 100,
        messages: [
            {
                role: 'user',
                content: 'Hello, world!',
            },
        ],
    });
    ```

    ### Beta Messages

    ```ts theme={null}
    import { Anthropic } from '@anthropic-ai/sdk'; // [!code --]
    import { Anthropic } from '@voker/voker/ai/provider-anthropic'; // [!code ++]

    const client = new Anthropic();

    await client.beta.messages.create({
        vokerAgent: 'customer-support-agent', // required // [!code ++]
        vokerSession: 'user-session-1', // required // [!code ++]
        model: 'claude-4-sonnet-20250514',
        max_tokens: 100,
        messages: [
            {
                role: 'user',
                content: 'Hello, world!',
            },
        ],
    });
    ```
  </Tab>
</Tabs>

## Next steps

* [Python SDK reference](/sdks/python) - environment setup, API key configuration, and full method reference.
* [TypeScript SDK reference](/sdks/typescript) - installation, configuration, and type definitions.
