Skip to content

API & Agents ​

Agent access lets scripts and AI assistants work with your Plan Count projects. A connected agent can upload drawings, read the text and image of any page, place and move symbols, set up pages, manage rules, zones, line and ring measurements, annotations and legend positions, read the takeoff, and make and download marked-up PDFs and CSV files.

There are three ways in. They all reach the same projects and follow the same rules:

Way inBest forPage
REST APIYour own scripts and servicesREST API, Project Contents
MCP serverAI assistants that can connect to a remote MCP serverMCP Server
Command-line toolTerminals, shell scripts and CICommand-Line Tool

Get the command-line tool with one line (Node.js 20 or newer):

bash
npm install -g @plancount/cli

New here? Follow the Quick Start. It takes you from nothing to a marked-up PDF with a handful of curl commands.

What an agent can do ​

  • Create, rename, archive, duplicate and delete projects, and upload, remove and reorder drawings
  • Read a page's text with positions, and a page as an image
  • Place, move, remove and restore symbols
  • Exclude pages, set a drawing's scale, and leave labels out of the totals
  • Create, change and delete detection rules
  • Create, reshape and delete zones (inclusion, exclusion and area)
  • Create, change and delete linear rules, lines and rings
  • Create, change and delete cloud boxes, text notes and highlights, and move legends
  • Read symbol counts and the full takeoff
  • Make a marked-up PDF or a takeoff CSV, and download it again later

What an agent cannot do ​

These stay in the app and are not available through agent access:

  • Team management: members, roles, seats and invitations
  • Billing: subscriptions, buying credits, invoices
  • Account settings, including creating or revoking API keys
  • Folders and tags
  • Share links
  • AI takeoff. The ai permission exists so keys can be created for it in advance, but no operation uses it yet.

What it costs ​

Agent access uses the same credits as the app, taken from the workspace the key or connection belongs to.

ActionCost
Connecting, listing, reading counts, text, images and takeoff numbersFree
Changing project contents (symbols, pages, rules, zones, lines, rings, annotations, legends, project management)Free
Uploading a drawing1 credit for each page uploaded
ExportingThe same as exporting in the app (see below)

An export is free when your workspace's plan includes unlimited exports. Otherwise a marked-up PDF of one drawing costs 1 credit for each page that has symbols (free when no page has one), a marked-up PDF of two or more drawings costs 1 credit for each page that is not excluded, and a CSV costs 1 credit. You can always ask for the price first. See Exports.

You can cap what any one request spends with max_credits, and cap what a whole key or connection can spend with a daily credit limit. Amounts are always credits, never money.

Permissions (scopes) ​

Every key and every connected app has a set of permissions, called scopes:

ScopeAllows
readSee projects, drawings, counts, takeoff numbers, credits and exports, and download files
uploadAdd drawings and make exports, which can spend credits. It does not include read; give a key both when it needs both
editChange project contents and manage projects. Changes are free
aiReserved for future AI features. No operation uses it yet

A request needs the scope of the operation it calls. A key without it gets INSUFFICIENT_SCOPE and nothing is changed. A key that will only look at projects needs only read.

TIP

Give a key only the scopes it needs. A key with only read and edit can change a project but can never spend credits.

Workspaces ​

A key or connection belongs to one workspace: your personal workspace, or one team you have a seat on. It can only see projects in that workspace. A project outside the workspace answers as if it does not exist (PROJECT_NOT_FOUND). Credits come from that workspace's balance.

A team key stops working as soon as its owner is removed from the team, leaves it, or loses their seat.

Daily credit limit ​

A key or a connected app that can spend credits (upload) can have a daily credit limit. It caps what the key can spend in the last 24 hours, counting from now and not from midnight. When a request would take the key over the limit, it is refused with KEY_DAILY_LIMIT_EXCEEDED and the answer says when some of the allowance frees up. Work that has already started can finish. You can set, raise, lower or remove the limit at any time from the Account page, and the change applies to the key's next spend.

Keys and connected apps ​

There are two kinds of access:

  • API keys are long secrets that start with pc_live_. You create one on the Account page under API keys, choose its workspace and scopes, and optionally when it expires. You need a verified email address. The full key is shown once. Copy it straight away and store it somewhere safe. If you lose it, revoke it and create another.
  • Connected apps use sign-in instead of a pasted key. An AI assistant that supports remote MCP servers sends you to a Plan Count screen where you choose the workspace, the permissions and an optional daily limit, then approve. See MCP Server.

Send a key as Authorization: Bearer <key>. Never put a key in a web page, a public repository or a shared chat.

Revoking access ​

  • API key: open Account, find the key in the API keys list and click Revoke. It stops working immediately.
  • Connected app: open Account, find the app under Connected apps and click Disconnect. The app's access stops at once.

If you suspect a key has leaked, revoke it first and look at Account > credit history afterwards.

Limits you should know about ​

  • Each key can make 120 requests per minute. Requests to the REST API and to the MCP server count together. Over that, the answer is 429 with code RATE_LIMITED and a Retry-After header. The same code is returned when too many failed key attempts come from one address.
  • A batch holds 1 to 500 operations.
  • Page images are drawn at 36 to 200 dpi.
  • A made export can be downloaded again for 7 days.

Next steps ​

Plan Count User Guide