# REST API

> Direct REST API access without an MCP client.

Use the REST API directly when your product already owns the workflow and needs structured CAS output in your own backend or app flow.

## Base URL

`https://api.portfoliointel.co.in`

## Authentication

Pass your API key as a header:

- `X-API-Key: sk_live_*`
- `Authorization: Bearer sk_live_*`

## Parse a CAS

**cURL**

```bash
curl -X POST https://api.portfoliointel.co.in/api/v1/parse \
  -H "X-API-Key: sk_live_YOUR_KEY" \
  -F "file=@cas.pdf" \
  -F "password=optional-pdf-password"
```

**Node**

```ts
import fs from 'node:fs';

const form = new FormData();
form.append('file', new Blob([fs.readFileSync('cas.pdf')]), 'cas.pdf');

const res = await fetch('https://api.portfoliointel.co.in/api/v1/parse', {
  method: 'POST',
  headers: { 'X-API-Key': process.env.PI_KEY! },
  body: form,
});
const { data } = await res.json();
console.log(data.snapshot_id);
```

**Python**

```python
import os, requests

with open('cas.pdf', 'rb') as f:
    r = requests.post(
        'https://api.portfoliointel.co.in/api/v1/parse',
        headers={'X-API-Key': os.environ['PI_KEY']},
        files={'file': f},
    )
data = r.json()['data']
print(data['snapshot_id'])
```

> **Note**
>
> All platforms connect to the same `https://api.portfoliointel.co.in/mcp` MCP endpoint. The REST API and MCP endpoint share the same auth model.

## Next steps

- [Parse CAS endpoint](https://docs.portfoliointel.co.in/api-reference/parse)
- [Enrich endpoint](https://docs.portfoliointel.co.in/api-reference/enrich)
- [Quickstart](https://docs.portfoliointel.co.in/quickstart)

Source: https://docs.portfoliointel.co.in/platforms/api/
