# Register (agent keys)

> POST /api/v1/register — an agent mints its own test key with no signup form.

An agent that finds Portfolio Intel with no credentials can issue itself a
free test key in one unauthenticated call. No browser, no human.

## Discover

The MCP server card says what the server is and how to reach it
([SEP-1649](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1649)):

```bash
curl -s https://api.portfoliointel.co.in/.well-known/mcp/server-card.json
```

```json
{
  "name": "portfolio-intel",
  "transport": { "type": "streamable-http", "endpoint": "https://api.portfoliointel.co.in/mcp" },
  "capabilities": { "tools": true, "resources": false, "prompts": false },
  "authentication": {
    "type": "oauth2",
    "discovery": "https://api.portfoliointel.co.in/.well-known/oauth-authorization-server"
  },
  "documentation": "https://docs.portfoliointel.co.in/"
}
```

## Register

`POST https://api.portfoliointel.co.in/api/v1/register`

All body fields are optional.

| Field | Type | Notes |
| --- | --- | --- |
| `label` | string | Up to 120 characters. Default `Agent self-serve key`. |
| `scope` | string[] | Any of `parse`, `enrich`. Default both; unknown values are dropped. |
| `claim_email` | string | Where the claim should go, if you already know the owner. |

```bash
curl -s -X POST https://api.portfoliointel.co.in/api/v1/register \
  -H "Content-Type: application/json" \
  -d '{"label":"my-agent"}'
```

```json
{
  "success": true,
  "api_key": "sk_test_…",
  "key_id": "…",
  "type": "test",
  "credits_remaining": 30,
  "expires_at": "2026-10-02T09:00:00.000Z",
  "claim_code": "…",
  "claim_url": "https://portfoliointel.co.in/portal?claim=…"
}
```

The key is a `sk_test_` key with **30 credits** (about 3 parses), a 60
requests/minute rate limit, and a **7-day** expiry. `api_key` is shown once —
store it. Claiming the key (below) raises it to 100 credits in total and 30
days from the claim; credits already spent stay spent.

## Hand it to a human

`claim_url` lets a person attach the key to their account in the developer
portal. Give it to your user if the key should outlive the session: an
unclaimed key expires after 7 days.

## Limits

| Where | Limit | Response |
| --- | --- | --- |
| Edge (per IP) | 3 registrations per hour | `429` |
| Origin (per network) | 5 registrations per 24 hours | `429 RATE_LIMITED`, `Retry-After: 86400` |
| Origin (all callers) | Fixed number of new keys per UTC day | `429 DAILY_CAP_REACHED`, `Retry-After` until 00:00 UTC |

A network is an IPv4 address, or an IPv6 /64.

| Status | Code | When |
| --- | --- | --- |
| `400` | `INVALID_LABEL` | `label` longer than 120 characters |
| `400` | `INVALID_EMAIL` | `claim_email` is not an email address |
| `429` | `RATE_LIMITED` | See above |
| `429` | `DAILY_CAP_REACHED` | The day's free keys are used up |

> **Note: Two hosts**
>
> Register on `api.portfoliointel.co.in`. To try the key against the bundled
> sandbox statements, send `pdf_ref` to `https://portfoliointel.co.in/api/v1/parse`
> — see [Parse CAS → Sandbox samples](https://docs.portfoliointel.co.in/api-reference/parse#sandbox-samples).

Source: https://docs.portfoliointel.co.in/api-reference/register/
