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

# Use in agents

> Connect Claude Code, Codex, OpenCode, Pi, and other agents to RedPill through Private AI Proxy, or with a plain base URL.

[Private AI Proxy](/get-started/private-ai-proxy) verifies the gateway on your machine and connects
your agents to a local API; the RedPill credential never leaves the app. Any tool that cannot use
the Proxy can still point at RedPill directly.

## Connect an agent

<Steps>
  <Step title="Install Private AI Proxy and sign in">
    Download it from [Start building](https://redpill.ai/start-building), open it, and add a
    RedPill profile with your account or an API key.
  </Step>

  <Step title="Turn on Protected">
    The app verifies the gateway's attestation and pins the channel. Traffic is protected while the
    session is active.
  </Step>

  <Step title="Connect the agent">
    On the **Agents** screen, connect the agent and restart it. The app has written RedPill into the
    agent's own provider settings; disconnecting restores them.
  </Step>
</Steps>

| Agent       | What changes                               | Guide                                                        |
| ----------- | ------------------------------------------ | ------------------------------------------------------------ |
| Claude Code | Messages provider in Claude Code settings  | [Claude Code](/guides/integrations/coding-tools/claude-code) |
| Codex       | Custom Responses provider in `config.toml` | [Codex CLI](/guides/integrations/coding-tools/codex-cli)     |
| OpenCode    | Provider in `opencode.json`                | [OpenCode](/guides/integrations/coding-tools/opencode)       |
| Pi          | Pi provider settings                       | [Pi](/guides/integrations/coding-tools/pi)                   |
| Hermes      | Provider in `config.yaml`                  | [Hermes](/guides/integrations/runtimes/hermes)               |
| OpenClaw    | Native-host provider; restart required     | [OpenClaw](/guides/integrations/runtimes/openclaw)           |
| Oh My Pi    | Local token and models file; restart `omp` |                                                              |

From the CLI: `pap start --profile NAME`, then
`pap agents connect <agent>`. See [CLI](/get-started/private-ai-proxy#cli).

## Any other tool

Tools with an OpenAI-compatible provider setting, such as
[Cline](/guides/integrations/coding-tools/cline), use the Proxy's Local API while Protected is on:

| Field    | Value                                         |
| -------- | --------------------------------------------- |
| Base URL | `http://127.0.0.1:4180/v1`                    |
| API key  | The client key from the app's Overview screen |
| Model    | A model from the app's verified catalog       |

## Without the Proxy

On servers, in CI, or in frameworks, point the client at RedPill directly. Requests still go through
the attested gateway and carry an `x-receipt-id`, but nothing on your side verifies the channel.

| Client                                | Protocol         | Base URL                                                     |
| ------------------------------------- | ---------------- | ------------------------------------------------------------ |
| OpenAI clients and agent frameworks   | Chat Completions | `https://api.redpill.ai/v1`                                  |
| Codex CLI and other Responses clients | Responses        | `https://api.redpill.ai/v1`                                  |
| Claude Code and Anthropic clients     | Messages         | `https://api.redpill.ai` (the client appends `/v1/messages`) |

```bash theme={null}
export REDPILL_AI_API_KEY="YOUR_API_KEY"
curl -s https://api.redpill.ai/v1/models \
  | jq -r '.data[] | select((.supported_features // []) | index("tools")) | .id'
```

Use `https://tee.redpill.ai` only when every request must use an `is_tee: true` model; it returns
`404` for standard models. See [TEE-only endpoint](/guides/tee-endpoint) and
[Verified ACI clients](/guides/verified-aci-client). Long-running runtimes and Python frameworks
have their own pages: [Agent runtimes](/guides/integrations/agent-runtimes),
[Agent frameworks](/guides/integrations/agent-frameworks).
