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

# CapOut API

> Upload insurance PDFs through REST or MCP, track status, stream updates, and monitor claims.

CapOut gives you a straightforward API for submitting insurance PDFs for automatic Xactimate export, following each document through processing, and subscribing to status changes as work completes. If you are working in Codex, Claude Code, Gemini CLI, OpenCode, GitHub Copilot CLI, or another MCP-aware client, CapOut also exposes the same workflow through the hosted MCP endpoint `https://mcp.capout.ai/mcp`.

## Base endpoints

* REST: `https://api.capout.ai`
* WebSocket status stream: `wss://api.capout.ai/ws/status`
* SSE status stream: `https://api.capout.ai/sse/status`

## Core workflow

1. Send `capout-api-key` on REST requests.
2. Upload a PDF for automatic Xactimate export with `POST /upload`.
3. Poll `GET /status/{document_id}` or subscribe to realtime updates while the export workflow runs.
4. Read claim balances with `GET /claims`.

## MCP setup

For Codex, install CapOut MCP with:

```bash theme={null}
codex mcp add capout --url https://mcp.capout.ai/mcp
```

CapOut's hosted MCP endpoint is:

```text theme={null}
https://mcp.capout.ai/mcp
```

For copyable setup examples in Codex, `npx add-mcp`, Claude Code, Gemini CLI, OpenCode, and GitHub Copilot CLI, see [MCP Installation](/mcp/installation).

## Start here

* [Quickstart](/quickstart) for the shortest end-to-end path.
* [Authentication](/authentication) for API key and realtime token behavior.
* [CapOut MCP](/mcp/overview) for ChatGPT, Claude, Codex, and other agent clients.
* [Upload a document](/guides/upload-a-document) for request design and upload tradeoffs.
* [Realtime updates](/guides/realtime-updates) for WebSocket and SSE examples.
* [API reference overview](/api-reference/overview) for the full endpoint map.

## What the API covers

### Uploads

Submit an insurance PDF either by passing a public `url` or by sending `file_base64`, with `xn_address` and `profile_code` for the Xactimate export. Every accepted upload returns a `document_id` you can track immediately through the workflow.

For agent-driven workflows, the CapOut MCP can also process PDFs directly and uses a staged local upload flow for local files because the CapOut MCP is hosted remotely.

### Status tracking

Use `GET /status/{document_id}` when polling a single job, or `GET /documents` when you need the authenticated organization's recent uploads and their workflow state.

### Realtime delivery

Call `POST /ws/token` to mint a short-lived token, then connect over WebSocket or SSE using that token as a query parameter.

### Claims

Use `GET /claims` to see the current organization claim balance plus any buckets that expire soon. A live Xactimate export uses 1 claim.
