> ## 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](https://docs.redpill.ai/get-started/private-ai-proxy.md) 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

**1. 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.

**2. Turn on Protected**

The app verifies the gateway's attestation and pins the channel. Traffic is protected while the
session is active.

**3. 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.

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

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

## Any other tool

Tools with an OpenAI-compatible provider setting, such as
[Cline](https://docs.redpill.ai/guides/integrations/coding-tools/cline.md), 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](https://docs.redpill.ai/guides/tee-endpoint.md) and
[Verify a response](https://docs.redpill.ai/guides/verify-a-response.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.