Governance & Policy Engine

Custom Keywords & REST API

Enforce project codenames, client rosters, database schemas, and proprietary credentials across every surface. Manage policies in the dashboard or via the REST API, and sync instantly to Cursor, VS Code, and backend services.

How do I route v0 traffic to Llama-3?
Priority 1

Strict Block (Hard Stop)

If an outbound prompt, diff, or file contains a Strict Block term, Spendplane halts the request immediately with an HTTP 412 Precondition Failed. The prompt is aborted before any bytes touch external cloud LLMs.

Priority 2

Auto-Mask & Rehydrate

Replaces sensitive terms with ephemeral numbered tokens (e.g. [CLIENT_01]) before upstream egress. When the model responds, Spendplane automatically restores the original text locally in the editor or stream.

Governance Scopes & Policy Inheritance

Spendplane enforces a 3-tier hierarchy. Enterprise-level policies cascade down to all workspaces and devices, while team leads can layer project-specific terms on top.

Org Scope (`org`)

Mandatory Organization Lock

Defined by CISOs and Org Admins. Automatically pushed to every developer, workspace, and IDE key. Cannot be deleted or disabled by workspace members.

Team Scope (`team`)

Shared Team Dictionary

Shared across an entire engineering department or workspace. Protects internal service hostnames, client lists, and common table names.

Project Scope (`project`)

Microservice Overrides

Scoped to a specific repo or project key. Ideal for contractors or isolated client deliverables requiring custom redaction lists.

Real-Time Sync with Coding Tools

Latency: <1ms in-memory trie

Whenever a keyword is created or modified in the dashboard, the Spendplane Gateway cache updates immediately. The very next prompt or autocomplete request sent by an engineer’s Cursor, VS Code, or CLI automatically enforces the latest rules without requiring IDE restarts or key rotation.

Cursor / IDE Configuration
# In Cursor Settings > Models > OpenAI API Key
OPENAI_BASE_URL="https://api.spendplane.com/v1"
OPENAI_API_KEY="sp_live_team_xxxxxxxxxxxx"
Terminal CLI & Python / Node
# Direct environment export
export OPENAI_BASE_URL="https://api.spendplane.com/v1"
export OPENAI_API_KEY="sp_live_team_xxxxxxxxxxxx"

Programmatic REST API

Automate keyword synchronization from CI/CD, internal compliance tools, or HR offboarding scripts using your Spendplane API key (Bearer sp_live_...).

GET/v1/privacy-rules

List all active custom keywords, priority levels, governance scopes, and current plan limits.

# Query active rules
curl https://api.spendplane.com/v1/privacy-rules \
  -H "Authorization: Bearer sp_live_team_xxxxxxxxxxxx"
POST/v1/privacy-rules

Create a new custom keyword or regex rule with strict block or auto-mask priority.

# Create a Strict Block rule
curl -X POST https://api.spendplane.com/v1/privacy-rules \
-H "Authorization: Bearer sp_live_team_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"term": "Project Falcon", "priority": "block", "scope": "team", "type": "exact"}'
POST/v1/privacy-rules/bulk

Bulk import up to 500 keywords at once from a client roster, CSV, or secret scanner.

# Bulk import keywords
curl -X POST https://api.spendplane.com/v1/privacy-rules/bulk \
-H "Authorization: Bearer sp_live_team_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"rules": [
{"term": "acme_prod_db", "priority": "block", "scope": "team"},
{"term": "Pfizer Internal", "priority": "mask", "scope": "team"}
]}'
GET/v1/privacy-rules/sync

Lightweight sync endpoint used by Spendplane Desktop, CLI daemons, and MCP servers to maintain local offline rule caches.

Keyword Limits Across Plans

PlanCustom KeywordsPriority ControlsGovernance Scope
FreeUp to 5 termsAuto-Mask onlyPersonal Workspace
ProUp to 50 termsStrict Block + Auto-MaskSynced across Mobile, Desktop & IDEs
TeamsUp to 500 termsStrict Block + Team DictionaryShared team dictionary + Slack leak alerts
EnterpriseUnlimited + RegexOrg-wide locked policiesSIEM alert stream, Private VPC & SCIM