# Hosted capture

> Record Claude Code, Codex and agents in CI, the cloud or on servers through Exalto's gateway.

Part of the Exalto Capture docs. Page: https://capture.exalto.ai/docs/hosted-capture. Every page is listed in https://capture.exalto.ai/llms.txt; the whole site in one file is https://capture.exalto.ai/llms-full.txt.

When you can't put the [SDK](https://capture.exalto.ai/docs/sdk) in an agent's code, as with Claude Code or Codex, or when it runs in a CI job, a cloud session or on a server, send its requests through Exalto's capture gateway at `gateway.capture.exalto.ai` instead. The gateway is a capture service run by Exalto for your organization. Each request is recorded in the organization's capture mode and appears under **Captures** in the web app.

**Figure.** With hosted capture, Exalto's gateway takes the SDK's place, so Exalto handles the plaintext and the provider credential in every mode.

1. The client sends an ordinary provider request to the gateway.
2. The gateway runs the provider's TLS session through the notary, which relays encrypted records it cannot read.
3. The notary opens the provider connection and witnesses the session. The proof is computed later, when the Trace is sealed.

Sees plaintext: Your agent, Exalto gateway, Provider. The notary sees ciphertext only.

## Before you start

You need an Exalto account, and an [organization](https://capture.exalto.ai/docs/organizations) whose plan includes capture. A personal organization includes a monthly capture allowance on Free. A team organization on Free has none, so an owner has to choose a plan first.

## Connect a client

1. **Create an API key.** In the web app, open **Settings → API keys** and create a key. New keys have every scope ticked: keep only **Record with the SDK or hosted capture** (`capture:request`), plus **Seal with Exalto** (`notarization:request`) if the key should also seal. The key records for the organization that's active when you create it, and that organization pays for what it captures. The secret is shown once; keep it in your secret manager or CI secrets.
2. **Point the client at the gateway.** Use the gateway's route for your provider, and send the key in a `Capture-Authorization` header. The provider credential stays where the client already keeps it. The examples below read the key from `EXALTO_API_KEY`.
3. **Find the capture.** Each recorded request appears under **Captures**, where you can inspect it and seal it.

### Claude Code

```sh title="Terminal"
export ANTHROPIC_BASE_URL=https://gateway.capture.exalto.ai/anthropic
export ANTHROPIC_CUSTOM_HEADERS="Capture-Authorization: Bearer $EXALTO_API_KEY"
claude -p 'Reply with exactly: hello'
```

Set both before the session starts, and keep `ANTHROPIC_API_KEY` set as usual.

### Codex

```toml title="~/.codex/config.toml"
model_provider = "exalto-hosted"

[model_providers.exalto-hosted]
name = "Exalto hosted capture"
base_url = "https://gateway.capture.exalto.ai/openai/v1"
env_key = "OPENAI_API_KEY"
env_http_headers = { "Capture-Authorization" = "EXALTO_CAPTURE_AUTHORIZATION" }
wire_api = "responses"
supports_websockets = false
```

```sh title="Terminal"
export EXALTO_CAPTURE_AUTHORIZATION="Bearer $EXALTO_API_KEY"
```

### Python clients

```python title="client.py"
import os
from anthropic import Anthropic
from openai import OpenAI

capture = {"Capture-Authorization": f"Bearer {os.environ['EXALTO_API_KEY']}"}
openai = OpenAI(base_url="https://gateway.capture.exalto.ai/openai/v1", default_headers=capture)
anthropic = Anthropic(base_url="https://gateway.capture.exalto.ai/anthropic", default_headers=capture)
```

The gateway serves five fixed routes: `/openai/v1`, `/codex` (for Codex with a ChatGPT login), `/anthropic`, `/openrouter/api/v1` and `/deepseek`, over HTTP/1.1 without WebSockets. A request without a valid key is refused before it reaches the provider. A revoked key can keep working for up to a minute.

## Choose the capture mode

An organization owner sets the mode in the web app, under **Captures → Capture settings**. New organizations start in Notarized.

- **Notarized** captures appear as Captured; seal the ones you need from **Captures**, or through the [API](https://capture.exalto.ai/docs/seal-and-verify#hosted-captures).
- **Witnessed** captures arrive already sealed by the notary's receipt.
- **Off** forwards requests without recording or charging for them. They don't appear under **Captures**.

## What Exalto handles and stores

Hosted capture moves the capture service, and the trust you place in it, from your process to Exalto. The [trust model](https://capture.exalto.ai/docs/trust-model#hosted-capture) explains what that changes about the evidence.

- **Every request, in every mode.** The gateway receives the prompt, the response and the provider credential, because it's what forwards the request. It strips the `Capture-Authorization` header and never logs a credential; its logs name the organization and the key, not the secret.
- **Checkpoints**, encrypted under a key for your organization that Exalto holds. A Notarized checkpoint can rebuild the original request, credential included, and is kept after sealing, so Exalto is able to read it.
- **Trace metadata and previews**, including the first 1,000 characters of each prompt and output and a search index, stored without that encryption.
- **Sealed packages**, stored as their exact bytes.

When no one else should handle your requests or credentials, capture with the [SDK](https://capture.exalto.ai/docs/sdk) in Notarized mode, or don't capture.

## What it costs

Recording a request, Witnessed or Notarized, draws on the organization's monthly capture allowance, measured in bytes the notary handles. Sealing a Notarized capture draws on its sealing allowance. With capture off, nothing is charged. When an allowance runs out, the gateway refuses captured requests rather than forwarding them unrecorded. See [plans and billing](https://capture.exalto.ai/docs/billing).
