# Allowed providers (/docs/proxy/routing/allowed-providers)



Each app has a list of providers its proxy may send requests to. A request to a
provider that is not on the list is refused with `400` and the code
`tawa_upstream_unresolved`. The list is a setting of the app, so every proxy
token of the app follows it.

A new app, and any app that has never saved a list, allows OpenAI and Anthropic.
Once you save a list, only the providers on it are reachable.

## Built-in providers [#built-in-providers]

<ProviderTable />

Each provider has a name. You use that name in the proxy URL, for example
`https://proxy.tawaguard.com/<token>/groq/v1`, or in the `x-tawa-upstream`
header. See [Choose a provider per request](/docs/proxy/routing/per-request).

OpenRouter gives you access to hundreds of models through one entry. See
[OpenRouter](/docs/proxy/routing/openrouter) and the
[Verified models](/docs/proxy/verified-models) we tested through it.

## Set the list [#set-the-list]

<Steps>
  <Step>
    ### Open the setting [#open-the-setting]

    In the dashboard, open the app and go to **App settings**, then **Allowed
    providers**.
  </Step>

  <Step>
    ### Tick the providers you use [#tick-the-providers-you-use]

    Tick each provider the app should be able to reach. At least one is required.
    For OpenRouter you can also set [provider limits](/docs/proxy/routing/openrouter-provider-limits).
  </Step>

  <Step>
    ### Optional: set a default provider [#optional-set-a-default-provider]

    The **Default provider** is used by the [`/auto` endpoint](/docs/proxy/routing/auto-endpoint)
    when a request does not name one. Leave it empty to require a name.
  </Step>

  <Step>
    ### Save [#save]

    Nothing changes until you save the card. A change reaches the proxy in about 20
    seconds.
  </Step>
</Steps>

Under **Your own endpoints** you can add a provider that is not in the list. See
[Custom endpoints](/docs/proxy/routing/custom-endpoints).

## Send a request to a provider on the list [#send-a-request-to-a-provider-on-the-list]

<Tabs groupId="client" items="[&#x22;OpenAI SDK (Python)&#x22;, &#x22;OpenAI SDK (TypeScript)&#x22;, &#x22;Anthropic SDK (Python)&#x22;, &#x22;Anthropic SDK (TypeScript)&#x22;, &#x22;curl&#x22;]">
  <Tab value="OpenAI SDK (Python)">
    This example uses Groq. Any OpenAI-format provider on the list works the same way with its own name and key.

    ```python
    import os

    from openai import OpenAI

    client = OpenAI(
        base_url=f"https://proxy.tawaguard.com/{os.environ['TAWA_PROXY_TOKEN']}/groq/v1",
        api_key=os.environ["GROQ_API_KEY"],
    )

    reply = client.chat.completions.create(
        model="llama-3.3-70b-versatile",
        messages=[{"role": "user", "content": "Hello"}],
    )
    print(reply.choices[0].message.content)
    ```
  </Tab>

  <Tab value="OpenAI SDK (TypeScript)">
    ```ts
    import OpenAI from "openai";

    const client = new OpenAI({
      baseURL: `https://proxy.tawaguard.com/${process.env.TAWA_PROXY_TOKEN}/groq/v1`,
      apiKey: process.env.GROQ_API_KEY,
    });

    const reply = await client.chat.completions.create({
      model: "llama-3.3-70b-versatile",
      messages: [{ role: "user", content: "Hello" }],
    });
    console.log(reply.choices[0].message.content);
    ```
  </Tab>

  <Tab value="Anthropic SDK (Python)">
    Anthropic is on the list by default. Its entry serves the Messages API.

    ```python
    import os

    from anthropic import Anthropic

    client = Anthropic(
        base_url=f"https://proxy.tawaguard.com/{os.environ['TAWA_PROXY_TOKEN']}/anthropic",
        api_key=os.environ["ANTHROPIC_API_KEY"],
    )

    reply = client.messages.create(
        model="claude-haiku-4-5",
        max_tokens=256,
        messages=[{"role": "user", "content": "Hello"}],
    )
    print(reply.content[0].text)
    ```
  </Tab>

  <Tab value="Anthropic SDK (TypeScript)">
    ```ts
    import Anthropic from "@anthropic-ai/sdk";

    const client = new Anthropic({
      baseURL: `https://proxy.tawaguard.com/${process.env.TAWA_PROXY_TOKEN}/anthropic`,
      apiKey: process.env.ANTHROPIC_API_KEY,
    });

    const reply = await client.messages.create({
      model: "claude-haiku-4-5",
      max_tokens: 256,
      messages: [{ role: "user", content: "Hello" }],
    });
    console.log(reply.content[0]);
    ```
  </Tab>

  <Tab value="curl">
    ```bash
    curl "https://proxy.tawaguard.com/$TAWA_PROXY_TOKEN/groq/v1/chat/completions" \
      -H "Authorization: Bearer $GROQ_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"model": "llama-3.3-70b-versatile", "messages": [{"role": "user", "content": "Hello"}]}'
    ```
  </Tab>
</Tabs>

## What to know [#what-to-know]

* A request can only choose between providers on the list. It can never supply an address of its own.
* Your provider key passes straight through to the provider. Tawa Guard does not store it.
* One entry serves only the paths of its API format. An OpenAI-format entry serves `/chat/completions` and `/responses`, and an Anthropic-format entry serves `/messages`. Any other combination returns `404` with `tawa_path_not_proxied`.
* Each app can have up to 20 entries, built-in and custom together.
* Removing a provider from the list makes it unreachable within about 20 seconds.

## Next [#next]

<Cards>
  <Card title="Choose a provider per request" href="/docs/proxy/routing/per-request" description="Name the provider in the URL or in a header." />

  <Card title="The /auto endpoint" href="/docs/proxy/routing/auto-endpoint" description="One URL for every allowed provider, with a default." />

  <Card title="Custom endpoints" href="/docs/proxy/routing/custom-endpoints" description="Add Azure OpenAI or a self-hosted server." />
</Cards>
