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

# Configuring your AI provider

> How to add an API key, choose between Anthropic, OpenAI, and Google Gemini, and switch providers during a session.

Wu-Weism requires an AI provider to run causal analysis. The platform supports three providers: **Anthropic (Claude)**, **OpenAI (GPT)**, and **Google Gemini**. You bring your own API key (BYOK) — it is sent per-request and never stored on Wu-Weism servers.

<Note>
  Your API key is transmitted directly to your chosen provider with each request. Wu-Weism servers do not log, store, or have persistent access to your key.
</Note>

## Adding a provider key

<Steps>
  <Step title="Open Model Settings">
    In the Causal Chat workbench, click the **Model Settings** icon in the left sidebar. The settings panel will open.
  </Step>

  <Step title="Select your provider">
    Under **AI Provider**, choose from:

    * **Anthropic** — Claude models
    * **OpenAI** — GPT models
    * **Gemini** — Google Gemini models
  </Step>

  <Step title="Paste your API key">
    In the **API Key** field for your selected provider, paste your key. The key field is masked after input.

    Keys are validated on your next request — if the key is invalid or has insufficient permissions, you will see an error in the chat response.
  </Step>

  <Step title="Optionally specify a model ID">
    Under **Model**, you can type a specific model ID from your provider's available models (e.g., `claude-opus-4-5`, `gpt-4o`, `gemini-2.0-flash`). If you leave this field on the default, Wu-Weism uses the recommended model for your selected provider.
  </Step>
</Steps>

## Choosing a provider

<Tabs>
  <Tab title="Anthropic (Claude)">
    **Best for**: Deep causal reasoning, long context, and complex multi-step inference.

    Claude's extended context window and strong instruction-following make it the best default choice for:

    * Long research papers attached as PDFs
    * Multi-turn sessions that build on prior claims
    * Complex counterfactual chains that require sustained reasoning

    Claude models available from Anthropic include the Claude 3 and Claude 4 families. Use a model that supports extended context (100K+ tokens) if you are attaching large PDFs.

    Get an API key at [console.anthropic.com](https://console.anthropic.com).
  </Tab>

  <Tab title="OpenAI (GPT)">
    **Best for**: General-purpose causal analysis and straightforward intervention queries.

    GPT models are a solid all-round choice for most research questions. They perform well for:

    * Structured intervention questions with clear variables
    * Sessions where response latency is a priority
    * Users already familiar with OpenAI's model behavior

    GPT-4 class models and later are recommended. GPT-3.5 class models may produce lower-quality SCM grounding.

    Get an API key at [platform.openai.com](https://platform.openai.com).
  </Tab>

  <Tab title="Google Gemini">
    **Best for**: Multimodal workflows and alternative reasoning approaches.

    Gemini is a strong alternative when:

    * You are analyzing PDFs that contain charts, figures, or complex visual layouts alongside text
    * You want a different reasoning path on the same question for comparison
    * You are integrating with a Google Cloud environment

    Get an API key at [aistudio.google.com](https://aistudio.google.com).
  </Tab>
</Tabs>

## Switching providers during a session

You can switch providers at any point in a session without losing your conversation history or claim records.

<Steps>
  <Step title="Open Model Settings">
    Click the **Model Settings** icon in the sidebar.
  </Step>

  <Step title="Select a different provider">
    Change the **AI Provider** selection. If you have already entered a key for that provider in this session, it will be available immediately.
  </Step>

  <Step title="Enter a key if needed">
    If you have not previously entered a key for the new provider, paste it into the **API Key** field.
  </Step>

  <Step title="Continue the conversation">
    Your next message will use the newly selected provider. Prior claims in the session remain attributed to the provider that generated them.
  </Step>
</Steps>

<Tip>
  Switching providers mid-session can be useful for validation: run the same intervention question on two different providers and compare whether the causal claims are consistent. Significant divergence may indicate that the SCM constraints are not fully constraining the response, which is worth investigating.
</Tip>

## Using a custom model ID

Each provider offers multiple models. By default, Wu-Weism selects a recommended model per provider. To use a specific model:

1. Open **Model Settings**
2. In the **Model** field, enter the exact model ID as defined by your provider

```text Example model IDs theme={null}
Anthropic:   claude-opus-4-5
             claude-sonnet-4-5

OpenAI:      gpt-4o
             gpt-4-turbo

Gemini:      gemini-2.0-flash
             gemini-1.5-pro
```

If you enter a model ID that does not exist or is not available on your provider account, the request will fail with a `400 Invalid model for selected provider` error.

## Error reference

| Error message                                                                                       | Cause                                                                                    | Resolution                                                                       |
| --------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- |
| `Configuration Error: Missing API key for provider '...'. Supply BYOK key or configure server key.` | No key has been provided for the selected provider                                       | Open Model Settings and paste a valid API key for the provider                   |
| `Invalid providerId`                                                                                | The provider identifier sent to the API is not one of `anthropic`, `openai`, or `gemini` | Select a valid provider from the Model Settings dropdown                         |
| `Invalid model for selected provider`                                                               | The model ID entered does not match available models for the provider                    | Check the model ID spelling and confirm it is available on your provider account |

## API usage and billing

Your API key is billed directly by the provider. Wu-Weism does not charge for AI compute — you pay your provider at their standard rates. Monitor your usage in your provider's dashboard:

* Anthropic: [console.anthropic.com/usage](https://console.anthropic.com/usage)
* OpenAI: [platform.openai.com/usage](https://platform.openai.com/usage)
* Google: [aistudio.google.com](https://aistudio.google.com)

Complex causal sessions with large PDFs attached consume more tokens. PDF Synthesis with six documents will use significantly more tokens per session than a simple Causal Chat query.

## Next steps

* Run your first causal analysis: [Running your first causal analysis](/guides/first-analysis)
* Learn about intervention queries: [Running interventions](/guides/interventions)
* Attach research papers to your queries: [Analyzing research papers with PDF upload](/guides/pdf-upload)
