| name | perplexity-enterprise-rbac |
| description | Configure Perplexity API key scoping, per-team model access, cost controls,
and search domain restrictions for enterprise deployments.
Trigger with phrases like "perplexity enterprise", "perplexity RBAC",
"perplexity team access", "perplexity roles", "perplexity permissions".
|
| allowed-tools | Read, Write, Edit |
| version | 1.12.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","perplexity","rbac"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Perplexity Enterprise RBAC
Overview
Control access to Perplexity Sonar API at the organizational level. Perplexity does not have built-in RBAC -- you implement access control through: separate API keys per team/environment, a gateway that enforces model and budget policies, and domain restrictions for compliance.
Access Control Strategy
| Layer | Mechanism | Perplexity Support |
|---|
| Authentication | API key per team | Yes (multiple keys) |
| Model restriction | Gateway enforcement | Build yourself |
| Budget cap | Per-key monthly limit | Via dashboard |
| Domain restriction | search_domain_filter | Yes (per-request) |
| Rate limiting | Gateway + key limits | Yes (per-key RPM) |
Prerequisites
- Perplexity API account with admin access
- Separate API keys per team/environment
- Gateway or middleware for policy enforcement
Instructions
Step 1: Create Per-Team API Keys
Generate separate keys at perplexity.ai/settings/api:
Key: pplx-support-bot-prod → Budget: $200/mo, sonar only
Key: pplx-research-team → Budget: $1000/mo, sonar + sonar-pro
Key: pplx-data-team → Budget: $500/mo, sonar only
Key: pplx-executive-reports → Budget: $300/mo, sonar-pro
Step 2: Gateway with Policy Enforcement
import OpenAI from "openai";
interface TeamPolicy {
apiKey: string;
allowedModels: string[];
maxTokensPerRequest: number;
maxRequestsPerMinute: number;
requiredDomainFilter?: string[];
?: [];
}
: <, > = {
: {
: process..!,
: [],
: ,
: ,
},
: {
: process..!,
: [, , ],
: ,
: ,
},
: {
: process..!,
: [, ],
: ,
: ,
: [, , ],
},
: {
: process..!,
: [],
: ,
: ,
: [, ],
},
};
(): { : ; : ; : ; ?: [] } {
policy = [team];
(!policy) ();
(!policy..(requestedModel)) {
.();
}
model = policy..(requestedModel)
? requestedModel
: policy.[];
maxTokens = .(requestedTokens, policy.);
{
: ({ : policy., : }),
model,
maxTokens,
: policy. || policy.,
};
}