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

# Keys and limits

> Sandbox and live keys, claiming a key, scopes, rate limits and request headers.

Send the key on every call except `POST /v1/keys`, `POST /v1/certificates/verify` and `GET /.well-known/jwks.json`:

```
Authorization: Bearer abacus_sk_test_...
```

The same key works for the REST API and the [MCP server](https://docs.abacuslabs.ai/mcp-server.md).

## Two kinds of key

| | Sandbox key | Live key |
| - | - | - |
| Prefix | `abacus_sk_test_` | `abacus_sk_live_` |
| How to get it | `POST /v1/keys`, no sign-up. Or the dashboard. | The dashboard, after sign-up: [app.abacuslabs.ai](https://app.abacuslabs.ai/signup) (Google, GitHub or email). |
| Calls a day | 1,000 per key | 200,000 per key |
| Data | Real market data and the same engine as live keys | Same |
| Credits and portfolios | Your organisation's plan | Your organisation's plan |

Both kinds call the same API and spend the same credits. Every key comes with three demo accounts: `acct_demo_concentrated`, `acct_demo_etf` and `acct_demo_tech`. Demo accounts do not count toward your plan's portfolio limit.

## Get a sandbox key in one call

```bash theme={null}
curl -s -X POST https://api.abacuslabs.ai/v1/keys -H "Content-Type: application/json" -d '{"use": "my-agent"}'
```

| Field | Required | Meaning |
| - | - | - |
| `use` | no | A label for the key, such as your agent's name. |
| `email` | no | A contact address. Leave it out for an anonymous key. |

`201 Created`. The response holds `key` (shown once), `key_id`, `org_id`, `kind`, `plan`, `scopes`, `limits`, `claim_url`, `accounts` (the three demo accounts) and `next` (a first call to make). Each demo account has a `try` hint: a question to analyze and a goal to propose. Keep the key in an environment variable, such as `ABACUS_API_KEY`; the examples in these docs use that name. A key made this way starts a new organisation on the free Personal plan: 3 portfolios and 300 credits a month. See [Credits and plans](https://docs.abacuslabs.ai/credits.md).

## Claim a key

An agent can get a key before any human signs up. `claim_url` (`https://app.abacuslabs.ai/claim?token=...`) is valid for 7 days. Show it to your human. When they sign in there, the key and its saved accounts move into their organisation, and the key then uses their plan and credits. The key itself does not change.

## Live keys and the dashboard

Sign up at [app.abacuslabs.ai/signup](https://app.abacuslabs.ai/signup). In the dashboard you can create, roll and revoke keys (live or sandbox), see usage and request logs, choose a plan, buy credits and set a monthly spend cap for the organisation. A revoked key answers `401 unauthorized` at once.

## Scopes

Every key has the scopes `read`, `propose` and `commit`.

| Scope | Calls |
| - | - |
| `read` | `POST /v1/analyze`, `GET /v1/proposals/{id}`, `GET /v1/commits/{id}` |
| `propose` | `POST /v1/proposals`, `POST /v1/trades/check` |
| `commit` | `POST /v1/commits` |

`/v1/accounts` calls work with any valid key. A call without the scope it needs answers `403 forbidden`.

## Rate limits

| Limit | Value | When you pass it |
| - | - | - |
| Calls per key | 1,000 a day for a sandbox key, 200,000 for a live key (UTC days; every authenticated call counts) | `429 rate_limited` until 00:00 UTC |
| New sandbox keys | 20 an hour per IP address | `429 rate_limited` |
| Credits | Your plan's monthly credits | `402 credits_exhausted` |
| Portfolios | Your plan's portfolio limit | `402 portfolio_limit_reached` |

Polling a running proposal counts as a call. Use `?wait=N` on `GET /v1/proposals/{id}` so one call waits up to N seconds (see [Proposals](https://docs.abacuslabs.ai/concepts/proposals.md#async-proposals-and-polling)).

## Request ids and versions

Every response has these headers:

| Header | Meaning |
| - | - |
| `X-Request-Id`, `Abacus-Request-Id` | The request id. Quote it when you report a problem. Send your own `X-Request-Id` header to set it. |
| `Abacus-Version` | The API version used, for example `2026-11-15`. Send `Abacus-Version: 2026-11-15` to pin it; a date that is not a released version answers `400 unsupported_api_version`. See [Errors](https://docs.abacuslabs.ai/errors.md). |
| `Abacus-Api-Version` | The schema version of commits and certificates, for example `2026-11-12`. It is not the API version. |

`POST /v1/analyze`, `POST /v1/proposals`, `POST /v1/trades/check` and `POST /v1/accounts` also take an optional `Idempotency-Key` header: a retry with the same key returns the first answer and charges nothing again. `POST /v1/commits` always needs one. See [Errors](https://docs.abacuslabs.ai/errors.md).

Every authenticated `/v1` call also returns `Abacus-Credits-Charged` and `Abacus-Credits-Remaining`. See [Credits and plans](https://docs.abacuslabs.ai/credits.md#headers).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.