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

# RCI for EHR & Platform Builders

> Embed billing knowledge into your product — API, MCP server, and webhooks

You're building healthcare software. Your users — billers, providers, administrators — all need billing knowledge. Instead of building and maintaining billing rule engines yourself, embed RCI.

## What RCI does for your product

### Replace internal billing logic

| You currently maintain...        | RCI replaces it with...                                          |
| -------------------------------- | ---------------------------------------------------------------- |
| Fee schedule lookup tables       | `POST /v1/knowledge/payment-calc` — MPFS calculation with GPCI   |
| Payer rules database             | L4 layer — timely filing, prior auth, appeal deadlines per payer |
| Billing form determination logic | L2 layer — CMS-1500 vs UB-04 from facility type                  |
| POS code mapping                 | L3 layer — place of service from care setting + facility         |
| Coding guidance features         | `POST /v1/agents/code-research` — AI-powered code research       |
| Denial management rules          | `POST /v1/agents/denial-resolution` — AI denial resolution       |
| Medical necessity checking       | `POST /v1/agents/medical-necessity` — NCD/LCD validation         |

### Keep your data fresh

CMS updates fee schedules, GPCI values, and coding rules annually. Payers change their rules constantly. RCI handles these updates — you don't have to.

## Three integration methods

### 1. REST API (server-side)

Direct HTTP calls from your backend. Best for server-side rendering, batch processing, and backend workflows.

```python theme={null}
import httpx

class RCIClient:
    def __init__(self, api_key: str, base_url: str = "https://api-dev.rcintell.com"):
        self.client = httpx.AsyncClient(
            base_url=base_url,
            headers={"X-API-Key": api_key, "Content-Type": "application/json"},
            timeout=30.0,
        )

    async def resolve(self, ccn: str, cpt: str = None, payer: str = None, care_setting: str = None):
        resp = await self.client.post("/v1/knowledge/resolve", json={
            k: v for k, v in {
                "ccn": ccn, "cpt": cpt, "payer": payer, "care_setting": care_setting,
            }.items() if v is not None
        })
        resp.raise_for_status()
        return resp.json()

    async def payment(self, ccn: str, cpt: str):
        resp = await self.client.post("/v1/knowledge/payment-calc", json={"ccn": ccn, "cpt": cpt})
        resp.raise_for_status()
        return resp.json()

    async def billing_guide(self, ccn: str, cpt: str, payer: str = None):
        body = {"ccn": ccn, "cpt": cpt}
        if payer:
            body["payer"] = payer
        resp = await self.client.post("/v1/knowledge/billing-guide", json=body)
        resp.raise_for_status()
        return resp.json()

    async def code_research(self, query: str, ccn: str = None):
        body = {"query": query}
        if ccn:
            body["ccn"] = ccn
        resp = await self.client.post("/v1/agents/code-research", json=body)
        resp.raise_for_status()
        return resp.json()
```

```typescript theme={null}
interface ResolveParams {
  ccn: string;
  cpt?: string;
  payer?: string;
  careSetting?: string;
}

class RCIClient {
  constructor(private apiKey: string, private baseUrl = "https://api-dev.rcintell.com") {}

  private async request(method: string, path: string, body?: object) {
    const res = await fetch(`${this.baseUrl}${path}`, {
      method,
      headers: { "X-API-Key": this.apiKey, "Content-Type": "application/json" },
      body: body ? JSON.stringify(body) : undefined,
    });
    if (!res.ok) throw new Error(`RCI ${res.status}: ${await res.text()}`);
    return res.json();
  }

  resolve(params: ResolveParams) {
    return this.request("POST", "/v1/knowledge/resolve", {
      ccn: params.ccn,
      cpt: params.cpt,
      payer: params.payer,
      care_setting: params.careSetting,
    });
  }

  payment(ccn: string, cpt: string) {
    return this.request("POST", "/v1/knowledge/payment-calc", { ccn, cpt });
  }

  billingGuide(ccn: string, cpt: string, payer?: string) {
    return this.request("POST", "/v1/knowledge/billing-guide", { ccn, cpt, payer });
  }
}
```

### 2. MCP Server (for AI features)

If your product has AI features (copilots, assistants, chatbots), connect them to RCI via the MCP server:

```json theme={null}
{
  "mcpServers": {
    "rci-knowledge": {
      "type": "http",
      "url": "https://api-dev.rcintell.com/v1/mcp",
      "headers": {
        "X-API-Key": "kp_test_..."
      }
    }
  }
}
```

Your AI features can then call `resolve_knowledge`, `calculate_payment`, `research_code`, and `resolve_denial` as tools.

### 3. Agent callbacks (async jobs only)

Agent endpoints return `202` with a `job_id`. Poll `GET /v1/agents/jobs/{job_id}`, or pass `callback_url` (and `callback_secret`) on submit. There is no `POST /v1/webhooks` registry. See [Agent callbacks](/docs/webhooks).

```bash theme={null}
curl -X POST https://api-dev.rcintell.com/v1/agents/code-research \
  -H "X-API-Key: kp_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "query": "CPT for total knee arthroplasty?",
    "callback_url": "https://your-platform.com/webhooks/rci-agent",
    "callback_secret": "whsec_your_shared_secret"
  }'
```

## Where RCI fits in your product

| Product type                | Integration point | RCI feature                                          |
| --------------------------- | ----------------- | ---------------------------------------------------- |
| **EHR**                     | Order entry       | Prior auth check (L4), medical necessity (agent)     |
| **EHR**                     | Charge capture    | Billing form (L2), POS code (L3), modifiers (L5)     |
| **Practice Management**     | Claims review     | Full L1-L6 validation before submission              |
| **Billing Platform**        | Coding workflow   | Code research agent, documentation requirements      |
| **Billing Platform**        | AR follow-up      | Filing deadlines (L4), denial resolution (agent)     |
| **Patient Portal**          | Cost transparency | Payment estimate (L6) for patient responsibility     |
| **Revenue Cycle Analytics** | Benchmarking      | MPFS expected payment as baseline for payer analysis |
| **Clearinghouse**           | Claim scrubbing   | L1-L4 validation, form/POS/modifier checks           |
| **Payer Platform**          | Adjudication      | Coding validation, medical necessity checks          |

## Pricing for platforms

| Plan           | Requests     | Best for                          |
| -------------- | ------------ | --------------------------------- |
| **Free**       | 1,000/month  | Prototyping and development       |
| **Pro**        | 50,000/month | Production with moderate volume   |
| **Enterprise** | Unlimited    | High-volume platforms, custom SLA |

See [accounts and billing](/accounts-and-billing) for full details.
