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

# Connect Masker to Bolna as a Custom LLM Base URL

> Configure Bolna's Custom OpenAI-compatible LLM provider to use Masker as a base URL, keeping PHI out of your model provider's logs entirely.

Masker integrates with Bolna by acting as an OpenAI-compatible LLM endpoint. You point Bolna's LLM provider configuration at Masker's base URL instead of OpenAI directly. Bolna sends each conversation turn to Masker, which strips PHI from the prompt, forwards it to your upstream model, and rehydrates the response before returning it — all within the same request cycle.

<Note>
  The steps below use the public demo at [try.masker.dev](https://try.masker.dev). For a production deployment with your own portal agent, follow the [Quickstart](/quickstart) first and substitute that agent's URL where the demo URL appears below.
</Note>

## Set up the integration

<Steps>
  <Step title="Get your session URL">
    Open [try.masker.dev](https://try.masker.dev). The dashboard mints a session token for your browser tab. Your Masker base URL for Bolna looks like this:

    ```text theme={null}
    https://try.masker.dev/agents/bolna-public-demo/s/<your-session>/v1
    ```

    Copy the full URL. The `/s/<your-session>/` path segment scopes all events from this session to the correct tab in the Masker dashboard.
  </Step>

  <Step title="Open your Bolna agent configuration">
    Log in to the Bolna dashboard and open the agent you want to route through Masker.
  </Step>

  <Step title="Set the LLM provider to Custom OpenAI-compatible">
    In the agent's LLM settings, select **Custom OpenAI-compatible** as the provider type.
  </Step>

  <Step title="Paste the base URL">
    Paste your Masker URL into the **Base URL** field:

    ```text theme={null}
    https://try.masker.dev/agents/bolna-public-demo/s/<your-session>/v1
    ```

    Bolna appends `/chat/completions` to this base URL when it makes requests — do not include that suffix yourself.
  </Step>

  <Step title="Set the model name">
    In the **Model** field, enter any OpenAI-shaped model string. Masker forwards this value to your upstream provider:

    ```text theme={null}
    gpt-4o-mini
    ```

    You can use any model your upstream provider supports — `gpt-4o`, `gpt-4-turbo`, or a compatible model name. The value just needs to be a valid string for the upstream API you've configured in Masker.
  </Step>

  <Step title="Save and dial in">
    Save the agent configuration in Bolna. Start a call. Masker intercepts each conversation turn and you can watch PHI tokens appear in the Masker dashboard in real time.
  </Step>
</Steps>

## Verify redaction is working

During a call, open the Masker dashboard tab you used in step 1. The live transcript view shows:

* **Left of the firewall:** the caller's raw speech, including any PHI spans.
* **Right of the firewall:** the masked version forwarded to your LLM, with PHI replaced by stable tokens like `[PHONE_01]` or `[NAME_01]`.

If the transcript doesn't appear, confirm that the base URL in Bolna includes the `/s/<your-session>/` segment from the same browser session as your open Masker tab.

## Demo URL vs. production URL

| Environment         | URL format                                                            |
| ------------------- | --------------------------------------------------------------------- |
| Public demo         | `https://try.masker.dev/agents/bolna-public-demo/s/<your-session>/v1` |
| Production (portal) | URL shown in the Masker portal under your agent's settings            |

<Warning>
  The public demo is not intended for real patient data. Provision a production agent from the Masker portal and confirm your BAA is in place before routing live PHI through any Masker endpoint.
</Warning>

<Tip>
  At the end of a session, open the Masker portal and click **Download report** to get an Ed25519-signed HIPAA Safe Harbor compliance report in JSON and PDF formats. See [Audit Reports](/compliance/audit-reports) for details on verifying the signature.
</Tip>
