# Quickstart (/docs/proxy/quickstart)



This page takes you from nothing to a scanned request. You need a Tawa Guard
app, a proxy token for it, and a key for the provider you call. If you do not
have an app yet, [create one on tawaguard.com](https://tawaguard.com/signup?intent=api-key\&utm_source=docs\&utm_medium=proxy\&utm_content=quickstart-top).

<Steps>
  <Step>
    ### Create a proxy token [#create-a-proxy-token]

    In the dashboard, open the app and go to **API keys**. Under **Proxy tokens**,
    create a token, choose its environment and the stages to scan, and copy it. It
    is shown once, so store it in an environment variable or a secrets manager.

    ```bash
    export TAWA_PROXY_TOKEN="tgp_..."
    ```

    An app can hold up to 3 active proxy tokens per environment. The Connect page of
    the app has a **Proxy** tab with the same URLs used below.
  </Step>

  <Step>
    ### Point your client at the proxy [#point-your-client-at-the-proxy]

    The base URL carries the token and names the provider.

    | Provider API                          | Base URL                                        |
    | ------------------------------------- | ----------------------------------------------- |
    | OpenAI Chat Completions and Responses | `https://proxy.tawaguard.com/<token>/openai/v1` |
    | Anthropic Messages                    | `https://proxy.tawaguard.com/<token>/anthropic` |

    Keep using your own provider key. The client sends it in the usual header and
    the proxy forwards it. It is not stored.
  </Step>

  <Step>
    ### Send a request [#send-a-request]

    <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)">
        ```python
        import os

        from openai import OpenAI

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

        reply = client.chat.completions.create(
            model="gpt-4o-mini",
            messages=[{"role": "user", "content": "Say hello in five words."}],
        )
        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}/openai/v1`,
          apiKey: process.env.OPENAI_API_KEY,
        });

        const reply = await client.chat.completions.create({
          model: "gpt-4o-mini",
          messages: [{ role: "user", content: "Say hello in five words." }],
        });
        console.log(reply.choices[0].message.content);
        ```
      </Tab>

      <Tab value="Anthropic SDK (Python)">
        ```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": "Say hello in five words."}],
        )
        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: "Say hello in five words." }],
        });
        console.log(reply.content[0]);
        ```
      </Tab>

      <Tab value="curl">
        ```bash
        curl "https://proxy.tawaguard.com/$TAWA_PROXY_TOKEN/openai/v1/chat/completions" \
          -H "Authorization: Bearer $OPENAI_API_KEY" \
          -H "Content-Type: application/json" \
          -d '{"model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Say hello in five words."}]}'
        ```
      </Tab>
    </Tabs>

    A normal reply comes back from the provider. A blocked request returns a `400`
    in the provider's own error format. See [Error codes](/docs/proxy/reference/error-codes).
  </Step>

  <Step>
    ### Check it in Monitoring, then block [#check-it-in-monitoring-then-block]

    A new app is in **Monitoring**: requests are scanned and forwarded, never
    blocked. Run your normal traffic and review what would have been blocked. When
    you are ready, switch the app to **Blocking** in **App settings**, **Scanning
    and blocking**. See [Scanning and blocking](/docs/proxy/configure/scanning-and-blocking).
  </Step>
</Steps>

## Next steps [#next-steps]

<Cards>
  <Card title="Use another provider" href="/docs/proxy/routing/allowed-providers" description="Allow Mistral, Groq, DeepSeek, xAI, Together, OpenRouter or your own endpoint." />

  <Card title="Switch models with OpenRouter" href="/docs/proxy/routing/openrouter" description="One URL and one key, hundreds of models." />

  <Card title="Check your model" href="/docs/proxy/verified-models" description="See which of 175 tested models passed every check." />

  <Card title="Claude Code and Codex" href="/docs/proxy/integrations" description="Scan a coding agent's traffic with one environment variable." />
</Cards>

<GetStarted content="proxy-quickstart-bottom" title="No token yet?" />
