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

# Claude Cowork 3P

> Configure AIOHub as the third-party inference gateway for Claude Cowork.

[Claude Cowork 3P](https://claude.com/docs/cowork/3p/overview) is the third-party inference deployment mode for Claude Desktop. In this mode, the Cowork and Code tabs send model inference requests to a configured provider instead of Anthropic's first-party inference service.

AIOHub supports the Claude Messages protocol. Configure Cowork 3P with AIOHub as a `gateway` inference provider.

<Warning>Claude Cowork 3P is in public beta. Entry points and managed-configuration behavior may change with Claude Desktop releases. This page follows Anthropic's current public 3P configuration keys.</Warning>

<Warning>Even when you use the AIOHub API, Claude Cowork 3P is only usable in countries or regions where Anthropic provides service. This excludes mainland China, Hong Kong, and Macao. You are responsible for resolving Claude Desktop, Claude account, and network access requirements.</Warning>

## Model scope

When you use the AIOHub API with Claude Cowork 3P, model access is not limited to Anthropic or Claude models. If the model is visible to the group assigned to your API key and AIOHub currently supports it through the Claude Messages-compatible gateway, you can also choose OpenAI, open-source, and other models.

If your API key includes the `auto` group, the Cowork 3P model selector can show multiple model families in the user interface. The actual list still depends on the models visible to the current API key; check the console or `/v1/models` first when you need an exact model ID.

## Prerequisites

* Claude Desktop with Cowork 3P support installed
* An [AIOHub API key](/en/account/create-token)
* A group assigned to the API key that can access Claude-compatible models
* A positive account balance

## Minimum settings

To configure AIOHub, you only need two fields:

| Field            | Value                    |
| ---------------- | ------------------------ |
| Gateway base URL | `https://api.aiohub.org` |
| Gateway API key  | `sk-your-api-key`        |

<Note>Set `inferenceGatewayBaseUrl` to the gateway root. Do not add `/v1`. Cowork 3P calls `POST /v1/messages` itself; if the base URL is `https://api.aiohub.org/v1`, the client may call the wrong path.</Note>

Keep `Gateway auth scheme` and `Model list` at their defaults. If your API key includes the `auto` group, the model selector can show the models visible to the current API key.

## Configure model web access

If you want models in Claude Cowork 3P to access the internet, configure **Allowed egress hosts**. The managed configuration key is `coworkEgressAllowedHosts`; it controls which hosts the Cowork sandbox can reach for web fetch, shell commands, and package installs.

Common configurations:

| Goal                              | `coworkEgressAllowedHosts`              |
| --------------------------------- | --------------------------------------- |
| Allow all URLs                    | `["*"]`                                 |
| Allow only selected hosts         | `["docs.aiohub.org", "api.github.com"]` |
| Allow a domain and its subdomains | `["*.example.com"]`                     |

<Warning>Setting this to `["*"]` disables the Cowork sandbox egress host filter, so model tools can reach any URL. This is convenient for personal testing; for team or production deployments, allow only the hosts you actually need.</Warning>

<Note>`coworkEgressAllowedHosts` controls external website access from tools inside the Cowork sandbox. It is not the AIOHub inference gateway Base URL. The configured inference endpoint is allowed implicitly.</Note>

## Use the in-app configuration flow

<Steps>
  <Step title="Open third-party inference configuration">
    Open Claude Desktop, then go to **Developer** -> **Configure third-party inference**.
  </Step>

  <Step title="Choose Gateway">
    Select **Gateway** as the inference provider. Use this mode for gateways that implement the Anthropic Messages API.
  </Step>

  <Step title="Enter AIOHub settings">
    Fill in only these two fields:

    | Field            | Value                    |
    | ---------------- | ------------------------ |
    | Gateway base URL | `https://api.aiohub.org` |
    | Gateway API key  | `sk-your-api-key`        |

    Keep `Gateway auth scheme` and `Model list` at their defaults. If your API key uses the `auto` group, the model selector can show multiple models visible to the current API key.

    If you want the model to access external websites, configure **Allowed egress hosts**. To allow any URL, set it to `*`. To allow only specific websites, list hostnames such as `docs.aiohub.org` or `*.example.com`.
  </Step>

  <Step title="Export configuration">
    Export a macOS `.mobileconfig` profile or Windows `.reg` policy from the wizard. For single-machine testing, you can also use the local user configuration file.
  </Step>

  <Step title="Restart Claude Desktop">
    Quit and reopen Claude Desktop. Seeing the Cowork and Code tabs and a Gateway sign-in option means 3P mode was detected.
  </Step>
</Steps>

## Local user configuration example

If you are not deploying configuration through MDM, add `enterpriseConfig` to the local user config. This is useful for personal testing, not for distributing real API keys across a team.

<Tabs>
  <Tab title="macOS">
    Config file location:

    ```text theme={"system"}
    ~/Library/Application Support/Claude-3p/claude_desktop_config.json
    ```

    Minimum example:

    ```json theme={"system"}
    {
      "enterpriseConfig": {
        "inferenceProvider": "gateway",
        "inferenceGatewayBaseUrl": "https://api.aiohub.org",
        "inferenceGatewayApiKey": "sk-your-api-key"
      }
    }
    ```

    To allow model web access to all URLs, add:

    ```json theme={"system"}
    {
      "enterpriseConfig": {
        "inferenceProvider": "gateway",
        "inferenceGatewayBaseUrl": "https://api.aiohub.org",
        "inferenceGatewayApiKey": "sk-your-api-key",
        "coworkEgressAllowedHosts": ["*"]
      }
    }
    ```
  </Tab>

  <Tab title="Windows">
    Config file location:

    ```text theme={"system"}
    %APPDATA%\Claude-3p\claude_desktop_config.json
    ```

    Minimum example:

    ```json theme={"system"}
    {
      "enterpriseConfig": {
        "inferenceProvider": "gateway",
        "inferenceGatewayBaseUrl": "https://api.aiohub.org",
        "inferenceGatewayApiKey": "sk-your-api-key"
      }
    }
    ```

    To allow model web access to all URLs, add:

    ```json theme={"system"}
    {
      "enterpriseConfig": {
        "inferenceProvider": "gateway",
        "inferenceGatewayBaseUrl": "https://api.aiohub.org",
        "inferenceGatewayApiKey": "sk-your-api-key",
        "coworkEgressAllowedHosts": ["*"]
      }
    }
    ```
  </Tab>
</Tabs>

<Warning>Do not commit configuration files that contain real API keys. For team deployments, create a dedicated AIOHub API key for Cowork 3P and restrict its groups to the intended use case.</Warning>

## Verify the gateway

First verify that the AIOHub API key and model work:

```bash theme={"system"}
curl https://api.aiohub.org/v1/messages \
  -H "x-api-key: sk-your-api-key" \
  -H "anthropic-version: 2023-06-01" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-20250514",
    "max_tokens": 128,
    "messages": [{"role": "user", "content": "Hello from Claude Cowork 3P"}]
  }'
```

If the request succeeds, launch Claude Desktop and send a short prompt. Then open the AIOHub console **Logs** page to confirm the request, model, group, and cost.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Claude Desktop still opens the normal Claude login">
    Confirm `inferenceProvider` is set to `gateway`, and that `inferenceGatewayBaseUrl` and `inferenceGatewayApiKey` are both present. Cowork 3P activates only when the provider and required credentials are valid.
  </Accordion>

  <Accordion title="Connection or path errors">
    Confirm the Gateway base URL is `https://api.aiohub.org`, without `/v1`. Cowork 3P appends `/v1/messages` itself.
  </Accordion>

  <Accordion title="Model list is empty">
    AIOHub supports `/v1/models`, but visible models still depend on the group assigned to the API key. Usually keep Model list at its default. Only set `inferenceModels` explicitly, for example `claude-sonnet-4-20250514`, if the client does not show models correctly.
  </Accordion>

  <Accordion title="Authentication fails">
    Usually keep Gateway auth scheme at its default. If your Claude Desktop build does not infer the `sk-` API key header correctly, set it explicitly to `auto`, or try `x-api-key`.
  </Accordion>

  <Accordion title="There is no Chat tab">
    This is expected in Cowork 3P. The third-party inference mode is centered on the Cowork and Code tabs, and is not the same as standard Claude Chat.
  </Accordion>

  <Accordion title="The model cannot access a website">
    Check whether **Allowed egress hosts** includes the target hostname. To allow all URLs, set it to `*`; in JSON configuration, use `"coworkEgressAllowedHosts": ["*"]`.
  </Accordion>
</AccordionGroup>

## Official references

* [Claude Cowork 3P overview](https://claude.com/docs/cowork/3p/overview)
* [Claude Cowork 3P configuration reference](https://claude.com/docs/cowork/3p/configuration)
* [Install and configure Claude Cowork with third-party platforms](https://support.claude.com/en/articles/14680741-install-and-configure-claude-cowork-with-third-party-platforms)
