API Documentation

Programmatic access to all PrimeDeck tools. Works with Zapier, custom scripts, MCP, or anything that speaks HTTP.

Getting started

  1. Go to your Account pageand create an API key. You'll see the plaintext once — save it.
  2. Include the key as a Bearer token on every request.
  3. Each call uses one operation from your plan or a pay-per-use credit.

Authentication

All endpoints require a valid API key in the Authorization header:

Authorization: Bearer bsk_your_api_key_here

Keys start with bsk_. Revoke any key at any time from your Account page.

Rate limits & quotas

  • Burst limit: 10 requests per minute per user
  • Monthly quota: defined by your plan (Free 3, Pro 50, Business unlimited)
  • PPU fallback: when quota is exhausted, pay-per-use credits ($4.99 each) are consumed automatically
  • 429 Too Many Requests: wait and retry with exponential backoff
  • 403 Forbidden: at limit with no credits — upgrade or buy credits from Account

Endpoints

POST/api/v1/contracts

Analyze a contract (lease, NDA, employment agreement, etc)

Request body:

{ "text": "...full contract text...", "fileName": "lease.txt", "save": true }

Returns: { "analysis": { ... } } · Set "save": false to skip dashboard persistence (analysis-only mode).

POST/api/v1/policies

Analyze an insurance policy

Request body:

{ "text": "...policy text...", "fileName": "home-policy.txt", "save": true }

Returns: { "analysis": { ... } } · Set "save": false to skip dashboard persistence (analysis-only mode).

POST/api/v1/medical-bills

Find errors and overcharges in a medical bill

Request body:

{ "text": "...bill text...", "fileName": "hospital-bill.txt", "save": true }

Returns: { "analysis": { ... } } · Set "save": false to skip dashboard persistence (analysis-only mode).

POST/api/v1/cover-letters

Generate a targeted cover letter

Request body:

{
  "jobPosting": "...full job description...",
  "resume": "...your resume...",
  "tone": "professional",
  "title": "Senior PM — Stripe",
  "notes": "emphasize my startup experience",
  "companyUrl": "https://stripe.com",
  "save": true
}

Returns: { "letter": { ... } } · Set "save": false to skip dashboard persistence (analysis-only mode).

POST/api/v1/proposals

Generate a client proposal from a brief

Request body:

{ "brief": "...project description...", "title": "Website redesign — Acme Corp", "save": true }

Returns: { "proposal": { ... } } · Set "save": false to skip dashboard persistence (analysis-only mode).

POST/api/v1/policy-compare

Compare 2-5 insurance policies side-by-side

Request body:

{
  "title": "Auto policy shopping",
  "policies": [
    { "label": "Geico", "text": "..." },
    { "label": "Progressive", "text": "..." }
  ],
  "save": true
}

Returns: { "comparison": { ... } } · Set "save": false to skip dashboard persistence (analysis-only mode).

Example: analyze a contract

curl https://www.primedeck.ai/api/v1/contracts \
  -H "Authorization: Bearer bsk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "THIS CONSULTING AGREEMENT is entered into...",
    "fileName": "consulting.txt"
  }'

Zapier

Use Zapier's built-in Webhooks by Zapier app:

  1. Trigger: whatever starts your workflow (new email, new row, etc)
  2. Action: Webhooks by Zapier → POST
  3. URL: https://www.primedeck.ai/api/v1/contracts (or any endpoint above)
  4. Headers: Authorization: Bearer bsk_...
  5. Payload type: JSON
  6. Data: { "text": "..." }

MCP (Claude Desktop / Claude Code)

PrimeDeck ships an official MCP server that lets Claude invoke any tool directly from your desktop or editor.

npx @primedeck/mcp-server

Configure with PRIMEDECK_API_KEY env var. See the MCP server README for Claude Desktop / Claude Code setup.

Disclaimer: The API surfaces the same AI outputs as the web app. Each call counts as one operation. Output is a draft — review before acting on analyses or sending generated documents.