# Quickstart

> Parse your first CAS PDF in 5 minutes.

Get from API key to first parse quickly, then decide whether your product should stay on REST or move into MCP.

1. **Get an API key**

   Sign up in the developer portal and generate a key at [portfoliointel.co.in/developers](https://portfoliointel.co.in/developers) — or, from an agent or a script, [register one with a single call](https://docs.portfoliointel.co.in/api-reference/register):

   ```bash
   curl -s -X POST https://api.portfoliointel.co.in/api/v1/register
   ```

   | Prefix | Environment | Notes |
   | --- | --- | --- |
   | `sk_test_*` | Test | Free credit allowance; parses real PDFs and the [sandbox samples](https://docs.portfoliointel.co.in/api-reference/parse#sandbox-samples). |
   | `sk_live_*` | Production | Real parsing, billing, and operational limits apply. |

2. **Parse your first CAS**

   **cURL**

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

   **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},
       )
   print(r.json()['data']['snapshot_id'])
   ```

3. **Read the response shape**

   ```json
   {
     "success": true,
     "data": {
       "snapshot_id": "snap_abc123",
       "investor_name": "ADITYA SHARMA",
       "as_of_date": "2024-12-31",
       "source": "CAMS",
       "statement_type": "DETAILED",
       "total_value": 1250000,
       "folio_count": 3,
       "mutual_funds": [
         {
           "name": "Axis Bluechip Fund - Direct Growth",
           "isin": "INF846K01EW2",
           "units": 500.123,
           "nav": 52.34,
           "value": 26174.44
         }
       ],
       "confidence": { "document": 0.95, "level": "HIGH" }
     }
   }
   ```

4. **Decide the right integration surface**

   - Use the REST API if your product already owns the workflow and just needs structured CAS output.
   - Use MCP if your users work inside Claude, Cursor, Copilot, or another MCP-capable client.
   - Use the browser tool when you want the most privacy-preserving individual-investor experience.

## Next steps

- [Enrich holdings](https://docs.portfoliointel.co.in/api-reference/enrich)
- [Connect Claude Desktop](https://docs.portfoliointel.co.in/platforms/claude-desktop)
- [Run a skill](https://docs.portfoliointel.co.in/skills)

Source: https://docs.portfoliointel.co.in/quickstart/
