Sections
API key or sign-in
API reference
One API serves the PaperVantage website, the MCP server and pv, the command line. Everything an AI agent can do through MCP is a route here, and an API key reaches exactly those routes.
Getting started
- Create an API key on the MCP setup page (choose any client and the API key option). It is shown once.
- Call
https://api.papervantage.comwith the headerAuthorization: Bearer <key>. (Dev:https://api.dev.papervantage.com.)
curl 'https://api.papervantage.com/auth/session' -H "Authorization: Bearer $PV_API_KEY"
# {"user_id": 42, "member": false, "assistant_turn": false}The website signs in with Cognito and sends its access token the same way. Routes marked Website sign-in only or Site owners only accept only that token, never an API key, so a leaked key can't reach your account, billing or key management.
Quota
The free plan includes 100 calls per rolling 30 days; members are unlimited. A request with an API key is one call. To count several requests as one (an MCP tool or a pv command that needs more than one), send the same X-PV-Call id on each: it is charged once. Website use is never counted. Over the allowance the API answers 429:
{"detail": "Free plan MCP limit reached (100 tool calls per rolling 30 days). Upgrade for unlimited calls: https://papervantage.com/account"}Errors
Errors are JSON: {"detail": "message"}.
401: missing, invalid or expired credentials.403: not allowed (for example, a members-only feature).404: not found, or not yours (the API doesn't say which).422: bad input.detailis a message, or a list of{"loc": [...], "msg": "..."}naming each field that failed.429: a quota or limit was reached.502: a service PaperVantage depends on failed; try again later.
A write by the in-paper assistant can instead answer 202 with {"status": "pending_confirmation", "pending_action_id": 7, "summary": "..."}: nothing changed until the member confirms it in the app. Other clients never get a 202.
Headers
Authorization: Bearer <API key or access token>: required except on public routes.X-PV-Call: optional, 8-64 letters, digits or dashes. Requests sharing one id within two minutes are charged as one call.X-PV-Client: optional, your client's name and version (e.g.my-agent/1.0). Project changes made through the API appear in the project's activity log under this name.
Limits
Each request has 30 seconds to finish. Long work returns early and is polled: creating an animation waits at most wait_seconds (keep it at 25 or less), then you check it with GET /animations/{animation_id}; imports report progress at GET /papers/imports. Lists are paged with limit and an opaque cursor (pass back next_cursor); search and the feed use page and per_page.
pv, the command line
pv wraps this API: one command per agent route below, JSON output when piped, and documented exit codes. Each command counts as one call.
Not published yet: pv isn't on PyPI, so it can't be installed yet. This is how it will work.
pv auth login # paste your API key
pv papers search "diffusion models"
pv projects add-paper 7 123 456
pv schema papers search # a command's parameters and result, as JSONMCP
AI clients such as Claude Code, Claude Desktop, opencode and Codex can use these routes as MCP tools. Each route below names its tool. Set-up instructions are on the MCP setup page.
Routes
API key or sign-in
- Checking a key (1): Check a credential: whose it is, and whether they are a member.
- Evidence (6): Saved passages (pointers into a paper's transcript) and notes, per project
- Project files (4): A project's own files (members)
- Imports and private documents (10): Bring papers into the library, and the member's private documents
- Library (6): Find papers and passages across the library
- Animations (2): Agent-made animations (members). More media routes that only the website uses are under "Website routes".
- Papers (API key) (5): One paper: metadata, transcript, references, rating. More papers routes that only the website uses are under "Website routes".
- Projects (API key) (14): The member's projects: papers, brief, reading-list ranking, exports. More projects routes that only the website uses are under "Website routes".
- Skills (API key) (2): Research workflows (skills) to follow step by step. More skills routes that only the website uses are under "Website routes".
Website routes
Documented for completeness. They need a website sign-in (or are owner-only or public) and don't accept an API key.