PERMISYN
Developer guide

AI authorization at the model boundary

Permisyn is how your whole team and its agents share one company AI key, safely: your app keeps using its existing OpenAI-compatible client, Permisyn sits in the request path, authorizes or denies the call before upstream execution — carrying who made it and which team — and signs the resulting evidence. It is not a generic model gateway or tracing library.

AuthorizeEvery call is checked against policy before it reaches the model.
DenyStop killed, unsafe, or over-budget agents.
AccountAttach user, team, purpose, risk label, tokens, and cost.
ProveEd25519-sign every call; anyone verifies with your public key.
Fast pathThis guide has 59 topics across 5 chapters — most people only ever need these 3.
1
Get your key
Copy your key from Settings — it's how Permisyn knows which org is calling.
2
Point your client at Permisyn
Change your base URL to api.permisyn.com/v1. Everything else about your existing OpenAI/Anthropic client stays the same.
3
Add one header
X-Permisyn-Agent names who's calling. That's the minimum to see a real signed decision.
See the actual code below ↓
Chapter 01 of 058 topics

Start here

Point an existing client at Permisyn and get a signed decision back — the request shape, the headers that carry identity, and the sandbox to try it in.

Start here · Topic 01 of 08

Quickstart

Change the model base URL, keep your upstream provider key in your runtime, send the Permisyn key as authorization context, and label traffic with agent identity, sponsor, risk, purpose, and budget.

proxy-quickstart.sh
export OPENAI_BASE_URL=https://api.permisyn.com/v1
export PERMISYN_API_KEY=psyn_live_...
export OPENAI_API_KEY=$YOUR_PROVIDER_KEY

curl https://api.permisyn.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Permisyn-Key: $PERMISYN_API_KEY" \
  -H "X-Permisyn-Agent: finance-report-agent" \
  -H "X-Permisyn-User: finance-owner@yourco.com" \
  -H "X-Permisyn-Team: finance" \
  -H "X-Permisyn-Purpose: monthly close report" \
  -H "X-Permisyn-Max-Cost-USD: 0.50" \
  -H "X-Permisyn-Prompt-Mode: off" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Summarize the monthly close"}]}'

If you do not want application runtimes or deployment code to hold an OpenAI/Anthropic key, paste the provider key once in the encrypted vault. After that, calls send only psyn_live_...; Permisyn injects the upstream key server-side only after authorization passes.

secretless-provider-vault.sh
# 1) Store the upstream key once from Fleet Control or API
curl https://api.permisyn.com/api/control/provider-keys \
  -H "X-API-Key: psyn_live_..." \
  -H "Content-Type: application/json" \
  -X PUT \
  -d '{"provider":"openai","api_key":"sk-your-openai-key"}'

# 2) Existing model client sends only the Permisyn key
curl https://api.permisyn.com/v1/chat/completions \
  -H "Authorization: Bearer psyn_live_..." \
  -H "Content-Type: application/json" \
  -H "X-Permisyn-Agent: finance-report-agent" \
  -H "X-Permisyn-User: finance-owner@yourco.com" \
  -H "X-Permisyn-Team: finance" \
  -H "X-Permisyn-Purpose: monthly close report" \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Summarize the monthly close"}]}'