Skip to content

Commit eb06c89

Browse files
authored
Merge pull request #553 from future-agi/gateway-docs
Prism Gateway docs rewrite - Phase 1 & 2
2 parents 5056c4b + 2313105 commit eb06c89

30 files changed

Lines changed: 6249 additions & 1204 deletions

src/lib/navigation.ts

Lines changed: 70 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -353,36 +353,87 @@ export const tabNavigation: NavTab[] = [
353353
{
354354
title: 'Concepts',
355355
items: [
356-
{ title: 'Core Concepts', href: '/docs/prism/concepts/core' },
357-
{ title: 'API Reference', href: '/docs/prism/concepts/api-reference' },
356+
{ title: 'How it works', href: '/docs/prism/concepts/core' },
357+
{ title: 'Virtual keys & access control', href: '/docs/prism/concepts/virtual-keys' },
358358
{ title: 'Configuration', href: '/docs/prism/concepts/configuration' },
359-
{ title: 'Platform Integration', href: '/docs/prism/concepts/platform-integration' },
359+
{ title: 'Platform integration', href: '/docs/prism/concepts/platform-integration' },
360360
]
361361
},
362362
{
363363
title: 'Features',
364364
items: [
365-
{ title: 'Manage Providers', href: '/docs/prism/features/providers' },
366-
{ title: 'Routing & Reliability', href: '/docs/prism/features/routing' },
367-
{ title: 'Guardrails', href: '/docs/prism/features/guardrails' },
368-
{ title: 'Caching', href: '/docs/prism/features/caching' },
369-
{ title: 'Cost Tracking & Budgets', href: '/docs/prism/features/cost-tracking' },
370-
{ title: 'Streaming', href: '/docs/prism/features/streaming' },
371-
{ title: 'Shadow Experiments', href: '/docs/prism/features/shadow-experiments' },
372-
{ title: 'Rate Limiting', href: '/docs/prism/features/rate-limiting' },
373-
{ title: 'MCP & A2A', href: '/docs/prism/features/mcp-a2a' },
374-
{ title: 'Simulation Using SDK', href: '/docs/simulation/features/simulation-using-sdk' },
375-
{ title: 'Evaluate Tool Calling', href: '/docs/simulation/features/evaluate-tool-calling' },
376-
{ title: 'Fix My Agent', href: '/docs/simulation/features/fix-my-agent' },
377-
{ title: 'Replay', href: '/docs/simulation/features/observe-to-simulate' },
378-
{ title: 'Voice Replay', href: '/docs/simulation/features/voice-replay' },
379-
{ title: 'Prompt Simulation', href: '/docs/simulation/features/prompt-simulation' },
365+
{
366+
title: 'Providers',
367+
items: [
368+
{ title: 'Supported providers', href: '/docs/prism/features/providers' },
369+
{ title: 'Self-hosted models', href: '/docs/prism/features/self-hosted-models' },
370+
]
371+
},
372+
{
373+
title: 'API Reference',
374+
items: [
375+
{ title: 'Endpoints overview', href: '/docs/prism/api/endpoints' },
376+
{ title: 'Chat completions', href: '/docs/prism/api/chat' },
377+
{ title: 'Embeddings & reranking', href: '/docs/prism/api/embeddings' },
378+
{ title: 'Media endpoints', href: '/docs/prism/api/media' },
379+
{ title: 'Assistants API', href: '/docs/prism/api/assistants' },
380+
{ title: 'Files & vector stores', href: '/docs/prism/api/files' },
381+
{ title: 'Async & batch', href: '/docs/prism/api/async-batch' },
382+
{ title: 'Request & response headers', href: '/docs/prism/api/headers' },
383+
]
384+
},
385+
{
386+
title: 'Routing',
387+
items: [
388+
{ title: 'Routing & reliability', href: '/docs/prism/features/routing' },
389+
]
390+
},
391+
{
392+
title: 'Safety & Policy',
393+
items: [
394+
{ title: 'Guardrails', href: '/docs/prism/features/guardrails' },
395+
]
396+
},
397+
{
398+
title: 'Performance',
399+
items: [
400+
{ title: 'Caching', href: '/docs/prism/features/caching' },
401+
{ title: 'Rate limiting', href: '/docs/prism/features/rate-limiting' },
402+
]
403+
},
404+
{
405+
title: 'Cost & Observability',
406+
items: [
407+
{ title: 'Cost tracking', href: '/docs/prism/features/cost-tracking' },
408+
{ title: 'Observability', href: '/docs/prism/features/observability' },
409+
{ title: 'Shadow experiments', href: '/docs/prism/features/shadow-experiments' },
410+
]
411+
},
412+
{
413+
title: 'Agentic',
414+
items: [
415+
{ title: 'MCP & A2A', href: '/docs/prism/features/mcp-a2a' },
416+
]
417+
},
418+
]
419+
},
420+
{
421+
title: 'Admin',
422+
items: [
423+
{ title: 'Organization management', href: '/docs/prism/admin/organizations' },
380424
]
381425
},
382426
{
383427
title: 'Deployment',
384428
items: [
385-
{ title: 'Self-Hosted', href: '/docs/prism/deployment/self-hosted' },
429+
{ title: 'Self-hosted', href: '/docs/prism/deployment/self-hosted' },
430+
]
431+
},
432+
{
433+
title: 'Guides',
434+
items: [
435+
{ title: 'Error handling', href: '/docs/prism/guides/errors' },
436+
{ title: 'Troubleshooting', href: '/docs/prism/guides/troubleshooting' },
386437
]
387438
},
388439
]
Lines changed: 177 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,177 @@
1+
---
2+
title: "Organization management"
3+
description: "Manage organizations, members, and org-level settings in Prism."
4+
---
5+
6+
## About
7+
8+
Each Prism organization is an isolated environment with its own providers, routing rules, rate limits, budgets, and API keys. Organizations are the top-level unit for multi-tenancy in Prism.
9+
10+
---
11+
12+
## Organization settings
13+
14+
Organization config controls all gateway behavior for that org. Settings are managed via the dashboard or the admin API.
15+
16+
<Tabs items={["Dashboard", "Python (Prism SDK)", "TypeScript (Prism SDK)"]}>
17+
18+
<Tab title="Dashboard">
19+
20+
Go to **Settings > Organization** in the Future AGI dashboard. From here you can:
21+
22+
- View and edit org-level configuration (providers, routing, caching, etc.)
23+
- Manage members and roles
24+
- View API key inventory
25+
- Set budgets and rate limits
26+
27+
</Tab>
28+
29+
<Tab title="Python (Prism SDK)">
30+
31+
```python
32+
from prism import Prism
33+
34+
# base_url = inference gateway, control_plane_url = admin/config API
35+
client = Prism(
36+
api_key="sk-prism-your-key",
37+
base_url="https://gateway.futureagi.com",
38+
control_plane_url="https://api.futureagi.com",
39+
)
40+
41+
# Get org config
42+
config = client.org_configs.retrieve(org_id="your-org-id")
43+
44+
# Update org config
45+
client.org_configs.update(
46+
org_id="your-org-id",
47+
config={
48+
"rate_limiting": {
49+
"enabled": True,
50+
"rpm": 1000,
51+
},
52+
"budgets": {
53+
"limit": 500.00,
54+
"period": "monthly",
55+
},
56+
},
57+
)
58+
```
59+
60+
</Tab>
61+
62+
<Tab title="TypeScript (Prism SDK)">
63+
64+
```typescript
65+
import { Prism } from "@futureagi/prism";
66+
67+
const client = new Prism({
68+
apiKey: "sk-prism-your-key",
69+
baseUrl: "https://gateway.futureagi.com",
70+
controlPlaneUrl: "https://api.futureagi.com",
71+
});
72+
73+
const config = await client.orgConfigs.retrieve({
74+
orgId: "your-org-id",
75+
});
76+
77+
await client.orgConfigs.update({
78+
orgId: "your-org-id",
79+
config: {
80+
rate_limiting: {
81+
enabled: true,
82+
rpm: 1000,
83+
},
84+
budgets: {
85+
limit: 500.0,
86+
period: "monthly",
87+
},
88+
},
89+
});
90+
```
91+
92+
</Tab>
93+
94+
</Tabs>
95+
96+
---
97+
98+
## Members and roles
99+
100+
Organizations can have multiple members with different roles.
101+
102+
| Role | Permissions |
103+
|---|---|
104+
| **Owner** | Full access. Can delete the org, manage billing, and change all settings. |
105+
| **Admin** | Can manage providers, keys, routing, budgets, and members (except owner). |
106+
| **Member** | Can view config and create API keys. Cannot change org settings. |
107+
| **Viewer** | Read-only access to dashboard, logs, and analytics. |
108+
109+
### Managing members
110+
111+
Members are managed through the Future AGI dashboard at **Settings > Members**. Invite new members by email. Each member can belong to multiple organizations.
112+
113+
---
114+
115+
## API key management
116+
117+
Each organization has its own pool of API keys (virtual keys). Keys inherit org-level settings and can have additional per-key restrictions.
118+
119+
```python
120+
# List keys for an org
121+
keys = client.keys.list(org_id="your-org-id")
122+
for key in keys:
123+
print(f"{key.name}: {key.key_prefix}...")
124+
125+
# Create a new key
126+
new_key = client.keys.create(
127+
org_id="your-org-id",
128+
name="backend-service",
129+
rate_limit_rpm=100,
130+
allowed_models=["gpt-4o", "gpt-4o-mini"],
131+
)
132+
print(f"Key: {new_key.key}") # full key shown only at creation
133+
134+
# Revoke a key
135+
client.keys.delete(key_id=new_key.id)
136+
```
137+
138+
See [Virtual keys & access control](/docs/prism/concepts/virtual-keys) for detailed key configuration (RBAC, IP ACL, model restrictions).
139+
140+
---
141+
142+
## Multi-tenancy patterns
143+
144+
### One org per customer
145+
146+
For SaaS products, create a separate org per customer. Each customer gets isolated providers, budgets, and rate limits:
147+
148+
- Customer A: budget $100/month, access to gpt-4o-mini only
149+
- Customer B: budget $500/month, access to gpt-4o and claude-sonnet-4-6
150+
- Customer C: unlimited budget, all models
151+
152+
### One org with per-key isolation
153+
154+
For internal teams, use a single org with per-key restrictions:
155+
156+
- Marketing team key: rate limit 50 RPM, budget $200/month
157+
- Engineering team key: rate limit 500 RPM, budget $1000/month
158+
- Data science key: rate limit 200 RPM, all models, no budget cap
159+
160+
---
161+
162+
## Next Steps
163+
164+
<CardGroup cols={2}>
165+
<Card title="Virtual keys" href="/docs/prism/concepts/virtual-keys">
166+
Per-key restrictions, RBAC, and IP ACL
167+
</Card>
168+
<Card title="Configuration" href="/docs/prism/concepts/configuration">
169+
Configuration hierarchy and sections
170+
</Card>
171+
<Card title="Rate limiting & budgets" href="/docs/prism/features/rate-limiting">
172+
Per-org and per-key rate limits
173+
</Card>
174+
<Card title="Cost tracking" href="/docs/prism/features/cost-tracking">
175+
Cost attribution across teams
176+
</Card>
177+
</CardGroup>

0 commit comments

Comments
 (0)