Auth · limits · errors
The contract behind every call: the key, the ceilings, the error codes, paging and request ids.
Authentication
Send the key as Authorization: Bearer pnl_…. It is shown once, when it is minted or bought, and stored only as a hash: a lost key is replaced, never recovered.
- No key is a caller too, on the MCP server and the REST tools: the public tier, the free reads, 20 rows a call. A door the API reference marks as needing a key answers 401 without one.
- A data key reads, and only reads. Its plan decides the menu and the ceilings. Mint a free one in the Builder API window; the plans are on Plans & keys.
- Keep it on a server. Anything in a browser bundle is public, and a browser’s EventSource cannot send the header anyway.
- Revoke with the key itself:
DELETE /api/keyson the site host.
A key authenticates reads. It cannot approve spending, sign a transaction, or stand in for a wallet.
Limits
Two ceilings, counted apart: calls a day, which reset at 00:00 UTC, and a pace a minute, which refills on its own. Either answers 429 with Retry-After. A failed call costs nothing.
Every door that runs a read counts against the same day: the MCP server, the REST tools, POST /v1/skills/run, and each stream you open. The public tier also caps a call at 20 rows.
Usage
Ask what is left: the get_usage tool on MCP or REST, or GET /api/usage on the site host with the same key. Neither shows or grants anything beyond the key that asks.
curl https://pnl.meme/api/usage \
-H "Authorization: Bearer pnl_..."
Errors
Every error has one shape, whatever failed behind it. Branch on code; quote request_id when you report one.
{
"error": {
"code": "permission_denied",
"message": "\"network.smart\" is not included in this key's plan. It is available from the pro plan.",
"type": "permission_error",
"request_id": "<uuid>",
"required_plan": "pro"
}
}
On the MCP server
A key that does not authenticate is the 401 above, before any message is read. After that the server answers in JSON-RPC: a protocol error is the client’s to fix, a tool error the model’s to read.
Headers
Paging
- A list takes
limit, bounded per tool (the bounds are on Tools). Past the bound is a 400 naming the field. On the public tier a largerlimitis lowered to 20. - The leaderboard pages by
offset; its answer carriesnext_offsetfor the page after. - The pump.fun launch feed pages by
after: theseqthe last page ended on. - get_changes_since keeps a named cursor per key: each call answers what changed since the last one and moves it.
- The partner Data APIs page by an opaque cursor handed back verbatim; each one’s page states its rule.