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

# Anthropic

> Integrate your application with Anthropic

<Steps>
  <Step title="Create an account + Generate an API Key">
    Log into [qualifire](https://qualifire.ai) or create an account. Once you have an account, you
    can generate an [API key](https://qualifire.ai/settings/api-keys).
  </Step>

  <Step title="Set QUALIFIRE_API_KEY as an environment variable">
    ```javascript theme={null}
    QUALIFIRE_API_KEY=<your API key>
    ```
  </Step>

  <Step title="Modify the base path and add a X-Qualifire-Api-Key header">
    <Note>
      If you created a direct integration, you can omit the `defaultHeaders`
      property.
    </Note>

    <CodeGroup>
      ```javascript JS Anthropic theme={null}
      import Anthropic from "@anthropic-ai/sdk";

      const anthropic = new Anthropic({
        baseURL: "https://proxy.qualifire.ai/api/providers/anthropic",
        apiKey: process.env.ANTHROPIC_API_KEY,
        defaultHeaders: {
          "X-Qualifire-Api-Key": process.env.QUALIFIRE_API_KEY,
        },
      });
      ```

      ```python Python Anthropic theme={null}
      import anthropic
      import os

      client = anthropic.Anthropic(
        api_key=os.environ.get("ANTHROPIC_API_KEY"),
        base_url="https://proxy.qualifire.ai/api/providers/anthropic/",
        default_headers={
          "X-Qualifire-Api-Key": os.environ['QUALIFIRE_API_KEY'],
        },
      )
      ```
    </CodeGroup>

    <Tip>
      Anthropic models support extended thinking and tool use through the Qualifire proxy. All Anthropic-specific features like system prompts, tool use, and streaming work seamlessly.
    </Tip>
  </Step>
</Steps>
