> ## 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 ElevenLabs Conversational AI Agents

> Point your ElevenLabs agent's Custom LLM at Masker to intercept every conversation turn and strip PHI before it leaves your regulated boundary.

Masker works with ElevenLabs Conversational AI by replacing your agent's LLM endpoint with Masker's OpenAI-compatible proxy. ElevenLabs sends each user turn to Masker, which tokenizes PHI, calls your upstream model with the masked prompt, and rehydrates tokens in the response before returning it. From the caller's perspective nothing changes — from your LLM provider's perspective, real patient data was never there.

<Note>
  The steps below use the public demo at [try.masker.dev](https://try.masker.dev). For a production deployment with your own Masker portal account and a dedicated agent ID, follow the [Quickstart](/quickstart) to create an agent first, then substitute that agent's URL wherever 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 generates a session token for your browser tab. Your Masker URL for ElevenLabs looks like this:

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

    Copy the full URL — the `/s/<your-session>/` segment pins all requests from this tab to the same session in the Masker dashboard.
  </Step>

  <Step title="Open your ElevenLabs agent settings">
    Go to the [ElevenLabs Conversational AI dashboard](https://elevenlabs.io/app/conversational-ai) and open the agent you want to route through Masker.
  </Step>

  <Step title="Switch to Custom LLM">
    In the agent settings, find the **LLM** section. Change the LLM provider to **Custom LLM**. A **Server URL** field appears.
  </Step>

  <Step title="Paste your Masker URL">
    Paste the URL you copied in step 1 into the **Server URL** field:

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

    ElevenLabs appends `/chat/completions` to this base URL automatically — do not add it yourself.
  </Step>

  <Step title="Leave the API key blank">
    The public demo does not require an API key. Leave the API key field empty. Authentication is handled by the session token embedded in the URL path.

    <Note>
      In a production deployment using your own Masker agent, authentication still happens via the URL path — you do not need to set an API key in ElevenLabs for any Masker configuration.
    </Note>
  </Step>

  <Step title="Save and start a conversation">
    Click **Save** in ElevenLabs. Start a conversation with the agent. Masker intercepts each turn in real time — you can watch redaction events appear in the Masker dashboard as you speak.
  </Step>
</Steps>

## Verify redaction is working

While a conversation is running, switch to the Masker dashboard tab. The transcript view shows two sides of the firewall:

* **Left (regulated):** the raw transcript your caller spoke, including any PHI.
* **Right (public):** the masked version sent to your LLM, with PHI replaced by tokens like `[SSN_01]` or `[PHONE_02]`.

If both sides show identical text, check that the **Server URL** in ElevenLabs matches your Masker URL exactly, including the `/s/<your-session>/` segment.

## Demo URL vs. production URL

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

<Warning>
  The public demo at `try.masker.dev` does not persist originals and is not suitable for real patient data. Use a production agent from the Masker portal — and ensure you have a signed BAA in place — before routing actual PHI through the system.
</Warning>

<Tip>
  After your test conversation ends, click **Download report** in the Masker session view to get a signed HIPAA Safe Harbor compliance report. See [Audit Reports](/compliance/audit-reports) for details.
</Tip>
