Recommended ways to run dev, staging, and prod for the AI Gateway across SaaS, self-hosted Gateway Plane, and self-hosted Control Plane setups.
Most organizations need to separate dev, staging, and prod for the AI Gateway so that experimental work, model evaluations, and production traffic do not interfere with each other. The right setup depends on:
Whether dev / staging / prod use the same models and providers, or different ones.
How much isolation you want between environments (data, users, access, blast radius).
This guide walks through the recommended approach for each deployment mode.
Quick recommendation
Deployment mode
Recommended setup
SaaS (TrueFoundry-hosted), same models across envs
One tenant + separate virtual accounts for dev / staging / prod, scoped with RBAC.
SaaS (TrueFoundry-hosted), different models or stronger isolation
Separate tenants per environment (e.g. company-dev, company-staging, company-prod).
Self-hosted Gateway Plane (TrueFoundry-hosted Control Plane)
One gateway plane is fine for most cases. Use two gateway planes (dev + prod) if dev and prod are in different VPCs and you don’t want to expose the same gateway to both environments.
Self-hosted Control Plane
Two control planes (non-prod + prod) is the recommended default — it’s the safest setup because you can test TrueFoundry upgrades on non-prod before applying them to prod. Run a single control plane only if you want lower operational overhead and can accept upgrading prod directly.
SaaS (TrueFoundry-hosted Control Plane and Gateway)
On SaaS, infrastructure is fully managed by TrueFoundry. Environment separation is achieved either through virtual accounts inside one tenant or by creating multiple tenants.
One tenant
Multiple tenants
Recommended when models are the same across environments.Use this when dev, staging, and prod use the same set of models, providers, and credentials, and you mostly need to separate which application (or environment) is calling the AI Gateway for cost tracking, rate limiting, and observability.What you set up
1
Create one virtual account per environment per application
For each application or service, create one virtual account per environment — for example checkout-dev, checkout-staging, checkout-prod. Apps in each environment use the corresponding virtual account token to call the AI Gateway.See Manage Virtual Accounts.
2
Tag virtual accounts and use teams as owners
Set the owner team on each virtual account (e.g. checkout-team) so team members can see logs / metrics for that environment in the AI Gateway. Add a metadata.environment value (dev / staging / prod) on the virtual account so you can filter request logs and metrics by environment.
3
Apply environment-specific policies
Attach different rate-limiting and budget-limiting policies to dev / staging / prod virtual accounts — for example, lower limits and stricter budgets in dev, higher in prod. See Rate Limiting and Budget Limiting.
4
Control access using RBAC
Decide who can use which environment by granting model account access (for models) and virtual account access at the team / user level. Typical pattern:
All developers can use *-dev virtual accounts.
Only the on-call / SRE team can use *-prod virtual accounts.
This option keeps operational overhead minimal: one set of model integrations, one set of users, one place to look for logs. Teams just switch tokens between environments.
Recommended when models differ per environment or you need strong isolation.Use this when dev / staging / prod need different models or providers, when you want separate user lists, SSO, or billing per environment, or when compliance requires complete isolation.On SaaS you can create multiple tenants, each with its own URL — for example:
Users, teams, virtual accounts, and SSO configuration.
Model accounts, models, MCP servers, and guardrails.
Request logs, metrics, and policies.
What you set up
1
Request additional tenants
Reach out to TrueFoundry to provision the additional tenants (e.g. company-dev and company-staging alongside an existing company-prod).
2
Configure SSO and users per tenant
For each tenant, configure SSO and decide on a user provisioning mode (SCIM, JIT, or invite-only). Most teams give all developers access to dev / staging and a smaller group access to prod.
3
Set up model accounts and models per tenant
Add model accounts and models in each tenant. You can use different API keys per environment (e.g. a sandbox OpenAI key in dev, the production key in prod) by creating separate model accounts in each tenant.
4
Use environment-specific virtual accounts inside each tenant
Within each tenant, follow Setup AI Gateway in Org to create teams, virtual accounts, and policies as usual.
Tenants are fully isolated — users, virtual accounts, models, and request logs are not shared across them. Plan access deliberately so the same engineer can be added to the dev and prod tenants if they need both.
Self-hosted Gateway Plane (Control Plane on SaaS)
In this mode, the Gateway Plane runs in your own infrastructure while the Control Plane is hosted by TrueFoundry. You control how many gateway planes to deploy.
One gateway plane
Two gateway planes
Recommended default.Run a single gateway plane that serves dev, staging, and prod traffic. Use virtual accounts and policies (the One tenant option above) to separate environments.When to choose this
Dev / staging / prod live in the same VPC or are reachable from a single shared network.
You want to minimize hosting cost and operational overhead.
Same models and providers are used across environments.
The AI Gateway plane is stateless and horizontally scalable, so a single fleet can handle traffic for all environments. Combine this with one tenant + per-environment virtual accounts on the Control Plane.
Recommended when dev and prod live in separate VPCs.Run two gateway planes — one in your dev VPC and one in your prod VPC — both connected to the same TrueFoundry-hosted Control Plane.When to choose this
Dev and prod must stay in separate VPCs (network isolation, different cloud accounts, regulatory boundaries).
You want production traffic on isolated nodes / scaling profile, separate from dev experiments.
You want to roll out gateway version upgrades to dev first and bake before prod.
What you set up
1
Deploy a gateway plane in each VPC
Install the AI Gateway-plane Helm chart in each environment’s cluster. Both gateways point to the same TrueFoundry-hosted Control Plane. See Deploy Gateway Plane.
2
Use distinct gateway endpoints
Expose each gateway on its own hostname (e.g. gateway-dev.company.com and gateway.company.com). Apps in each environment call their own gateway endpoint.
3
Separate environments inside the Control Plane
Use either the One tenant or Multiple tenants approach from the SaaS section above, depending on your isolation needs. Models, policies, and access rules are still configured centrally on the SaaS Control Plane.
Two gateway planes share the same configuration source-of-truth (the Control Plane), so you don’t have to duplicate model integrations or access rules.
When you self-host the Control Plane (and Gateway Plane) on your own infrastructure, you have three options.We recommend running two control planes — one for non-prod (dev / staging) and one for prod — so that you can validate TrueFoundry upgrades on non-prod before rolling them out to prod. This is the safest setup for production traffic.If your team prefers lower operational overhead and can accept upgrading prod directly, you can run a single control plane and separate environments inside it using virtual accounts or tenants.
We recommend running at most two control planes — a non-prod (dev / staging) and a prod control plane. More than two typically doubles operational burden — backups, upgrades, monitoring, certificates, secrets — without proportional benefit.
Two control planes
One CP, one tenant
One CP, multiple tenants
Recommended default — safest setup for production.Host two control planes — one for non-prod (dev + staging) and one for prod — each with its own database, blob storage, gateway plane, and Helm release.Why this is the recommended default
You can test TrueFoundry upgrades on the non-prod control plane and validate against your non-prod gateway before touching prod.
You get full infrastructure isolation between non-prod and prod (separate clusters, databases, blob storage, failure domains).
You can roll out config changes (new models, policies, guardrails) to non-prod first and promote to prod after validation.
What you set up
1
Deploy a non-prod control plane (dev + staging)
Install one TrueFoundry control plane in your non-prod cluster, following Deploy Control Plane and Gateway Plane. Use this control plane for both dev and staging — they typically share most config and infra needs.Inside this control plane, separate dev and staging using virtual accounts (see One CP, one tenant) or tenants (see One CP, multiple tenants).
2
Deploy a prod control plane
Install a second TrueFoundry control plane in your prod cluster on its own database, blob storage, and domain (e.g. app.company.com for prod and app-nonprod.company.com for non-prod).
3
Bake control-plane upgrades on non-prod first
When upgrading TrueFoundry, upgrade the non-prod control plane first, validate against the non-prod gateway, and only then upgrade the prod control plane. This gives you a safe rollout window for new releases.
4
Keep configuration in sync via GitOps
Manage models, virtual accounts, policies, and access rules through GitOps so the same source-of-truth can be applied to both control planes (with environment-specific overrides).
Pick this option if you have a specialized deployment setup (custom networking, air-gapped environment, strict change-management) or any platform-team capacity to operate two stacks. It’s also the right choice when prod uptime requires upgrade testing before any change.
Do not run more than two control planes. A third control plane (e.g. a dedicated staging control plane) typically doubles operational burden — backups, upgrades, monitoring, certificates, secrets — without proportional benefit. Use a separate tenant or virtual account for staging inside the non-prod control plane instead.
Use this when you want minimal operational overhead and can upgrade prod directly.Host a single control plane and run dev / staging / prod inside the same tenant using virtual accounts, teams, and RBAC.When to choose this
Same models and providers across environments.
You want one place to manage users, SSO, models, policies, and observability.
Smaller platform team, comfortable upgrading the only control plane in place — usually after the SaaS release has been live for a couple of weeks.
Create dev / staging / prod virtual accounts for each application (e.g. checkout-dev, checkout-staging, checkout-prod) and tag them with environment metadata.
3
Apply RBAC, rate limits, and budgets per environment
Use Access Control, Rate Limiting, and Budget Limiting so that dev tokens have looser limits, prod tokens have stricter ones, and access to prod is restricted to a small group.
4
(Optional) Run separate gateway planes per environment
If dev and prod live in different VPCs, deploy two gateway planes connected to the same control plane (same as the Two gateway planes option in the section above).
Use this when models or users differ per environment but you want a single control plane.Host a single control plane in multi-tenant mode and create one tenant per environment — for example dev, staging, prod, hosted on dev.<base_domain>, staging.<base_domain>, and prod.<base_domain>.When to choose this
Dev / staging / prod use different models, providers, or API keys and you want them fully isolated.
You want separate user lists, SSO settings, virtual accounts, and request logs per environment.
You want tenant-level isolation but only have ops capacity to run one control-plane stack.
From the admin dashboard at <base_domain>/admin/, create the dev, staging, and prod tenants. Each tenant gets its own subdomain and admin invite.
3
Configure each tenant independently
For each tenant, configure SSO, users, teams, virtual accounts, model accounts, and models — using Setup AI Gateway in Org as a checklist.
Tenants on the same control plane share infrastructure (Postgres, blob storage, NATS, gateway pods) but data is logically isolated per tenant. If you need full infrastructure isolation between non-prod and prod, or you want to bake control-plane upgrades on non-prod first, choose Two control planes instead.
Choosing between options
Start with Two control planes unless your team explicitly wants to consolidate to a single stack. Use this matrix to decide:
Requirement
Two control planes (recommended)
One CP, one tenant
One CP, multiple tenants
Test control-plane upgrades on non-prod first
✅ Best fit
❌
❌
Infrastructure isolation (DB, storage, cluster)
✅ Best fit
❌
❌
Same models across envs
✅
✅ Best fit
✅
Different models / API keys per env
✅
⚠️ Possible via separate model accounts
✅ Best fit
Separate users / SSO per env
✅
❌
✅
Operational overhead
Highest
Lowest
Medium
Cross-cutting recommendations
These apply regardless of which option you pick.
Use GitOps to manage configuration across environments
Store models, virtual accounts, policies, guardrails, and access rules as YAML in Git. Apply the same definitions to dev / staging / prod with environment-specific overrides using tfy apply. This avoids drift and makes promotion (dev → staging → prod) auditable. See Setup GitOps and Using tfy apply.
Sync virtual account tokens to your secret manager
For each environment, configure secret store sync so the dev / staging / prod tokens are written to distinct paths in your secret manager (e.g. AWS Secrets Manager, HashiCorp Vault). Apps read tokens from the secret manager, not from the UI. Combine with auto-rotation for prod.
Apply tighter policies in prod
Rate limits, budget limits, guardrails, and data-access rules should be progressively stricter from dev → staging → prod. Reserve aggressive guardrails (PII redaction, content moderation, prompt injection) for prod traffic; keep dev permissive so engineers can iterate.
Restrict who can read prod data
Use Data Access rules so only on-call / SRE / security teams can read prod request logs, while broader teams can see dev / staging data. This is especially important when running everything in a single tenant.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"TrueFoundry Docs","description":"TrueFoundry documentation — enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","colors":{"primary":"#4f46e5","light":"#4f46e5","dark":"#4f46e5"},"logo":{"light":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20","dark":"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/dark.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=c1cb26554a546d84500b40f7057bece8"},"favicon":"https://mintcdn.com/truefoundry/6bbtTt95c1iCcyph/favicon.svg?fit=max\u0026auto=format\u0026n=6bbtTt95c1iCcyph\u0026q=85\u0026s=f55bde34214b38034126d05b08ea16c7","appearance":{"default":"light"},"background":{"decoration":"grid"},"navbar":{"links":[{"href":"https://www.truefoundry.com/book-demo","label":"Book Demo"},{"href":"https://www.truefoundry.com/blog","label":"Blog"}],"primary":{"type":"button","label":"Sign Up","href":"https://www.truefoundry.com/register"}},"footer":{"socials":{"x":"https://twitter.com/truefoundry","linkedin":"https://in.linkedin.com/company/truefoundry"}},"seo":{"metatags":{"og:type":"website","og:site_name":"TrueFoundry Docs","og:image":"https://assets.production.truefoundry.com/logo.svg","og:description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.","description":"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane."}},"icons":{"library":"fontawesome"},"styling":{"codeblocks":"dark","latex":true},"integrations":{"ga4":{"measurementId":"G-BSSG699JC1"}},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor","vscode"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"truefoundry","hasAudioNarration":false,"actualSubdomain":"truefoundry","customDomains":["www.truefoundry.com"],"gitSource":{"type":"github","owner":"truefoundry","repo":"docs-mintlify","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6b096311dd4a00ade0d10c53","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"AI Gateway","count":253},{"language":"default","tag":"API Reference","count":202},{"language":"default","tag":"Platform","count":198},{"language":"default","tag":"Integrations","count":138},{"language":"default","tag":"LLM Gateway","count":118},{"language":"default","tag":"AI Deployment","count":109},{"language":"default","tag":"Integrate Models","count":51},{"language":"default","tag":"Guardrails and Security","count":48},{"language":"default","tag":"Observability","count":47},{"language":"default","tag":"MCP Servers","count":44}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@truefoundry.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".line-highlight{background:rgb(var(--primary-light)/.7)!important}.tfy-cat-anchor{scroll-margin-top:6rem;margin-block:1.75rem}.line-highlight:before{background:rgb(var(--primary-light)/.7)!important}.line-highlight:after{background:rgb(var(--primary-light)/.7)!important}"}]}
{"page":{"pagePath":"docs/ai-gateway/setup-multiple-environments","slug":"/docs/ai-gateway/setup-multiple-environments","pageMetadata":{"title":"Setup Dev, Staging and Prod Environments","sidebarTitle":"Setup Multiple Environments","description":"Recommended ways to run dev, staging, and prod for the AI Gateway across SaaS, self-hosted Gateway Plane, and self-hosted Control Plane setups.","href":"/docs/ai-gateway/setup-multiple-environments"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Recommended ways to run dev, staging, and prod for the AI Gateway across SaaS, self-hosted Gateway Plane, and self-hosted Control Plane setups.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,Heading,Info,Note,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Note)_missingMdxReference(`Note`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Most organizations need to separate `,_jsx(_components.strong,{children:`dev`}),`, `,_jsx(_components.strong,{children:`staging`}),`, and `,_jsx(_components.strong,{children:`prod`}),` for the AI Gateway so that experimental work, model evaluations, and production traffic do not interfere with each other. The right setup depends on:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Which deployment mode you are on — see `,_jsx(_components.a,{href:`/docs/ai-gateway/modes-of-deployment`,children:`Deployment Options`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Whether dev / staging / prod use the `,_jsx(_components.strong,{children:`same`}),` models and providers, or `,_jsx(_components.strong,{children:`different`}),` ones.`]}),`\n`,_jsxs(_components.li,{children:[`How much `,_jsx(_components.strong,{children:`isolation`}),` you want between environments (data, users, access, blast radius).`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This guide walks through the recommended approach for each deployment mode.`}),`\n`,_jsx(Heading,{level:`2`,id:`quick-recommendation`,children:`Quick recommendation`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Deployment mode`}),_jsx(_components.th,{children:`Recommended setup`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`SaaS (TrueFoundry-hosted)`}),`, same models across envs`]}),_jsxs(_components.td,{children:[`One tenant + separate `,_jsx(_components.strong,{children:`virtual accounts`}),` for dev / staging / prod, scoped with RBAC.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`SaaS (TrueFoundry-hosted)`}),`, different models or stronger isolation`]}),_jsxs(_components.td,{children:[`Separate `,_jsx(_components.strong,{children:`tenants`}),` per environment (e.g. `,_jsx(_components.code,{children:`company-dev`}),`, `,_jsx(_components.code,{children:`company-staging`}),`, `,_jsx(_components.code,{children:`company-prod`}),`).`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Self-hosted Gateway Plane`}),` (TrueFoundry-hosted Control Plane)`]}),_jsxs(_components.td,{children:[`One gateway plane is fine for most cases. Use `,_jsx(_components.strong,{children:`two gateway planes`}),` (dev + prod) if dev and prod are in different VPCs and you don’t want to expose the same gateway to both environments.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.strong,{children:`Self-hosted Control Plane`})}),_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Two control planes`}),` (non-prod + prod) is the recommended default — it’s the safest setup because you can test TrueFoundry upgrades on non-prod before applying them to prod. Run a single control plane only if you want lower operational overhead and can accept upgrading prod directly.`]})]})]})]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Across all options, use `,_jsx(_components.a,{href:`/docs/platform/virtual-account-management`,children:`virtual accounts`}),` for application traffic and `,_jsx(_components.a,{href:`/docs/generating-truefoundry-api-keys#personal-access-tokens-pats`,children:`Personal Access Tokens (PATs)`}),` for individual user traffic — never share tokens across environments.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`saas-truefoundry-hosted-control-plane-and-gateway`,children:`SaaS (TrueFoundry-hosted Control Plane and Gateway)`}),`\n`,_jsxs(_components.p,{children:[`On SaaS, infrastructure is fully managed by TrueFoundry. Environment separation is achieved either through `,_jsx(_components.strong,{children:`virtual accounts inside one tenant`}),` or by creating `,_jsx(_components.strong,{children:`multiple tenants`}),`.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`One tenant`,id:`one-tenant`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommended when models are the same across environments.`})}),_jsxs(_components.p,{children:[`Use this when `,_jsx(_components.strong,{children:`dev, staging, and prod use the same set of models, providers, and credentials`}),`, and you mostly need to separate `,_jsx(_components.em,{children:`which application`}),` (or environment) is calling the AI Gateway for cost tracking, rate limiting, and observability.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What you set up`})}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Create one virtual account per environment per application`,children:[_jsxs(_components.p,{children:[`For each application or service, create one virtual account per environment — for example `,_jsx(_components.code,{children:`checkout-dev`}),`, `,_jsx(_components.code,{children:`checkout-staging`}),`, `,_jsx(_components.code,{children:`checkout-prod`}),`. Apps in each environment use the corresponding virtual account token to call the AI Gateway.`]}),_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/docs/platform/virtual-account-management`,children:`Manage Virtual Accounts`}),`.`]})]}),_jsx(Step,{title:`Tag virtual accounts and use teams as owners`,children:_jsxs(_components.p,{children:[`Set the `,_jsx(_components.strong,{children:`owner team`}),` on each virtual account (e.g. `,_jsx(_components.code,{children:`checkout-team`}),`) so team members can see logs / metrics for that environment in the AI Gateway. Add a `,_jsx(_components.code,{children:`metadata.environment`}),` value (`,_jsx(_components.code,{children:`dev`}),` / `,_jsx(_components.code,{children:`staging`}),` / `,_jsx(_components.code,{children:`prod`}),`) on the virtual account so you can filter request logs and metrics by environment.`]})}),_jsx(Step,{title:`Apply environment-specific policies`,children:_jsxs(_components.p,{children:[`Attach different `,_jsx(_components.strong,{children:`rate-limiting`}),` and `,_jsx(_components.strong,{children:`budget-limiting`}),` policies to dev / staging / prod virtual accounts — for example, lower limits and stricter budgets in dev, higher in prod. See `,_jsx(_components.a,{href:`/docs/ai-gateway/ratelimiting-v2`,children:`Rate Limiting`}),` and `,_jsx(_components.a,{href:`/docs/ai-gateway/budget-limiting-v2`,children:`Budget Limiting`}),`.`]})}),_jsxs(Step,{title:`Control access using RBAC`,children:[_jsxs(_components.p,{children:[`Decide who can use which environment by granting `,_jsx(_components.strong,{children:`model account`}),` access (for models) and `,_jsx(_components.strong,{children:`virtual account`}),` access at the team / user level. Typical pattern:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`All developers can use `,_jsx(_components.code,{children:`*-dev`}),` virtual accounts.`]}),`\n`,_jsxs(_components.li,{children:[`Only the on-call / SRE team can use `,_jsx(_components.code,{children:`*-prod`}),` virtual accounts.`]}),`\n`,_jsx(_components.li,{children:`Tenant admins can manage everything.`}),`\n`]}),_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/docs/ai-gateway/gateway-access-control`,children:`Access Control`}),` and `,_jsx(_components.a,{href:`/docs/platform/manage-user-roles-and-permissions`,children:`Manage User Roles \u0026 Permissions`}),`.`]})]})]}),_jsx(Tip,{children:_jsx(_components.p,{children:`This option keeps operational overhead minimal: one set of model integrations, one set of users, one place to look for logs. Teams just switch tokens between environments.`})})]}),_jsxs(Tab,{title:`Multiple tenants`,id:`multiple-tenants`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommended when models differ per environment or you need strong isolation.`})}),_jsxs(_components.p,{children:[`Use this when `,_jsx(_components.strong,{children:`dev / staging / prod need different models or providers`}),`, when you want `,_jsx(_components.strong,{children:`separate user lists, SSO, or billing`}),` per environment, or when compliance requires complete isolation.`]}),_jsx(_components.p,{children:`On SaaS you can create multiple tenants, each with its own URL — for example:`}),_jsx(CodeBlock,{numberOfLines:`4`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`company-dev.truefoundry.cloud`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`company-staging.truefoundry.cloud`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`company-prod.truefoundry.cloud`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),_jsx(_components.p,{children:`Each tenant has its own:`}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Users, teams, virtual accounts, and SSO configuration.`}),`\n`,_jsx(_components.li,{children:`Model accounts, models, MCP servers, and guardrails.`}),`\n`,_jsx(_components.li,{children:`Request logs, metrics, and policies.`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What you set up`})}),_jsxs(Steps,{children:[_jsx(Step,{title:`Request additional tenants`,children:_jsxs(_components.p,{children:[`Reach out to TrueFoundry to provision the additional tenants (e.g. `,_jsx(_components.code,{children:`company-dev`}),` and `,_jsx(_components.code,{children:`company-staging`}),` alongside an existing `,_jsx(_components.code,{children:`company-prod`}),`).`]})}),_jsx(Step,{title:`Configure SSO and users per tenant`,children:_jsxs(_components.p,{children:[`For each tenant, configure `,_jsx(_components.a,{href:`/docs/sso`,children:`SSO`}),` and decide on a `,_jsx(_components.a,{href:`/docs/platform/user-management#user-provisioning`,children:`user provisioning mode`}),` (SCIM, JIT, or invite-only). Most teams give all developers access to dev / staging and a smaller group access to prod.`]})}),_jsx(Step,{title:`Set up model accounts and models per tenant`,children:_jsxs(_components.p,{children:[`Add model accounts and models in each tenant. You can use `,_jsx(_components.strong,{children:`different API keys`}),` per environment (e.g. a sandbox OpenAI key in dev, the production key in prod) by creating separate model accounts in each tenant.`]})}),_jsx(Step,{title:`Use environment-specific virtual accounts inside each tenant`,children:_jsxs(_components.p,{children:[`Within each tenant, follow `,_jsx(_components.a,{href:`/docs/ai-gateway/setup-ai-gateway-in-org`,children:`Setup AI Gateway in Org`}),` to create teams, virtual accounts, and policies as usual.`]})})]}),_jsx(Warning,{children:_jsx(_components.p,{children:`Tenants are fully isolated — users, virtual accounts, models, and request logs are not shared across them. Plan access deliberately so the same engineer can be added to the dev and prod tenants if they need both.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`self-hosted-gateway-plane-control-plane-on-saas`,children:`Self-hosted Gateway Plane (Control Plane on SaaS)`}),`\n`,_jsxs(_components.p,{children:[`In this mode, the `,_jsx(_components.a,{href:`/docs/platform/gateway-plane-architecture`,children:`Gateway Plane`}),` runs in your own infrastructure while the Control Plane is hosted by TrueFoundry. You control how many gateway planes to deploy.`]}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`One gateway plane`,id:`one-gateway-plane`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommended default.`})}),_jsxs(_components.p,{children:[`Run a `,_jsx(_components.strong,{children:`single gateway plane`}),` that serves dev, staging, and prod traffic. Use virtual accounts and policies (the `,_jsx(_components.strong,{children:`One tenant`}),` option above) to separate environments.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`When to choose this`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Dev / staging / prod live in the same VPC or are reachable from a single shared network.`}),`\n`,_jsx(_components.li,{children:`You want to minimize hosting cost and operational overhead.`}),`\n`,_jsx(_components.li,{children:`Same models and providers are used across environments.`}),`\n`]}),_jsx(_components.p,{children:`The AI Gateway plane is stateless and horizontally scalable, so a single fleet can handle traffic for all environments. Combine this with one tenant + per-environment virtual accounts on the Control Plane.`})]}),_jsxs(Tab,{title:`Two gateway planes`,id:`two-gateway-planes`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommended when dev and prod live in separate VPCs.`})}),_jsxs(_components.p,{children:[`Run `,_jsx(_components.strong,{children:`two gateway planes`}),` — one in your dev VPC and one in your prod VPC — both connected to the same TrueFoundry-hosted Control Plane.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`When to choose this`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Dev and prod must stay in separate VPCs (network isolation, different cloud accounts, regulatory boundaries).`}),`\n`,_jsx(_components.li,{children:`You want production traffic on isolated nodes / scaling profile, separate from dev experiments.`}),`\n`,_jsx(_components.li,{children:`You want to roll out gateway version upgrades to dev first and bake before prod.`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What you set up`})}),_jsxs(Steps,{children:[_jsx(Step,{title:`Deploy a gateway plane in each VPC`,children:_jsxs(_components.p,{children:[`Install the AI Gateway-plane Helm chart in each environment’s cluster. Both gateways point to the same TrueFoundry-hosted Control Plane. See `,_jsx(_components.a,{href:`/docs/platform/deploy-gateway-plane`,children:`Deploy Gateway Plane`}),`.`]})}),_jsx(Step,{title:`Use distinct gateway endpoints`,children:_jsxs(_components.p,{children:[`Expose each gateway on its own hostname (e.g. `,_jsx(_components.code,{children:`gateway-dev.company.com`}),` and `,_jsx(_components.code,{children:`gateway.company.com`}),`). Apps in each environment call their own gateway endpoint.`]})}),_jsx(Step,{title:`Separate environments inside the Control Plane`,children:_jsxs(_components.p,{children:[`Use either the `,_jsx(_components.strong,{children:`One tenant`}),` or `,_jsx(_components.strong,{children:`Multiple tenants`}),` approach from the SaaS section above, depending on your isolation needs. Models, policies, and access rules are still configured centrally on the SaaS Control Plane.`]})})]}),_jsx(Tip,{children:_jsx(_components.p,{children:`Two gateway planes share the same configuration source-of-truth (the Control Plane), so you don’t have to duplicate model integrations or access rules.`})}),_jsx(Note,{children:_jsxs(_components.p,{children:[`To lock down the prod gateway so only production applications can call it, see `,_jsx(_components.a,{href:`/docs/ai-gateway/metadata-validation#example-use-cases`,children:`Restrict the prod gateway to production applications`}),`.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`self-hosted-control-plane`,children:`Self-hosted Control Plane`}),`\n`,_jsx(_components.p,{children:`When you self-host the Control Plane (and Gateway Plane) on your own infrastructure, you have three options.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`We recommend running two control planes`}),` — one for non-prod (dev / staging) and one for prod — so that you can validate TrueFoundry upgrades on non-prod before rolling them out to prod. This is the safest setup for production traffic.`]}),`\n`,_jsxs(_components.p,{children:[`If your team prefers lower operational overhead and can accept upgrading prod directly, you can run a `,_jsx(_components.strong,{children:`single control plane`}),` and separate environments inside it using virtual accounts or tenants.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`We recommend running `,_jsx(_components.strong,{children:`at most two control planes`}),` — a non-prod (dev / staging) and a prod control plane. More than two typically doubles operational burden — backups, upgrades, monitoring, certificates, secrets — without proportional benefit.`]})}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Two control planes`,id:`two-control-planes`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Recommended default — safest setup for production.`})}),_jsxs(_components.p,{children:[`Host `,_jsx(_components.strong,{children:`two control planes`}),` — one for non-prod (dev + staging) and one for prod — each with its own database, blob storage, gateway plane, and Helm release.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Why this is the recommended default`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`You can `,_jsx(_components.strong,{children:`test TrueFoundry upgrades`}),` on the non-prod control plane and validate against your non-prod gateway before touching prod.`]}),`\n`,_jsx(_components.li,{children:`You get full infrastructure isolation between non-prod and prod (separate clusters, databases, blob storage, failure domains).`}),`\n`,_jsx(_components.li,{children:`You can roll out config changes (new models, policies, guardrails) to non-prod first and promote to prod after validation.`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What you set up`})}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Deploy a non-prod control plane (dev + staging)`,children:[_jsxs(_components.p,{children:[`Install one TrueFoundry control plane in your non-prod cluster, following `,_jsx(_components.a,{href:`/docs/platform/deploy-control-plane-and-gateway-plane`,children:`Deploy Control Plane and Gateway Plane`}),`. Use this control plane for both dev and staging — they typically share most config and infra needs.`]}),_jsxs(_components.p,{children:[`Inside this control plane, separate dev and staging using virtual accounts (see `,_jsx(_components.strong,{children:`One CP, one tenant`}),`) or tenants (see `,_jsx(_components.strong,{children:`One CP, multiple tenants`}),`).`]})]}),_jsx(Step,{title:`Deploy a prod control plane`,children:_jsxs(_components.p,{children:[`Install a second TrueFoundry control plane in your prod cluster on its own database, blob storage, and domain (e.g. `,_jsx(_components.code,{children:`app.company.com`}),` for prod and `,_jsx(_components.code,{children:`app-nonprod.company.com`}),` for non-prod).`]})}),_jsx(Step,{title:`Bake control-plane upgrades on non-prod first`,children:_jsxs(_components.p,{children:[`When upgrading TrueFoundry, `,_jsx(_components.a,{href:`/docs/platform/control-plane-upgrade`,children:`upgrade the non-prod control plane first`}),`, validate against the non-prod gateway, and only then upgrade the prod control plane. This gives you a safe rollout window for new releases.`]})}),_jsx(Step,{title:`Keep configuration in sync via GitOps`,children:_jsxs(_components.p,{children:[`Manage models, virtual accounts, policies, and access rules through `,_jsx(_components.a,{href:`/docs/setup-gitops-using-truefoundry`,children:`GitOps`}),` so the same source-of-truth can be applied to both control planes (with environment-specific overrides).`]})})]}),_jsx(Tip,{children:_jsx(_components.p,{children:`Pick this option if you have a specialized deployment setup (custom networking, air-gapped environment, strict change-management) or any platform-team capacity to operate two stacks. It’s also the right choice when prod uptime requires upgrade testing before any change.`})}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do `,_jsx(_components.strong,{children:`not`}),` run more than two control planes. A third control plane (e.g. a dedicated staging control plane) typically doubles operational burden — backups, upgrades, monitoring, certificates, secrets — without proportional benefit. Use a separate tenant or virtual account for staging inside the non-prod control plane instead.`]})})]}),_jsxs(Tab,{title:`One CP, one tenant`,id:`one-cp%2C-one-tenant`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use this when you want minimal operational overhead and can upgrade prod directly.`})}),_jsxs(_components.p,{children:[`Host a `,_jsx(_components.strong,{children:`single control plane`}),` and run dev / staging / prod inside the same tenant using virtual accounts, teams, and RBAC.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`When to choose this`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Same models and providers across environments.`}),`\n`,_jsx(_components.li,{children:`You want one place to manage users, SSO, models, policies, and observability.`}),`\n`,_jsx(_components.li,{children:`Smaller platform team, comfortable upgrading the only control plane in place — usually after the SaaS release has been live for a couple of weeks.`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What you set up`})}),_jsxs(Steps,{children:[_jsx(Step,{title:`Deploy a single self-hosted control plane`,children:_jsxs(_components.p,{children:[`Install one TrueFoundry control plane following `,_jsx(_components.a,{href:`/docs/platform/deploy-control-plane-and-gateway-plane`,children:`Deploy Control Plane and Gateway Plane`}),`.`]})}),_jsx(Step,{title:`Create per-environment virtual accounts`,children:_jsxs(_components.p,{children:[`Create dev / staging / prod virtual accounts for each application (e.g. `,_jsx(_components.code,{children:`checkout-dev`}),`, `,_jsx(_components.code,{children:`checkout-staging`}),`, `,_jsx(_components.code,{children:`checkout-prod`}),`) and tag them with `,_jsx(_components.code,{children:`environment`}),` metadata.`]})}),_jsx(Step,{title:`Apply RBAC, rate limits, and budgets per environment`,children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.a,{href:`/docs/ai-gateway/gateway-access-control`,children:`Access Control`}),`, `,_jsx(_components.a,{href:`/docs/ai-gateway/ratelimiting-v2`,children:`Rate Limiting`}),`, and `,_jsx(_components.a,{href:`/docs/ai-gateway/budget-limiting-v2`,children:`Budget Limiting`}),` so that dev tokens have looser limits, prod tokens have stricter ones, and access to prod is restricted to a small group.`]})}),_jsx(Step,{title:`(Optional) Run separate gateway planes per environment`,children:_jsxs(_components.p,{children:[`If dev and prod live in different VPCs, deploy two gateway planes connected to the same control plane (same as the `,_jsx(_components.strong,{children:`Two gateway planes`}),` option in the section above).`]})})]})]}),_jsxs(Tab,{title:`One CP, multiple tenants`,id:`one-cp%2C-multiple-tenants`,children:[_jsx(_components.p,{children:_jsx(_components.strong,{children:`Use this when models or users differ per environment but you want a single control plane.`})}),_jsxs(_components.p,{children:[`Host a `,_jsxs(_components.strong,{children:[`single control plane in `,_jsx(_components.a,{href:`/docs/platform/controlplane-multitenant`,children:`multi-tenant mode`})]}),` and create one tenant per environment — for example `,_jsx(_components.code,{children:`dev`}),`, `,_jsx(_components.code,{children:`staging`}),`, `,_jsx(_components.code,{children:`prod`}),`, hosted on `,_jsx(_components.code,{children:`dev.\u003cbase_domain>`}),`, `,_jsx(_components.code,{children:`staging.\u003cbase_domain>`}),`, and `,_jsx(_components.code,{children:`prod.\u003cbase_domain>`}),`.`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`When to choose this`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Dev / staging / prod use `,_jsx(_components.strong,{children:`different models, providers, or API keys`}),` and you want them fully isolated.`]}),`\n`,_jsx(_components.li,{children:`You want separate user lists, SSO settings, virtual accounts, and request logs per environment.`}),`\n`,_jsx(_components.li,{children:`You want tenant-level isolation but only have ops capacity to run one control-plane stack.`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`What you set up`})}),_jsxs(Steps,{children:[_jsx(Step,{title:`Enable multi-tenancy on your control plane`,children:_jsxs(_components.p,{children:[`Follow `,_jsx(_components.a,{href:`/docs/platform/controlplane-multitenant`,children:`Manage Multi-Tenancy on the Control Plane`}),` to enable multi-tenant mode and pick a base domain (e.g. `,_jsx(_components.code,{children:`app.company.com`}),`).`]})}),_jsx(Step,{title:`Create one tenant per environment`,children:_jsxs(_components.p,{children:[`From the admin dashboard at `,_jsx(_components.code,{children:`\u003cbase_domain>/admin/`}),`, create the `,_jsx(_components.code,{children:`dev`}),`, `,_jsx(_components.code,{children:`staging`}),`, and `,_jsx(_components.code,{children:`prod`}),` tenants. Each tenant gets its own subdomain and admin invite.`]})}),_jsx(Step,{title:`Configure each tenant independently`,children:_jsxs(_components.p,{children:[`For each tenant, configure SSO, users, teams, virtual accounts, model accounts, and models — using `,_jsx(_components.a,{href:`/docs/ai-gateway/setup-ai-gateway-in-org`,children:`Setup AI Gateway in Org`}),` as a checklist.`]})})]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Tenants on the same control plane share infrastructure (Postgres, blob storage, NATS, gateway pods) but data is logically isolated per tenant. If you need full `,_jsx(_components.strong,{children:`infrastructure`}),` isolation between non-prod and prod, or you want to bake control-plane upgrades on non-prod first, choose `,_jsx(_components.strong,{children:`Two control planes`}),` instead.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`choosing-between-options`,children:`Choosing between options`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Start with Two control planes`}),` unless your team explicitly wants to consolidate to a single stack. Use this matrix to decide:`]}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Requirement`}),_jsx(_components.th,{children:`Two control planes (recommended)`}),_jsx(_components.th,{children:`One CP, one tenant`}),_jsx(_components.th,{children:`One CP, multiple tenants`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Test control-plane upgrades on non-prod first`}),_jsx(_components.td,{children:`✅ Best fit`}),_jsx(_components.td,{children:`❌`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Infrastructure isolation (DB, storage, cluster)`}),_jsx(_components.td,{children:`✅ Best fit`}),_jsx(_components.td,{children:`❌`}),_jsx(_components.td,{children:`❌`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Same models across envs`}),_jsx(_components.td,{children:`✅`}),_jsx(_components.td,{children:`✅ Best fit`}),_jsx(_components.td,{children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Different models / API keys per env`}),_jsx(_components.td,{children:`✅`}),_jsx(_components.td,{children:`⚠️ Possible via separate model accounts`}),_jsx(_components.td,{children:`✅ Best fit`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Separate users / SSO per env`}),_jsx(_components.td,{children:`✅`}),_jsx(_components.td,{children:`❌`}),_jsx(_components.td,{children:`✅`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Operational overhead`}),_jsx(_components.td,{children:`Highest`}),_jsx(_components.td,{children:`Lowest`}),_jsx(_components.td,{children:`Medium`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`cross-cutting-recommendations`,children:`Cross-cutting recommendations`}),`\n`,_jsx(_components.p,{children:`These apply regardless of which option you pick.`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Use GitOps to manage configuration across environments`,id:`use-gitops-to-manage-configuration-across-environments`,children:_jsxs(_components.p,{children:[`Store models, virtual accounts, policies, guardrails, and access rules as YAML in Git. Apply the same definitions to dev / staging / prod with environment-specific overrides using `,_jsx(_components.code,{children:`tfy apply`}),`. This avoids drift and makes promotion (dev → staging → prod) auditable. See `,_jsx(_components.a,{href:`/docs/setup-gitops-using-truefoundry`,children:`Setup GitOps`}),` and `,_jsxs(_components.a,{href:`/docs/using-tfy-apply`,children:[`Using `,_jsx(_components.code,{children:`tfy apply`})]}),`.`]})}),_jsx(Accordion,{title:`Sync virtual account tokens to your secret manager`,id:`sync-virtual-account-tokens-to-your-secret-manager`,children:_jsxs(_components.p,{children:[`For each environment, configure `,_jsx(_components.a,{href:`/docs/platform/virtual-account-management#configure-secret-store-sync-for-virtual-account-tokens`,children:`secret store sync`}),` so the dev / staging / prod tokens are written to distinct paths in your secret manager (e.g. AWS Secrets Manager, HashiCorp Vault). Apps read tokens from the secret manager, not from the UI. Combine with `,_jsx(_components.a,{href:`/docs/platform/virtual-account-management#configure-auto-rotation-of-virtual-account-tokens`,children:`auto-rotation`}),` for prod.`]})}),_jsx(Accordion,{title:`Apply tighter policies in prod`,id:`apply-tighter-policies-in-prod`,children:_jsx(_components.p,{children:`Rate limits, budget limits, guardrails, and data-access rules should be progressively stricter from dev → staging → prod. Reserve aggressive guardrails (PII redaction, content moderation, prompt injection) for prod traffic; keep dev permissive so engineers can iterate.`})}),_jsx(Accordion,{title:`Restrict who can read prod data`,id:`restrict-who-can-read-prod-data`,children:_jsxs(_components.p,{children:[`Use `,_jsx(_components.a,{href:`/docs/ai-gateway/data-access`,children:`Data Access`}),` rules so only on-call / SRE / security teams can read prod request logs, while broader teams can see dev / staging data. This is especially important when running everything in a single tenant.`]})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Setup Dev, Staging and Prod Environments","sidebarTitle":"Setup Multiple Environments","description":"Recommended ways to run dev, staging, and prod for the AI Gateway across SaaS, self-hosted Gateway Plane, and self-hosted Control Plane setups.","href":"/docs/ai-gateway/setup-multiple-environments"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Quick recommendation","slug":"quick-recommendation","depth":2,"children":[]},{"title":"SaaS (TrueFoundry-hosted Control Plane and Gateway)","slug":"saas-truefoundry-hosted-control-plane-and-gateway","depth":2,"children":[]},{"title":"Self-hosted Gateway Plane (Control Plane on SaaS)","slug":"self-hosted-gateway-plane-control-plane-on-saas","depth":2,"children":[]},{"title":"Self-hosted Control Plane","slug":"self-hosted-control-plane","depth":2,"children":[]},{"title":"Choosing between options","slug":"choosing-between-options","depth":2,"children":[]},{"title":"Cross-cutting recommendations","slug":"cross-cutting-recommendations","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/truefoundry/9e0085f7ed271180/scripts.js"],"subdomain":"truefoundry","siteName":"TrueFoundry Docs","title":"Setup Dev, Staging and Prod Environments - TrueFoundry Docs","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T07:27:51.532Z","originalFileLocation":"docs/ai-gateway/setup-multiple-environments.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Recommended ways to run dev, staging, and prod for the AI Gateway across SaaS, self-hosted Gateway Plane, and self-hosted Control Plane setups.\">\u003cmeta data-mint-head name=\"application-name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Setup Dev, Staging and Prod Environments - TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Setup Dev, Staging and Prod Environments - TrueFoundry Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"TrueFoundry offers an enterprise-grade AI Gateway combining LLM, MCP, and Agent Gateways—empowering businesses to connect, monitor, and govern agentic AI applications across providers from a unified control plane.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://assets.production.truefoundry.com/logo.svg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/truefoundry/DMuq4kzeTciVEGUc/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"TrueFoundry Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4f46e5\">\u003clink data-mint-head rel=\"canonical\" href=\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ai-gateway/setup-multiple-environments.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.truefoundry.com/#organization\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/truefoundry/e2uUimEwX30qkWxc/logo/light.svg?fit=max\u0026auto=format\u0026n=e2uUimEwX30qkWxc\u0026q=85\u0026s=6068d83664aeda0239bec2422657dd20\"}},{\"@type\":\"WebSite\",\"@id\":\"https://www.truefoundry.com#website\",\"name\":\"TrueFoundry Docs\",\"url\":\"https://www.truefoundry.com\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments#webpage\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments\",\"name\":\"Setup Dev, Staging and Prod Environments\",\"description\":\"Recommended ways to run dev, staging, and prod for the AI Gateway across SaaS, self-hosted Gateway Plane, and self-hosted Control Plane setups.\",\"dateModified\":\"2026-11-13T07:27:51.532Z\",\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"},\"breadcrumb\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Admin Guide\",\"item\":\"https://www.truefoundry.com/docs/ai-gateway/setup-ai-gateway-in-org\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setup Dev, Staging and Prod Environments\",\"item\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments#article\",\"headline\":\"Setup Dev, Staging and Prod Environments\",\"name\":\"Setup Dev, Staging and Prod Environments\",\"description\":\"Recommended ways to run dev, staging, and prod for the AI Gateway across SaaS, self-hosted Gateway Plane, and self-hosted Control Plane setups.\",\"url\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments\",\"mainEntityOfPage\":{\"@id\":\"https://www.truefoundry.com/docs/ai-gateway/setup-multiple-environments#webpage\"},\"image\":\"https://assets.production.truefoundry.com/logo.svg\",\"dateModified\":\"2026-11-13T07:27:51.532Z\",\"publisher\":{\"@id\":\"https://www.truefoundry.com/#organization\"},\"isPartOf\":{\"@id\":\"https://www.truefoundry.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"TrueFoundry Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"TrueFoundry Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/ai-gateway/setup-multiple-environments.md","siteName":"TrueFoundry Docs","nav":{"global":null,"tabs":[{"tab":"AI Gateway","groups":[{"group":"Get Started","pages":[{"title":"Introduction to AI Gateway","sidebarTitle":"AI Gateway Overview","href":"/docs/ai-gateway/intro-to-llm-gateway"},{"title":"Quick Start Guide: Setup \u0026 Integration","sidebarTitle":"Quick Start","href":"/docs/ai-gateway/quick-start"}]},{"group":"LLM Gateway","pages":[{"group":"Integrate Models","pages":[{"title":"TrueFoundry Managed Models","sidebarTitle":"TrueFoundry Managed Models","href":"/docs/ai-gateway/truefoundry-managed"},{"title":"Providers","sidebarTitle":"Supported Providers","href":"/docs/ai-gateway/supported-providers"},{"title":"OpenAI","sidebarTitle":"OpenAI Models","href":"/docs/ai-gateway/openai"},{"title":"Anthropic","sidebarTitle":"Anthropic","href":"/docs/ai-gateway/anthropic"},{"title":"AWS Claude Platform","sidebarTitle":"AWS Claude Platform","href":"/docs/ai-gateway/aws-claude-platform"},{"title":"AWS Bedrock","sidebarTitle":"AWS Bedrock","href":"/docs/ai-gateway/aws-bedrock"},{"title":"AWS Bedrock Mantle","sidebarTitle":"AWS Bedrock Mantle","href":"/docs/ai-gateway/aws-bedrock-mantle"},{"title":"AWS Sagemaker","sidebarTitle":"AWS Sagemaker","href":"/docs/ai-gateway/aws-sagemaker"},{"title":"Google Vertex","sidebarTitle":"Google Vertex AI","href":"/docs/ai-gateway/google-vertex"},{"title":"Google Gemini","sidebarTitle":"Google Gemini","href":"/docs/ai-gateway/google-gemini"},{"group":"Azure Models","pages":[{"title":"Choosing an Azure model integration","sidebarTitle":"Overview","href":"/docs/ai-gateway/azure-models-guide"},{"title":"Microsoft Foundry","sidebarTitle":"Microsoft Foundry","tag":"NEW","href":"/docs/ai-gateway/microsoft-foundry"},{"title":"Migrate to Microsoft Foundry","sidebarTitle":"Migrate to Microsoft Foundry","href":"/docs/ai-gateway/migrate-to-microsoft-foundry"},{"title":"Azure OpenAI","sidebarTitle":"Azure OpenAI","tag":"LEGACY","href":"/docs/ai-gateway/azure-openai"},{"title":"Azure Foundry","sidebarTitle":"Azure AI Foundry","tag":"LEGACY","href":"/docs/ai-gateway/azure-ai-foundry"},{"group":"Authentication","pages":[{"title":"Azure Entra ID Certificate Based Authentication","sidebarTitle":"Azure Certificate Auth","href":"/docs/ai-gateway/azure-entra-certificate-auth"},{"title":"Azure Entra ID Client Secret Based Authentication","sidebarTitle":"Azure Client Secret Auth","href":"/docs/ai-gateway/azure-entra-client-secret-auth"},{"title":"Azure Workload Identity Federation Authentication","sidebarTitle":"Azure Workload Identity","href":"/docs/ai-gateway/azure-entra-wif-auth"}]}]},{"title":"Databricks","sidebarTitle":"Databricks Models","href":"/docs/ai-gateway/databricks-models"},{"title":"Cohere","sidebarTitle":"Cohere Models","href":"/docs/ai-gateway/cohere"},{"title":"AI21","sidebarTitle":"AI21","href":"/docs/ai-gateway/ai21"},{"title":"Deepinfra","sidebarTitle":"Deepinfra Models","href":"/docs/ai-gateway/deepinfra"},{"title":"Groq","sidebarTitle":"Groq Models","href":"/docs/ai-gateway/groq"},{"title":"ElevenLabs","sidebarTitle":"ElevenLabs","href":"/docs/ai-gateway/elevenlabs"},{"title":"Deepgram","sidebarTitle":"Deepgram","href":"/docs/ai-gateway/deepgram"},{"title":"Cartesia","sidebarTitle":"Cartesia","href":"/docs/ai-gateway/cartesia"},{"title":"Smallest AI","sidebarTitle":"Smallest AI","href":"/docs/ai-gateway/smallest-ai"},{"title":"Mistral AI","sidebarTitle":"Mistral AI Models","href":"/docs/ai-gateway/mistral"},{"title":"Cloudera","sidebarTitle":"Cloudera Models","href":"/docs/ai-gateway/cloudera"},{"title":"OpenRouter","sidebarTitle":"OpenRouter","href":"/docs/ai-gateway/openrouter"},{"title":"Perplexity AI","sidebarTitle":"Perplexity Models","href":"/docs/ai-gateway/perplexity-ai"},{"title":"Together AI","sidebarTitle":"Together AI","href":"/docs/ai-gateway/together-ai"},{"title":"xAI","sidebarTitle":"xAI Models","href":"/docs/ai-gateway/xai"},{"title":"SambaNova","sidebarTitle":"SambaNova","href":"/docs/ai-gateway/sambanova"},{"title":"Cerebras","sidebarTitle":"Cerebras","href":"/docs/ai-gateway/cerebras"},{"title":"Wafer","sidebarTitle":"Wafer","href":"/docs/ai-gateway/wafer"},{"title":"Fireworks AI Model Provider for TrueFoundry AI Gateway","sidebarTitle":"Fireworks AI","href":"/docs/ai-gateway/fireworks-ai"},{"title":"Snowflake Cortex","sidebarTitle":"Snowflake Cortex","href":"/docs/ai-gateway/snowflake-cortex"},{"title":"Baseten","sidebarTitle":"Baseten","href":"/docs/ai-gateway/baseten"},{"title":"TypeSafe","sidebarTitle":"TypeSafe","href":"/docs/ai-gateway/typesafe"},{"group":"Custom Endpoints","root":{"title":"Custom Endpoints","sidebarTitle":"Custom Endpoints","href":"/docs/ai-gateway/custom-endpoints"},"expanded":false,"pages":[{"group":"Examples","pages":[{"title":"CoreWeave","sidebarTitle":"CoreWeave Models","href":"/docs/ai-gateway/coreweave-models"},{"title":"PipeShift","sidebarTitle":"PipeShift","href":"/docs/ai-gateway/pipeshift"},{"title":"SiliconFlow","sidebarTitle":"SiliconFlow","href":"/docs/ai-gateway/siliconflow"},{"title":"io.net","sidebarTitle":"io.net","href":"/docs/ai-gateway/io-net"},{"title":"Resemble AI","sidebarTitle":"Resemble AI","href":"/docs/ai-gateway/resemble-ai"},{"title":"Ringg.AI","sidebarTitle":"Ringg.AI","href":"/docs/ai-gateway/ringg-ai"},{"title":"Crusoe","sidebarTitle":"Crusoe","href":"/docs/ai-gateway/crusoe"},{"title":"Jev (TypeSafe)","sidebarTitle":"Jev","href":"/docs/ai-gateway/jev"},{"title":"SCX.ai","sidebarTitle":"SCX.ai","href":"/docs/ai-gateway/scx-ai"}]}]},{"title":"Self-Hosted Models","sidebarTitle":"Self-Hosted Models","href":"/docs/ai-gateway/self-hosted-models"}]},{"group":"Supported APIs","pages":[{"group":"Chat Completions","root":{"title":"Chat Completions API (/chat/completions)","sidebarTitle":"Overview","href":"/docs/ai-gateway/chat-completions-overview"},"expanded":false,"directory":"accordion","pages":[{"title":"Chat Completions API (/chat/completions)","sidebarTitle":"Overview","href":"/docs/ai-gateway/chat-completions-overview"},{"title":"Chat Completions: Multimodal","sidebarTitle":"Multimodal","href":"/docs/ai-gateway/chat-completions-multimodal"},{"title":"Chat Completions: Tools \u0026 Signatures","sidebarTitle":"Tools","href":"/docs/ai-gateway/chat-completions-tools"},{"title":"Chat Completions: Structured Outputs","sidebarTitle":"Structured Outputs","href":"/docs/ai-gateway/chat-completions-structured-outputs"},{"title":"Chat Completions: Caching \u0026 Reasoning","sidebarTitle":"Caching \u0026 Reasoning","href":"/docs/ai-gateway/chat-completions-advanced"},{"title":"Chat Completions: Extended Thinking","sidebarTitle":"Extended Thinking","href":"/docs/ai-gateway/chat-completions-extended-thinking"}]},{"title":"Embeddings API (/embeddings)","sidebarTitle":"Embeddings","href":"/docs/ai-gateway/embed"},{"title":"Batch API (/batches)","sidebarTitle":"Batch Predictions","href":"/docs/ai-gateway/batch-predictions-with-truefoundry-llm-gateway"},{"title":"Finetune API (/fine_tuning)","sidebarTitle":"Finetuning","href":"/docs/ai-gateway/finetune"},{"title":"Responses API (/responses)","sidebarTitle":"Responses API","href":"/docs/ai-gateway/responses-api"},{"title":"Image Generation API (/images/generations)","sidebarTitle":"Image Generation","href":"/docs/ai-gateway/image-generation"},{"title":"Image Edit API (/images/edits)","sidebarTitle":"Image Edit","href":"/docs/ai-gateway/image-edit"},{"title":"Image Variation API (/images/variations)","sidebarTitle":"Image Variation","href":"/docs/ai-gateway/image-variation"},{"title":"Video Generation API (/videos-proxy)","sidebarTitle":"Video Generation","href":"/docs/ai-gateway/video-generation"},{"title":"Text to Speech API","sidebarTitle":"Text to Speech","href":"/docs/ai-gateway/text-to-speech"},{"title":"Audio Translation API","sidebarTitle":"Audio Translation","href":"/docs/ai-gateway/audio-translation"},{"title":"Speech to Text API","sidebarTitle":"Speech to Text","href":"/docs/ai-gateway/audio-transcription"},{"group":"Live / Realtime API","root":{"title":"Live / Realtime API (/live)","sidebarTitle":"Overview","href":"/docs/ai-gateway/live-api"},"expanded":false,"directory":"accordion","pages":[{"title":"Live / Realtime API (/live)","sidebarTitle":"Overview","href":"/docs/ai-gateway/live-api"},{"title":"Live API: Code Snippets","sidebarTitle":"Code Snippets","href":"/docs/ai-gateway/live-api-code-snippets"},{"title":"Live API: Tool Calling","sidebarTitle":"Tool Calling","href":"/docs/ai-gateway/live-api-tool-calling"},{"title":"OpenAI Realtime with WebRTC","sidebarTitle":"WebRTC (OpenAI)","href":"/docs/ai-gateway/live-api-webrtc"},{"title":"Amazon Nova Sonic (Bedrock)","sidebarTitle":"Nova Sonic (Bedrock)","href":"/docs/ai-gateway/live-api-nova-sonic"}]},{"title":"Files API (/files)","sidebarTitle":"Files API","href":"/docs/ai-gateway/file-endpoints"},{"title":"Rerank API (/rerank)","sidebarTitle":"Rerank API","href":"/docs/ai-gateway/rerank"},{"title":"Moderation API (/moderations)","sidebarTitle":"Moderation API","href":"/docs/ai-gateway/moderation"},{"title":"Compaction API (/responses/compact)","sidebarTitle":"Compaction API","href":"/docs/ai-gateway/compaction"},{"title":"Messages API (/messages)","sidebarTitle":"Messages API","href":"/docs/ai-gateway/messages-overview"},{"title":"Decisions API (/v1/decisions, /v1/systemone)","sidebarTitle":"Decisions API","href":"/docs/ai-gateway/decisions"},{"title":"Proxy API (/proxy)","sidebarTitle":"Proxy API","href":"/docs/ai-gateway/proxy-api"}]},{"group":"Making LLM Requests","pages":[{"title":"Making Your First Request","sidebarTitle":"Making Your First Request","href":"/docs/ai-gateway/making-llm-requests-via-gateway"},{"title":"Authentication","sidebarTitle":"Authentication","href":"/docs/ai-gateway/authentication"},{"title":"Custom Metadata and Headers","sidebarTitle":"Metadata \u0026 Headers","href":"/docs/ai-gateway/request-headers"},{"title":"Native SDK Support","sidebarTitle":"Native SDK Support","href":"/docs/ai-gateway/native-sdk-support"},{"title":"Model Discovery","sidebarTitle":"Model Discovery","href":"/docs/ai-gateway/model-discovery"}]},{"group":"Set Up Your IDEs","pages":[{"title":"Set Up Your IDEs","sidebarTitle":"Overview","href":"/docs/ai-gateway/personal-setup"},{"title":"Claude Code","href":"/docs/ai-gateway/ide-setup/claude-code"},{"title":"Codex (CLI \u0026 Desktop)","href":"/docs/ai-gateway/ide-setup/codex"},{"title":"Claude Desktop","href":"/docs/ai-gateway/ide-setup/claude-desktop"},{"title":"Cursor","href":"/docs/ai-gateway/ide-setup/cursor"},{"title":"VS Code","href":"/docs/ai-gateway/ide-setup/vscode"},{"title":"GitHub Copilot CLI","href":"/docs/ai-gateway/ide-setup/copilot-cli"},{"title":"Gemini CLI","href":"/docs/ai-gateway/ide-setup/gemini-cli"},{"title":"OpenCode","href":"/docs/ai-gateway/ide-setup/opencode"},{"title":"Goose","href":"/docs/ai-gateway/ide-setup/goose"},{"title":"Qwen Code","href":"/docs/ai-gateway/ide-setup/qwen-code"},{"title":"Grok Build","href":"/docs/ai-gateway/ide-setup/grok-build"},{"title":"Pi","href":"/docs/ai-gateway/ide-setup/pi"}]},{"group":"Deploy with MDM","pages":[{"title":"Deploy coding agents with MDM","sidebarTitle":"Overview","href":"/docs/ai-gateway/mdm-setup"},{"title":"Claude Code and Claude Desktop with MDM","sidebarTitle":"Claude Code \u0026 Desktop","href":"/docs/ai-gateway/mdm/claude"},{"title":"Codex with MDM","sidebarTitle":"Codex","href":"/docs/ai-gateway/mdm/codex"},{"title":"MDM configuration reference","sidebarTitle":"Configuration reference","href":"/docs/ai-gateway/mdm/configuration-reference"}]},{"title":"TrueFoundry AI Gateway Playground","sidebarTitle":"AI Gateway Playground","href":"/docs/ai-gateway/playground-overview"},{"group":"Virtual Models","pages":[{"title":"Virtual Models","sidebarTitle":"Overview","href":"/docs/ai-gateway/virtual-model"},{"title":"Create a Virtual Model","sidebarTitle":"Create a Virtual Model","href":"/docs/ai-gateway/virtual-model-advanced"},{"title":"Auto Routing","sidebarTitle":"Auto Routing","href":"/docs/ai-gateway/auto-routing"}]},{"title":"Access Control","sidebarTitle":"Access Control","href":"/docs/ai-gateway/gateway-access-control"},{"group":"Policies","pages":[{"title":"Rate Limiting","sidebarTitle":"Rate Limiting","href":"/docs/ai-gateway/ratelimiting-v2"},{"title":"Rate Limiting (V1, deprecated)","sidebarTitle":"Rate Limiting (V1)","hidden":true,"href":"/docs/ai-gateway/ratelimiting"},{"title":"Budget Limiting","sidebarTitle":"Budget Limiting","href":"/docs/ai-gateway/budget-limiting-v2"},{"title":"Budget Usage Recovery","sidebarTitle":"Budget Usage Recovery","href":"/docs/ai-gateway/budget-usage-recovery"},{"title":"Budget Limiting (V1, deprecated)","sidebarTitle":"Budget Limiting (V1)","hidden":true,"href":"/docs/ai-gateway/budgetlimiting"},{"title":"Logging Configuration","sidebarTitle":"Logging Config","href":"/docs/ai-gateway/logging-config"}]},{"title":"Caching (Exact and Semantic)","sidebarTitle":"Caching (Exact and Semantic)","href":"/docs/ai-gateway/caching"},{"title":"Cost Tracking","sidebarTitle":"Cost Tracking","href":"/docs/ai-gateway/cost-tracking"},{"title":"Cost Savings","sidebarTitle":"Cost Savings","href":"/docs/ai-gateway/cost-savings"},{"group":"Extras","pages":[{"title":"Session Management","sidebarTitle":"Session Management","href":"/docs/ai-gateway/session-management"},{"title":"Log Feedback on Requests","sidebarTitle":"Log Feedback","href":"/docs/ai-gateway/feedback-for-traces"},{"title":"First Chunk Gate for Streaming","sidebarTitle":"First Chunk Gate","href":"/docs/ai-gateway/first-chunk-gate"},{"title":"Anthropic Stream Overload Fallback","sidebarTitle":"Anthropic Stream Fallback","href":"/docs/ai-gateway/anthropic-stream-overload-fallback"}]}]},{"group":"MCP Registry and Gateway","pages":[{"title":"TrueFoundry MCP Gateway","sidebarTitle":"Overview","href":"/docs/ai-gateway/mcp/mcp-overview"},{"title":"MCP Server: Getting Started","sidebarTitle":"Getting Started","href":"/docs/ai-gateway/mcp/mcp-server-getting-started"},{"title":"MCP Protocol Support","sidebarTitle":"Protocol Support","href":"/docs/ai-gateway/mcp/mcp-protocol-support"},{"group":"Authentication and Security","root":{"title":"Authentication and Security","sidebarTitle":"Authentication and Security","href":"/docs/ai-gateway/mcp/mcp-gateway-auth-security"},"pages":[{"title":"Authentication and Security","sidebarTitle":"Authentication and Security","href":"/docs/ai-gateway/mcp/mcp-gateway-auth-security"},{"title":"Auth Overrides","sidebarTitle":"Auth Overrides","href":"/docs/ai-gateway/mcp/mcp-server-auth-overrides"},{"group":"Outbound auth integrations","pages":[{"title":"Okta app setup","sidebarTitle":"Okta App Setup","href":"/docs/ai-gateway/mcp/okta-app-setup"},{"title":"Microsoft Entra app setup","sidebarTitle":"Microsoft Entra App Setup","href":"/docs/ai-gateway/mcp/entra-app-setup"},{"title":"Microsoft Entra On-Behalf-Of (OBO) for MCP","sidebarTitle":"Microsoft Entra OBO App Setup","href":"/docs/ai-gateway/mcp/mcp-server-oauth-azure-obo"},{"title":"Register an AWS Bedrock AgentCore MCP Server","sidebarTitle":"AgentCore (AWS SigV4)","href":"/docs/ai-gateway/mcp/mcp-server-agentcore-sigv4"}]}]},{"title":"MCP Troubleshooting Guide","sidebarTitle":"Troubleshooting Guide","href":"/docs/ai-gateway/mcp/mcp-troubleshooting-guide"},{"title":"MCP Tool Approvals","sidebarTitle":"Tool Approvals","href":"/docs/ai-gateway/mcp/mcp-tool-approval"},{"title":"MCP Tool Management","sidebarTitle":"Tool Management","href":"/docs/ai-gateway/mcp/mcp-tool-management"},{"title":"Connect MCP Servers from Your IDE","sidebarTitle":"Connect MCP Servers from Your IDE","href":"/docs/ai-gateway/mcp/connect-mcp-from-ide"},{"title":"TrueFoundry Managed MCPs","sidebarTitle":"TrueFoundry Managed MCPs","href":"/docs/ai-gateway/mcp/tfy-managed-mcp-server"},{"title":"Virtual MCP Server","sidebarTitle":"Virtual MCP Server","href":"/docs/ai-gateway/mcp/virtual-mcp-server"},{"title":"OpenAPI to MCP Server","sidebarTitle":"OpenAPI to MCP Server","href":"/docs/ai-gateway/mcp/openapi-mcp-server"},{"title":"Hosted Stdio-based MCP Server","sidebarTitle":"Hosted Stdio-based MCP Server","href":"/docs/ai-gateway/mcp/stdio-mcp-server"},{"group":"MCP Server Guides","pages":[{"group":"Creating MCP Servers","pages":[{"title":"Create a Basic Calculator MCP Server","sidebarTitle":"Basic Calculator MCP Server","href":"/docs/ai-gateway/mcp/create-calculator-mcp-server"},{"title":"Add Okta OAuth to a Calculator MCP Server","sidebarTitle":"Okta OAuth MCP server","href":"/docs/ai-gateway/mcp/mcp-server-oauth-okta"},{"title":"Create an OAuth MCP Server with Azure Entra ID","sidebarTitle":"Azure Entra ID OAuth MCP Server","href":"/docs/ai-gateway/mcp/mcp-server-oauth-azure"}]}]}]},{"group":"Skills Registry","pages":[{"title":"AI Gateway Skills Registry","sidebarTitle":"Overview","href":"/docs/ai-gateway/skills/skills-registry"},{"title":"Create, Manage, and Use Skills","sidebarTitle":"Create, Manage and Use Skills","href":"/docs/ai-gateway/skills/getting-started"}]},{"group":"Prompt Registry","pages":[{"title":"Prompt Management","sidebarTitle":"Create, Manage and Use Prompts","href":"/docs/ai-gateway/prompt-management"}]},{"group":"Guardrails and Security","pages":[{"title":"AI Gateway Guardrails Overview","sidebarTitle":"Overview","href":"/docs/ai-gateway/guardrails-overview"},{"title":"AI Gateway Guardrails: Quick Start","sidebarTitle":"Getting Started","href":"/docs/ai-gateway/guardrails-getting-started"},{"title":"Configure Guardrail Policies","sidebarTitle":"Configure Guardrail Policies","href":"/docs/ai-gateway/guardrails-configuration"},{"title":"Guardrails Best Practices","sidebarTitle":"Best Practices","href":"/docs/ai-gateway/guardrails-best-practices"},{"group":"TrueFoundry Guardrails","root":{"title":"TrueFoundry Guardrails","sidebarTitle":"Overview","href":"/docs/ai-gateway/truefoundry-guardrails"},"pages":[{"title":"TrueFoundry Guardrails","sidebarTitle":"Overview","href":"/docs/ai-gateway/truefoundry-guardrails"},{"title":"Secrets Detection Guardrail","sidebarTitle":"Secrets Detection","href":"/docs/ai-gateway/secrets-detection"},{"title":"Code Safety Linter Guardrail","sidebarTitle":"Code Safety Linter","href":"/docs/ai-gateway/code-safety-linter"},{"title":"SQL Sanitizer Guardrail","sidebarTitle":"SQL Sanitizer","href":"/docs/ai-gateway/sql-sanitizer"},{"title":"Regex Pattern Match Guardrail","sidebarTitle":"Regex Pattern Match","href":"/docs/ai-gateway/regex-pattern-matching"},{"title":"Prompt Injection Guardrail","sidebarTitle":"Prompt Injection","href":"/docs/ai-gateway/tfy-prompt-injection"},{"title":"PII/PHI Detection Guardrail","sidebarTitle":"PII/PHI","href":"/docs/ai-gateway/tfy-pii"},{"title":"Content Moderation Guardrail","sidebarTitle":"Content Moderation","href":"/docs/ai-gateway/tfy-content-moderation"},{"title":"Metadata Validation Guardrail","sidebarTitle":"Metadata Validation","href":"/docs/ai-gateway/metadata-validation"},{"title":"Cedar Guardrails","sidebarTitle":"Cedar Guardrails","href":"/docs/ai-gateway/cedar-guardrails"},{"title":"OPA Guardrails","sidebarTitle":"OPA Guardrails","href":"/docs/ai-gateway/opa-guardrails"}]},{"group":"External Providers","pages":[{"title":"Akto Integration","sidebarTitle":"Akto","href":"/docs/ai-gateway/akto"},{"title":"Arthur AI","sidebarTitle":"Arthur AI","href":"/docs/ai-gateway/arthur-ai"},{"title":"AWS Bedrock Guardrail Integration","sidebarTitle":"AWS Bedrock Guardrail","href":"/docs/ai-gateway/bedrock-guardrails"},{"title":"Azure Content Safety Guardrail Integration","sidebarTitle":"Azure Content Safety","href":"/docs/ai-gateway/azure-content-safety"},{"title":"Azure PII Guardrail Integration","sidebarTitle":"Azure PII","href":"/docs/ai-gateway/azure-pii"},{"title":"Azure Prompt Shield Guardrail Integration","sidebarTitle":"Azure Prompt Shield","href":"/docs/ai-gateway/azure-prompt-shield"},{"title":"Bigeye","sidebarTitle":"Bigeye","href":"/docs/ai-gateway/bigeye"},{"title":"CrowdStrike AIDR Integration","sidebarTitle":"CrowdStrike AIDR","href":"/docs/ai-gateway/crowdstrike"},{"title":"Cato Networks","sidebarTitle":"Cato Networks","href":"/docs/ai-gateway/cato-networks"},{"title":"Cisco AI Defense Integration","sidebarTitle":"Cisco AI Defense","href":"/docs/ai-gateway/cisco-ai-defense"},{"title":"DeepKeep AI Firewall","sidebarTitle":"DeepKeep","href":"/docs/ai-gateway/deepkeep"},{"title":"Enkrypt AI Guardrail Integration","sidebarTitle":"Enkrypt AI","href":"/docs/ai-gateway/enkrypt-ai"},{"title":"F5 AI Security (CalypsoAI) Integration","sidebarTitle":"F5 AI Security","href":"/docs/ai-gateway/f5-calypsoai"},{"title":"Fiddler Integration","sidebarTitle":"Fiddler","href":"/docs/ai-gateway/fiddler"},{"title":"Fireworks Safety Model Guardrail for TrueFoundry AI Gateway","sidebarTitle":"Fireworks","href":"/docs/ai-gateway/fireworks"},{"title":"Google Model Armor Guardrail Integration","sidebarTitle":"Google Model Armor","href":"/docs/ai-gateway/google-model-armor"},{"title":"Gray Swan Cygnal","sidebarTitle":"Gray Swan Cygnal","href":"/docs/ai-gateway/grayswan-cygnal"},{"title":"Guardrails AI Integration","sidebarTitle":"Guardrails AI","href":"/docs/ai-gateway/guardrails-ai"},{"title":"HiddenLayer Integration","sidebarTitle":"HiddenLayer","href":"/docs/ai-gateway/hiddenlayer"},{"title":"CoreWeave Weave Guardrails Integration","sidebarTitle":"CoreWeave Guardrails","href":"/docs/ai-gateway/coreweave-weave-guardrails"},{"title":"Lasso Security","sidebarTitle":"Lasso Security","href":"/docs/ai-gateway/lasso-security"},{"title":"Noma Security","sidebarTitle":"Noma Security","href":"/docs/ai-gateway/noma-security"},{"title":"NVIDIA NeMo Guardrails Integration","sidebarTitle":"NVIDIA NeMo","href":"/docs/ai-gateway/nvidia-nemo"},{"title":"OpenAI Moderation Integration","sidebarTitle":"OpenAI Moderation","href":"/docs/ai-gateway/openai-moderations"},{"title":"Onyx Security","sidebarTitle":"Onyx Security","href":"/docs/ai-gateway/onyx-security"},{"title":"Palo Alto Prisma AIRS Integration","sidebarTitle":"Palo Alto Prisma AIRS","href":"/docs/ai-gateway/palo-alto-airs"},{"title":"Patronus AI Integration","sidebarTitle":"Patronus AI","href":"/docs/ai-gateway/patronus"},{"title":"Pillar Security Integration","sidebarTitle":"Pillar Security","href":"/docs/ai-gateway/pillar-security"},{"title":"Straiker","sidebarTitle":"Straiker","href":"/docs/ai-gateway/straiker"},{"title":"TrojAI DEFEND Integration","sidebarTitle":"TrojAI","href":"/docs/ai-gateway/trojai"},{"title":"Verra","sidebarTitle":"Verra","href":"/docs/ai-gateway/verra"},{"title":"Zscaler AI Guard guardrail for prompts and responses","sidebarTitle":"Zscaler AI Guard","href":"/docs/ai-gateway/zscaler-ai-guard"}]},{"title":"Custom Guardrail/Plugins Configuration","sidebarTitle":"Bring your own Guardrail / Plugin","href":"/docs/ai-gateway/custom-guardrails"}]},{"group":"Observability","pages":[{"title":"Metrics Dashboard","sidebarTitle":"Metrics Dashboard","href":"/docs/ai-gateway/analytics"},{"title":"Request Logging","sidebarTitle":"Request Logging","href":"/docs/ai-gateway/request-logging"},{"title":"Configure Data Access","sidebarTitle":"Configure Data Access","href":"/docs/ai-gateway/data-access"},{"title":"Configure Data Routing","sidebarTitle":"Configure Data Routing","href":"/docs/ai-gateway/data-routing"},{"group":"Export Logs and Metrics","pages":[{"title":"Export OpenTelemetry Data","sidebarTitle":"Export via OpenTelemetry","href":"/docs/ai-gateway/export-opentelemetry-data"},{"title":"Prometheus Grafana Integration","sidebarTitle":"Prometheus \u0026 Grafana","href":"/docs/ai-gateway/prometheus-grafana-integration"}]},{"group":"API Access to Metrics","expanded":false,"pages":[{"title":"Model Metrics","sidebarTitle":"Model Metrics","href":"/docs/ai-gateway/fetch-model-metrics"},{"title":"MCP Metrics","sidebarTitle":"MCP Metrics","href":"/docs/ai-gateway/fetch-mcp-metrics"},{"title":"Guardrail Metrics","sidebarTitle":"Guardrail Metrics","href":"/docs/ai-gateway/fetch-guardrail-metrics"},{"title":"Cache Metrics","sidebarTitle":"Cache Metrics","href":"/docs/ai-gateway/fetch-cache-metrics"},{"title":"Routing Metrics","sidebarTitle":"Routing Metrics","href":"/docs/ai-gateway/fetch-routing-metrics"},{"title":"Agent Metrics","sidebarTitle":"Agent Metrics","href":"/docs/ai-gateway/fetch-agent-metrics"}]},{"group":"API Access to Logs","root":{"title":"API Access to Logs","sidebarTitle":"Overview","href":"/docs/ai-gateway/fetch-request-logs"},"expanded":false,"directory":"accordion","pages":[{"title":"API Access to Logs","sidebarTitle":"Overview","href":"/docs/ai-gateway/fetch-request-logs"},{"title":"Request Logs: Trace Inspection","sidebarTitle":"Trace Inspection","href":"/docs/ai-gateway/fetch-request-logs-trace-inspection"},{"title":"Request Logs: Filtering","sidebarTitle":"Filtering","href":"/docs/ai-gateway/fetch-request-logs-filtering"},{"group":"Use Cases","expanded":false,"pages":[{"title":"Request Logs: Common Use Cases","sidebarTitle":"Basic Queries","href":"/docs/ai-gateway/fetch-request-logs-use-cases"},{"title":"Request Logs: Advanced Queries","sidebarTitle":"Advanced Queries","href":"/docs/ai-gateway/fetch-request-logs-use-cases-advanced"}]},{"group":"Span Attributes","expanded":false,"pages":[{"title":"Request Logs: Span Attributes","sidebarTitle":"TrueFoundry Attributes","href":"/docs/ai-gateway/fetch-request-logs-span-attributes"},{"title":"GenAI Span Attributes","sidebarTitle":"GenAI Attributes","href":"/docs/ai-gateway/fetch-request-logs-span-attributes-genai"}]}]}]},{"group":"Deployment","pages":[{"title":"Gateway Architecture","sidebarTitle":"Architecture","href":"/docs/ai-gateway/gateway-architecture"},{"title":"Deployment Options","sidebarTitle":"Deployment Options","href":"/docs/ai-gateway/modes-of-deployment"},{"title":"Globally Distributed SAAS Gateway","sidebarTitle":"Globally Distributed SAAS","href":"/docs/ai-gateway/globally-distributed-saas"},{"title":"Connect Private Models and MCP Servers","sidebarTitle":"Connect Private Endpoints","href":"/docs/ai-gateway/connect-private-models-mcp-servers"},{"title":"Install LLM Gateway (Standalone)","sidebarTitle":"Install AI Gateway","href":"/docs/ai-gateway/install-only-llm-gateway"}]},{"group":"Admin Guide","pages":[{"title":"Setup AI Gateway in Your Organization","sidebarTitle":"Setup AI Gateway in Org","href":"/docs/ai-gateway/setup-ai-gateway-in-org"},{"title":"Govern All AI Traffic Through the AI Gateway","sidebarTitle":"Govern All AI Traffic","description":"Reference architecture for routing every model call through the AI Gateway using native integrations, the aitori on-device agent, and your existing SWG.","href":"/docs/ai-gateway/govern-traffic-through-ai-gateway"},{"title":"Setup Dev, Staging and Prod Environments","sidebarTitle":"Setup Multiple Environments","href":"/docs/ai-gateway/setup-multiple-environments"},{"title":"Use Secret Manager in Integrations","sidebarTitle":"Use Secret Manager","description":"Store API keys and other sensitive credentials in Secret manager and reference them in Model, MCP server, and Guardrail integrations.","href":"/docs/ai-gateway/secret-manager-in-ai-gateway"}]},{"group":"Chat","pages":[{"title":"Chat Completions","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /chat/completions","href":"/docs/api-reference/chat/chat-completions"}]},{"group":"Messages","pages":[{"title":"Messages","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /messages","href":"/docs/api-reference/messages/messages"},{"title":"Count Tokens","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /messages/count_tokens","href":"/docs/api-reference/messages/count-tokens"}]},{"group":"Embeddings","pages":[{"title":"Generate Embeddings","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /embeddings","href":"/docs/api-reference/embeddings/generate-embeddings"}]},{"group":"Rerank","pages":[{"title":"Rerank Documents","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /v2/rerank","href":"/docs/api-reference/rerank/rerank-documents"}]},{"group":"Responses","pages":[{"title":"List Model Response Input Items","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /responses/{id}/input_items","href":"/docs/api-reference/responses/list-model-response-input-items"},{"title":"Get Model Response","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /responses/{id}","href":"/docs/api-reference/responses/get-model-response"},{"title":"Delete Model Response","deprecated":null,"version":null,"openapi":"/gateway-openapi.json delete /responses/{id}","href":"/docs/api-reference/responses/delete-model-response"},{"title":"Model Responses","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /responses","href":"/docs/api-reference/responses/model-responses"},{"title":"Model Responses Compact","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /responses/compact","href":"/docs/api-reference/responses/model-responses-compact"}]},{"group":"Image","pages":[{"title":"Generate Images","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/generations","href":"/docs/api-reference/image/generate-images"},{"title":"Edit Images","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/edits","href":"/docs/api-reference/image/edit-images"},{"title":"Create Image Variation","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /images/variations","href":"/docs/api-reference/image/create-image-variation"}]},{"group":"Audio","pages":[{"title":"Transcribe Audio","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/transcriptions","href":"/docs/api-reference/audio/transcribe-audio"},{"title":"Translate Audio","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/translations","href":"/docs/api-reference/audio/translate-audio"},{"title":"Generate Speech","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /audio/speech","href":"/docs/api-reference/audio/generate-speech"}]},{"group":"Batch","pages":[{"title":"List Batches","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches","href":"/docs/api-reference/batch/list-batches"},{"title":"Create Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /batches","href":"/docs/api-reference/batch/create-batch"},{"title":"Get Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches/{id}","href":"/docs/api-reference/batch/get-batch"},{"title":"Get Batch Output","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /batches/{id}/output","href":"/docs/api-reference/batch/get-batch-output"},{"title":"Cancel Batch","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /batches/{id}/cancel","href":"/docs/api-reference/batch/cancel-batch"}]},{"group":"Files","pages":[{"title":"List Files","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files","href":"/docs/api-reference/files/list-files"},{"title":"Upload File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /files","href":"/docs/api-reference/files/upload-file"},{"title":"Get File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files/{id}","href":"/docs/api-reference/files/get-file"},{"title":"Delete File","deprecated":null,"version":null,"openapi":"/gateway-openapi.json delete /files/{id}","href":"/docs/api-reference/files/delete-file"},{"title":"Get File Content","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /files/{id}/content","href":"/docs/api-reference/files/get-file-content"}]},{"group":"Fine-tuning","pages":[{"title":"List Fine-tuning Jobs","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /fine_tuning/jobs","href":"/docs/api-reference/fine-tuning/list-fine-tuning-jobs"},{"title":"Create Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /fine_tuning/jobs","href":"/docs/api-reference/fine-tuning/create-fine-tuning-job"},{"title":"Retrieve Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /fine_tuning/jobs/{fine_tuning_job_id}","href":"/docs/api-reference/fine-tuning/retrieve-fine-tuning-job"},{"title":"Cancel Fine-tuning Job","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /fine_tuning/jobs/{fine_tuning_job_id}/cancel","href":"/docs/api-reference/fine-tuning/cancel-fine-tuning-job"}]},{"group":"Moderations","pages":[{"title":"Create Moderation","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /moderations","href":"/docs/api-reference/moderations/create-moderation"}]},{"group":"Video","pages":[{"title":"Poll or Download Video","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /videos-proxy/{providerAccountName}/{nativePath}","href":"/docs/api-reference/video/poll-or-download-video"},{"title":"Generate Video","deprecated":null,"version":null,"openapi":"/gateway-openapi.json post /videos-proxy/{providerAccountName}/{nativePath}","href":"/docs/api-reference/video/generate-video"}]},{"group":"Models","pages":[{"title":"List available models","deprecated":null,"version":null,"openapi":"/gateway-openapi.json get /models","href":"/docs/api-reference/models/list-available-models"}]}]},{"tab":"Agent Platform","pages":[{"title":"Agent Platform","href":"/docs/agent-platform/agent-harness/overview"}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/docs/platform/overview"}]},{"tab":"AI Deployment","pages":[{"title":"AI Deployment","href":"/docs/ai-deployment-overview"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/docs/truefoundry_sdk"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/docs/ai-gateway/ecosystem"}]},{"tab":"Changelog","groups":[{"group":" ","pages":[{"title":"Changelog","href":"/docs/changelog"},{"group":"Announcements","pages":[{"title":"Deprecation of Rate Limiting V1 — 2nd November, 2026","href":"/docs/change-announcements/deprecation-of-rate-limiting-v1"},{"title":"Move to Named Guardrail Policies — v0.179","href":"/docs/change-announcements/named-guardrails-config-v0.179"},{"title":"Perplexity Models Move to the Agent API","href":"/docs/change-announcements/perplexity-agent-api-migration"},{"title":"Plan-Based Feature Gating — v0.174.0","href":"/docs/change-announcements/plan-based-feature-gating-v0.174.0"},{"title":"Agent Builder Moving to Trueforge \u0026 Agent APIs Deprecated — v0.172","href":"/docs/change-announcements/agents-moving-to-trueforge"},{"title":"Removing Collaborators from Resources — v0.172.0","href":"/docs/change-announcements/removing-collaborators-from-resources"},{"title":"Deprecation of MCP tool_settings — 26th October, 2026","href":"/docs/change-announcements/deprecation-of-mcp-tool-settings"},{"title":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages","sidebarTitle":"Deprecation of truefoundry \u003c 0.17.0 and truefoundry-sdk \u003c 0.4.0 packages - 19th August 2026","href":"/docs/change-announcements/deprecation-of-truefoundry-below-0.17-and-api-ml"},{"title":"Minimum Python Version Raised to 3.10 — truefoundry v0.17.0","href":"/docs/change-announcements/python-3.10-minimum-truefoundry-cli-v0.17.0"},{"title":"Budget Limiting V2 — v0.158.0","href":"/docs/change-announcements/budget-limiting-v2-v0.158.0"},{"title":"Deprecation of MCP Servers APIs — 30th September, 2026","href":"/docs/change-announcements/deprecation-of-mcp-servers-v1-apis"},{"title":"Deprecation of Images and Plots in Job Runs — v0.156.0","href":"/docs/change-announcements/deprecation-of-images-and-plots-in-job-runs-v0.156.0"},{"title":"Moving to External Secrets Operator for Secrets Management — v0.151.5","href":"/docs/change-announcements/moving-to-eso-for-secret-management-v0.151.5"},{"title":"MCP DCR client_id \u0026 Redirect URL Validation — v0.148","href":"/docs/change-announcements/mcp-dcr-client-id-validation-v0.148"},{"title":"Deprecation of Routing Config","href":"/docs/change-announcements/deprecation-of-routing-config"},{"title":"Identity and Access Revamp — v0.143","href":"/docs/change-announcements/identity-and-access-revamp-v0.143"},{"title":"AI Gateway Metrics Rename — v0.136","href":"/docs/change-announcements/refactoring-of-ai-gateway-metrics"},{"title":"Deprecation of MCP Servers in Prompts","href":"/docs/change-announcements/deprecation-of-mcp-servers-in-prompts"},{"title":"Deprecation of Common Tools in Playground and Settings — v0.135","href":"/docs/change-announcements/deprecation-of-common-tools-v0-135-0"},{"title":"x-tfy-routing-config Header Removal — v0.133","href":"/docs/change-announcements/routing-config-header-removal-v0.133"},{"title":"Simplified GitOps CI/CD with tfy apply — v0.132","href":"/docs/change-announcements/simplified-gitops-cicd-v0.132"},{"title":"Legacy MCP OAuth Routes Removal — v0.134","href":"/docs/change-announcements/legacy-mcp-oauth-routes-removal"},{"title":"MCP Gateway URL and Transport Changes — v0.130","href":"/docs/change-announcements/mcp-gateway-url-transport-v0.130"},{"title":"Gemini CLI Model Registration Requirement — v0.118","href":"/docs/change-announcements/gemini-cli-model-registration-v0.118"},{"title":"Guardrails YAML Schema Change — v0.116","href":"/docs/change-announcements/guardrails-yaml-schema-change-v0.116"},{"title":"MCP Server Groups Removal — v0.112","href":"/docs/change-announcements/mcp-server-groups-removal-v0.112"}]}]}]}]},"basePath":"","title":"Setup Dev, Staging and Prod Environments - TrueFoundry Docs","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":[],"chunks":[]}