Tawa docs

Allowed providers

Set the list of providers an app's proxy may send requests to, from OpenAI and Anthropic to OpenRouter and your own endpoint.

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

ProviderName in the URLAPI formatRequests go to
OpenAIopenaiOpenAIapi.openai.com
AnthropicanthropicAnthropicapi.anthropic.com
MistralmistralOpenAIapi.mistral.ai
GroqgroqOpenAIapi.groq.com/openai
DeepSeekdeepseekOpenAIapi.deepseek.com
xAIxaiOpenAIapi.x.ai
Together AItogetherOpenAIapi.together.xyz
OpenRouteropenrouterOpenAIopenrouter.ai/api

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.

OpenRouter gives you access to hundreds of models through one entry. See OpenRouter and the Verified models we tested through it.

Set the list

Open the setting

In the dashboard, open the app and go to App settings, then Allowed providers.

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.

Optional: set a default provider

The Default provider is used by the /auto endpoint when a request does not name one. Leave it empty to require a name.

Save

Nothing changes until you save the card. A change reaches the proxy in about 20 seconds.

Under Your own endpoints you can add a provider that is not in the list. See Custom endpoints.

Send a request to a provider on the list

This example uses Groq. Any OpenAI-format provider on the list works the same way with its own name and key.

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)
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);

Anthropic is on the list by default. Its entry serves the Messages API.

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)
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]);
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"}]}'

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

On this page