TrueFoundry AI Gateway is a unified API gateway that provides observability, cost tracking, rate limiting, and access control for AI model inference. By routing your Cerebras requests through TrueFoundry, you gain comprehensive visibility into your AI operations while maintaining centralized control over access and spending.Key benefits include:
Comprehensive Observability - Track all API calls, latencies, and errors in one place with detailed request logging
Cost Management - Monitor and control spending across models and teams with real-time cost tracking
Access Control - Manage API keys and permissions centrally with role-based access
Rate Limiting - Protect your applications from unexpected usage spikes with configurable limits
Analytics Dashboard - Visualize usage patterns and performance metrics across your organization
From the TrueFoundry dashboard, navigate to the Cerebras models section:
Go to AI Gateway > Models > Cerebras
Navigate to AI Gateway > Models > Cerebras
This opens the Cerebras configuration panel where you’ll add your account and models.
2
Add your Cerebras account
Click Add Cerebras Account to configure your Cerebras API credentials:
Add your Cerebras account credentials
Click the Add Cerebras Account button
Enter your Account Name (e.g., “Production” or “Development”)
Enter your Cerebras API Key from the prerequisites step
Optionally add Collaborators who should have access
Click Save
You can configure multiple Cerebras accounts with different access controls. This is useful for separating production and development environments or managing different teams. See Access Control for more details.
3
Add Cerebras models
Click + Add Model to add Cerebras models to your gateway. Unlike other providers, you need to get the Model ID directly from the Cerebras documentation.To add a model:
Configure any model-specific settings like rate limits or access controls
Click Save to activate the model
For Cerebras, you don’t select from a dropdown list. Instead, copy the exact Model ID from the Cerebras docs and paste it in the Model ID field.
4
Get your TrueFoundry API credentials
After configuring your models, TrueFoundry will provide you with gateway credentials. These credentials authenticate your application to the TrueFoundry gateway, which then routes requests to Cerebras.Find your credentials in the AI Gateway settings:
Navigate to AI Gateway > API Credentials
Copy your Gateway Base URL (e.g., https://gateway.truefoundry.ai)
Copy your Gateway API Key (a JWT token)
Keep these credentials secure - they provide access to all models configured in your gateway.
5
Install required dependencies
Install the OpenAI Python SDK, which is compatible with Cerebras through TrueFoundry’s OpenAI-compatible API:
pip install openai python-dotenv
The python-dotenv package helps manage environment variables securely.
6
Configure environment variables
Create a .env file in your project directory to store your TrueFoundry credentials securely:
Replace the placeholder values with your actual credentials from Step 4.
Never commit your .env file to version control. Add it to your .gitignore file to keep your credentials secure.
7
Initialize the client
Set up the OpenAI client to route requests through TrueFoundry’s gateway. The gateway intercepts your requests, captures observability data, and forwards them to Cerebras.
Use the model ID returned by TrueFoundry model discovery, such as cerebras/gpt-oss-120b. The provider-account prefix tells the gateway which configured Cerebras account should handle the request.
TrueFoundry supports streaming responses from Cerebras models, allowing you to process tokens as they’re generated. This is ideal for building responsive chat interfaces or processing long-form content.
import osfrom openai import OpenAIfrom dotenv import load_dotenvload_dotenv()client = OpenAI( api_key=os.getenv("TRUEFOUNDRY_API_KEY"), base_url=os.getenv("TRUEFOUNDRY_BASE_URL"), default_headers={ "X-Cerebras-3rd-Party-Integration": "TrueFoundry" })# Stream the responsestream = client.chat.completions.create( model="cerebras/gpt-oss-120b", messages=[ {"role": "user", "content": "Write a short story about a robot."} ], stream=True)for chunk in stream: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="")
Add custom metadata to your requests for better tracking and analytics. TrueFoundry captures these headers and makes them available in your analytics dashboard for filtering and analysis.
These custom headers will appear in your TrueFoundry analytics dashboard, making it easy to filter and analyze requests by user, session, or environment.
TrueFoundry allows you to set rate limits and budget controls directly in the dashboard to prevent unexpected costs and manage usage across your organization.To configure rate limits:
Navigate to AI Gateway > Rate Limiting
Configure limits per user, API key, or model
Set daily or monthly budget caps to prevent unexpected costs
Configure alerts to notify you when limits are approached
Create virtual models that combine multiple Cerebras models with custom routing logic, fallback strategies, and load balancing. This allows you to optimize for cost, performance, or availability.Learn more in the TrueFoundry Virtual Models documentation.
Access detailed logs for all requests through the TrueFoundry dashboard. Each log entry includes the full request and response payload, latency metrics, token usage, and any custom metadata you’ve added.To view logs:
Go to AI Gateway > Observability > Request Logging
Filter by model, user, time range, or custom metadata
View request and response payloads, latencies, and errors
Export logs for further analysis or compliance requirements
Monitor your Cerebras spending in real-time with TrueFoundry’s cost tracking dashboard. View costs broken down by model, user, team, or any custom dimension you’ve configured.To access cost tracking:
Navigate to AI Gateway > Cost Tracking
View costs broken down by model, user, or time period
Visualize usage patterns and performance metrics across your organization with TrueFoundry’s analytics dashboard. Track key metrics like request volume, latency percentiles, error rates, and token usage.Key metrics available:
Request Volume - Total requests over time, broken down by model
Latency - P50, P95, and P99 latency percentiles
Error Rates - Track errors by type and model
Token Usage - Monitor input and output tokens across models
Cost Trends - Visualize spending patterns over time
Discover TrueFoundry’s full capabilities including virtual models, guardrails, and advanced routing
Set Up Rate Limiting
Configure rate limits and budget controls to manage costs and prevent unexpected usage
Configure Custom Metadata
Add custom metadata to requests for better tracking and analytics
Try Different Models
Explore Cerebras models to find the best fit for your use case
Set Up Alerting
Configure alerts for cost thresholds, error rates, and performance issues
Enable Caching
Reduce costs and latency by caching repeated queries
Was this page helpful?
⌘I
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Cerebras Inference","colors":{"primary":"#F1592A","light":"#FFFFFF","dark":"#0C0C0E"},"logo":{"light":"https://mintcdn.com/cerebras-inference/b3jx4ZXgBWCXv7Rn/logo/2.png?fit=max\u0026auto=format\u0026n=b3jx4ZXgBWCXv7Rn\u0026q=85\u0026s=98684d23487c722617419a5dbeb0c678","dark":"https://mintcdn.com/cerebras-inference/b3jx4ZXgBWCXv7Rn/logo/1.png?fit=max\u0026auto=format\u0026n=b3jx4ZXgBWCXv7Rn\u0026q=85\u0026s=7710d16c35881e9aa3b9c98143774cbb"},"favicon":"https://mintcdn.com/cerebras-inference/b3jx4ZXgBWCXv7Rn/favicon.png?fit=max\u0026auto=format\u0026n=b3jx4ZXgBWCXv7Rn\u0026q=85\u0026s=4f324cdd1181fbe51cd2ef0857fc4ad4","api":{"params":{"expanded":"all"},"playground":{"display":"simple"},"examples":{"languages":["python","javascript","bash"]}},"navbar":{"links":[{"href":"https://discord.gg/a5TYzrJ444","label":"Community"},{"href":"https://www.cerebras.ai/blog","label":"Blog"}],"primary":{"type":"button","label":"Cloud Console","href":"https://cloud.cerebras.ai/?utm_source=3pi_docs\u0026utm_campaign=navigation"}},"fonts":{"heading":{"family":"Manrope"},"body":{"family":"Manrope"}},"styling":{"eyebrows":"breadcrumbs","latex":true},"integrations":{"gtm":{"tagId":"GTM-KBZT7S7N"}},"contextual":{"options":["copy","mcp","view"],"display":"toc"},"navigation":{"global":{"anchors":[{"anchor":"Python SDK","icon":"github","href":"https://github.com/Cerebras/cerebras-cloud-sdk-python"},{"anchor":"Node.js SDK","icon":"github","href":"https://github.com/Cerebras/cerebras-cloud-sdk-node"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"cerebras-inference","hasAudioNarration":false,"actualSubdomain":"cerebras-inference","customDomains":["inference-docs.cerebras.ai"],"gitSource":{"type":"github","owner":"cerebras","repo":"inference-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae26652f2f9df0e59886dfa","collectionId":"a924aee8-5524-4a83-9fa3-96929cc8fc24","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae26652f2f9df0e59886dfa"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"ENABLED"},"CONTEXTUAL_FEEDBACK":{"status":"ENABLED"},"CODE_SNIPPET_FEEDBACK":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae26652f2f9df0e59886dfa","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"Integrations","count":48},{"language":"default","tag":"Docs","count":33},{"language":"default","tag":"API Reference","count":26},{"language":"default","tag":"Cookbook","count":26},{"language":"default","tag":"Management","count":9},{"language":"default","tag":"Observability \u0026 Evaluation","count":9},{"language":"default","tag":"Research Agents","count":8},{"language":"default","tag":"Capabilities","count":7},{"language":"default","tag":"Models","count":6},{"language":"default","tag":"Dedicated Inference","count":6}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":false,"email":"support@cerebras.net","showHelpButton":false}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[],"privacy":{"consentBanner":{"enabled":false}},"googleFontsInlined":true},"customCss":[{"filePath":"fonts.css","content":"/* latin-ext */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: italic;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lLu745KGk_R3uxyq0WrROhKpGRTW9Gzm8.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: italic;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lLu745KGk_R3uxyq0WrROhKpGRQ29G.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lVu745KGk_R3uxyq0WrROhKpqhQXdC.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lVu745KGk_R3uxyq0WrROhKpShQQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n"},{"filePath":"style.css","content":"/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 300;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 600;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* cyrillic-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggqxSuXd.woff2) format('woff2');\n unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;\n}\n/* cyrillic */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggOxSuXd.woff2) format('woff2');\n unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;\n}\n/* greek */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggSxSuXd.woff2) format('woff2');\n unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;\n}\n/* vietnamese */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggixSuXd.woff2) format('woff2');\n unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggmxSuXd.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Manrope';\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/manrope/v23/xn7gYHE41ni1AdIRggexSg.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: italic;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lLu745KGk_R3uxyq0WrROhKpGRTW9Gzm8.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: italic;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lLu745KGk_R3uxyq0WrROhKpGRQ29G.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n/* latin-ext */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lVu745KGk_R3uxyq0WrROhKpqhQXdC.woff2) format('woff2');\n unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;\n}\n/* latin */\n@font-face {\n font-family: 'Sometype Mono';\n font-style: normal;\n font-weight: 400 700;\n font-display: swap;\n src: url(/_mintlify/assets/fonts/google/s/sometypemono/v4/70lVu745KGk_R3uxyq0WrROhKpShQQ.woff2) format('woff2');\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\n}\n#navbar .h-6{height:3rem;padding-top:3px;padding-bottom:3px}:root{--cerebras-brand-50:#F1592A;--cerebras-brand-55:#C0441F;--cerebras-interactive-10:#F2F9FB;--cerebras-interactive-50:#F1592A;--cerebras-interactive-55:#C0441F;--cerebras-neutral-90:#1B1A1E;--cerebras-neutral-95:#161519;--cerebras-neutral-15:#EAEAEB;--cerebras-neutral-60:#424049;--cerebras-shadow-soft:0px 1px 4px 0px #0000000F;--cerebras-shadow-soft-md:0px 2px 6px 1px #0000000F}body,html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:geometricPrecision;font-family:'Manrope',ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'Helvetica Neue',Arial,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol','Noto Color Emoji'}link{color:inherit;text-decoration-color:var(--cerebras-brand-55)}link:hover{color:var(--cerebras-brand-50);text-decoration-color:var(--cerebras-brand-50)}.sidebar-group-header{text-transform:uppercase!important;font-family:\"Sometype Mono\"}#content-area{max-width:80ch;margin:0 auto;font-size:.95rem;line-height:1.55}#content-area table{width:100%;color:var(--cerebras-neutral-95);background:#fff;border:1px solid var(--cerebras-neutral-15);border-radius:.75rem;box-shadow:var(--cerebras-shadow-soft);overflow:hidden}body:has(.compact-tables-page) #content-area table{width:fit-content!important}#content-area thead tr{border-bottom:2px solid var(--cerebras-neutral-15)}#content-area tbody tr{border-bottom:1px solid var(--cerebras-neutral-15)}#content-area tbody tr:last-child{border-bottom:0}#content-area :is(th, td){padding:.5rem;vertical-align:top}html.dark #content-area table,html[style*=\"color-scheme: dark\"] #content-area table,html[style*=\"color-scheme:dark\"] #content-area table{color:var(--cerebras-neutral-15);background:var(--cerebras-neutral-95);border-color:var(--cerebras-neutral-60)}html.dark #content-area tbody tr,html.dark #content-area thead tr,html[style*=\"color-scheme: dark\"] #content-area tbody tr,html[style*=\"color-scheme: dark\"] #content-area thead tr,html[style*=\"color-scheme:dark\"] #content-area tbody tr,html[style*=\"color-scheme:dark\"] #content-area thead tr{border-bottom-color:var(--cerebras-neutral-60)}#content-area td:first-child{font-weight:600}#content-area :is(h1, h2, h3){letter-spacing:-.02em}#content-area :is(h1, h2),#content-area :is(h3, h4){font-weight:600}.hero-heading{font-family:-apple-system,BlinkMacSystemFont,'Inter','SF Pro Display','Segoe UI','Roboto','Helvetica Neue',Arial,sans-serif;letter-spacing:-.02em;font-weight:400;text-shadow:0 2px 20px rgba(0,0,0,.3)}.hero-heading-gradient{background:linear-gradient(135deg,#ffe366 ,#fb490e);-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text}.hero-subheading,.section-heading{font-family:-apple-system,BlinkMacSystemFont,'Inter','SF Pro Display','Segoe UI','Roboto','Helvetica Neue',Arial,sans-serif;letter-spacing:-.01em}.cookbook-home-page .hero-heading,.integrations-home-page .hero-heading{text-shadow:0 1px 3px rgba(0,0,0,.8),0 2px 20px rgba(0,0,0,.4)}.cookbook-home-page .hero-subheading,.integrations-home-page .hero-subheading{text-shadow:0 1px 3px rgba(0,0,0,.75),0 2px 16px rgba(0,0,0,.35)}.section-heading{letter-spacing:-.02em;text-shadow:none}body:has(.cookbook-home-page) #navbar,body:has(.integrations-home-page) #navbar{background-color:#fff!important;backdrop-filter:blur(10px)}html.dark body:has(.cookbook-home-page) #navbar,html.dark body:has(.integrations-home-page) #navbar,html[style*=\"color-scheme: dark\"] body:has(.cookbook-home-page) #navbar,html[style*=\"color-scheme: dark\"] body:has(.integrations-home-page) #navbar,html[style*=\"color-scheme:dark\"] body:has(.cookbook-home-page) #navbar,html[style*=\"color-scheme:dark\"] body:has(.integrations-home-page) #navbar{background-color:#000!important;backdrop-filter:blur(10px)}@supports not (selector(:has(*))){.cookbook-home-page+#navbar,.cookbook-home-page~#navbar{background-color:#fff!important}html.dark .cookbook-home-page+#navbar,html.dark .cookbook-home-page~#navbar,html[style*=\"color-scheme: dark\"] .cookbook-home-page+#navbar,html[style*=\"color-scheme: dark\"] .cookbook-home-page~#navbar,html[style*=\"color-scheme:dark\"] .cookbook-home-page+#navbar,html[style*=\"color-scheme:dark\"] .cookbook-home-page~#navbar{background-color:#000!important}}body:has(.integrations-home-page){scroll-behavior:smooth}@supports not (selector(:has(*))){.integrations-home-page+#navbar,.integrations-home-page~#navbar{background-color:#fff!important}html.dark .integrations-home-page+#navbar,html.dark .integrations-home-page~#navbar,html[style*=\"color-scheme: dark\"] .integrations-home-page+#navbar,html[style*=\"color-scheme: dark\"] .integrations-home-page~#navbar,html[style*=\"color-scheme:dark\"] .integrations-home-page+#navbar,html[style*=\"color-scheme:dark\"] .integrations-home-page~#navbar{background-color:#000!important}}#table-of-contents-content{text-transform:uppercase!important;font-family:\"Sometype Mono\"}.bg-\\[\\#F4F4F5\\]{--tw-bg-opacity:1;background-color:#ebebeb}.full-width-layout,.wide-content{display:none!important}body:has(.wide-content) #content-area{max-width:none}body:has(.full-width-layout) #sidebar,body:has(.full-width-layout) #sidebar-content,body:has(.full-width-layout) [class*=sidebar]{display:none!important;width:0!important;min-width:0!important}body:has(.full-width-layout) #content-container{margin-top:0!important;margin-left:0!important;padding-left:0!important;max-width:100%!important;width:100%!important}body:has(.full-width-layout) #content-area{max-width:900px;margin:0 auto;padding:0 2rem}.cookbook-table th,.nav-tabs-item{color:#1f2937!important;font-weight:600!important}html.dark .nav-tabs-item,html[style*=\"color-scheme: dark\"] .nav-tabs-item,html[style*=\"color-scheme:dark\"] .nav-tabs-item{color:#d1d5db!important}.filter-btn{padding:.5rem 1rem;border:1px solid var(--cerebras-neutral-15);background:#fff;color:var(--cerebras-neutral-90);border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease}.filter-btn:hover{border-color:var(--cerebras-brand-50);color:var(--cerebras-brand-50)}.filter-btn.active,html.dark .filter-btn.active,html[style*=\"color-scheme: dark\"] .filter-btn.active,html[style*=\"color-scheme:dark\"] .filter-btn.active{background:var(--cerebras-brand-50);border-color:var(--cerebras-brand-50);color:#fff}html.dark .filter-btn,html[style*=\"color-scheme: dark\"] .filter-btn,html[style*=\"color-scheme:dark\"] .filter-btn{background:var(--cerebras-neutral-95);border-color:var(--cerebras-neutral-60);color:var(--cerebras-neutral-15)}.cookbook-card{transition:opacity .3s ease,transform .3s ease}.cookbook-card[style*=\"display: none\"]{opacity:0;transform:scale(.95)}.cookbook-table{background:0 0!important;border:0!important;box-shadow:none!important;border-radius:0!important}.cookbook-table thead tr{border-bottom:1px solid #52525b!important;background:0 0!important}.cookbook-table tbody tr{border-bottom:1px solid #27272a!important;background:0 0!important;transition:background-color .2s ease}.cookbook-table tbody tr:hover{background:rgba(24,24,27,.325)!important}.cookbook-table th{color:#3f3f46!important;font-size:.875rem!important;padding:.75rem 1rem!important;border:0!important}html.dark .cookbook-table th,html[style*=\"color-scheme: dark\"] .cookbook-table th,html[style*=\"color-scheme:dark\"] .cookbook-table th{color:#e4e4e7!important}.cookbook-table td{padding:1rem!important;border:0!important;vertical-align:top!important}.cookbook-table td:first-child{font-weight:400!important}html.dark .cookbook-table,html[style*=\"color-scheme: dark\"] .cookbook-table,html[style*=\"color-scheme:dark\"] .cookbook-table{color:inherit!important;background:0 0!important}html.dark img[src*=\"/images/icons/\"],html[style*=\"color-scheme: dark\"] img[src*=\"/images/icons/\"],html[style*=\"color-scheme:dark\"] img[src*=\"/images/icons/\"]{filter:invert(1) brightness(2)}.console-hero-title{color:var(--cerebras-neutral-90)}.console-hero-muted{color:var(--cerebras-neutral-60)}.console-cta-btn{background:var(--cerebras-neutral-90);color:#fff}.console-open-btn{display:inline-flex;align-items:center;gap:6px;padding:0;font-size:.875rem;font-weight:500;text-decoration:none;color:var(--cerebras-neutral-90);background:0 0}html.dark .console-hero-title,html[style*=\"color-scheme: dark\"] .console-hero-title,html[style*=\"color-scheme:dark\"] .console-hero-title{color:#f5f5f5}html.dark .console-hero-muted,html[style*=\"color-scheme: dark\"] .console-hero-muted,html[style*=\"color-scheme:dark\"] .console-hero-muted{color:#9ca3af}html.dark .console-cta-btn,html[style*=\"color-scheme: dark\"] .console-cta-btn,html[style*=\"color-scheme:dark\"] .console-cta-btn{background:#3a3a3a;color:#fff}html.dark .console-open-btn,html[style*=\"color-scheme: dark\"] .console-open-btn,html[style*=\"color-scheme:dark\"] .console-open-btn{border-color:#3a3a3a;color:#f5f5f5}.github-button{border:1px solid #d1d5db;background-color:#fff;color:#374151}.github-button:hover{background-color:#f3f4f6;border-color:#9ca3af}html.dark .github-button,html[style*=\"color-scheme: dark\"] .github-button,html[style*=\"color-scheme:dark\"] .github-button{border:1px solid #52525b;background-color:#27272a;color:#e4e4e7}html.dark .github-button:hover,html[style*=\"color-scheme: dark\"] .github-button:hover,html[style*=\"color-scheme:dark\"] .github-button:hover{background-color:#3f3f46;border-color:#71717a}.intro-code-panel pre{max-height:400px;overflow-y:auto}@media (max-width:768px){.console-hero-flex,.intro-hero-flex{flex-direction:column!important;gap:32px!important}.console-hero-flex img,.intro-code-panel{width:100%!important;flex-shrink:1!important}.console-hero-flex img{width:260px!important;height:260px!important;margin:0 auto!important}.console-hero-title{font-size:2rem!important}.intro-bottom-grid{grid-template-columns:1fr!important}}.intro-secondary-btn{border:1.5px solid var(--cerebras-neutral-15);color:var(--cerebras-neutral-90)}.intro-secondary-btn:hover,html.dark .intro-secondary-btn:hover,html[style*=\"color-scheme: dark\"] .intro-secondary-btn:hover,html[style*=\"color-scheme:dark\"] .intro-secondary-btn:hover{border-color:var(--cerebras-brand-50);color:var(--cerebras-brand-50)!important}html.dark .intro-secondary-btn,html[style*=\"color-scheme: dark\"] .intro-secondary-btn,html[style*=\"color-scheme:dark\"] .intro-secondary-btn{border-color:var(--cerebras-neutral-60);color:#f5f5f5}"}],"page":{"pagePath":"integrations/foundry","slug":"/integrations/foundry","pageMetadata":{"title":"Get Started with TrueFoundry AI Gateway","sidebarTitle":"TrueFoundry","description":"Learn how to route Cerebras Inference requests through TrueFoundry's AI Gateway for enhanced observability, cost tracking, and access control.","href":"/integrations/foundry"},"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: \"Learn how to route Cerebras Inference requests through TrueFoundry’s AI Gateway for enhanced observability, cost tracking, and access control.\"\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`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Card,CardGroup,CodeBlock,CodeGroup,Frame,Heading,Note,OptimizedImage,Step,Steps,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`what-is-truefoundry-ai-gateway`,children:`What is TrueFoundry AI Gateway?`}),`\n`,_jsx(_components.p,{children:`TrueFoundry AI Gateway is a unified API gateway that provides observability, cost tracking, rate limiting, and access control for AI model inference. By routing your Cerebras requests through TrueFoundry, you gain comprehensive visibility into your AI operations while maintaining centralized control over access and spending.`}),`\n`,_jsx(_components.p,{children:`Key benefits include:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Comprehensive Observability`}),` - Track all API calls, latencies, and errors in one place with detailed request logging`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cost Management`}),` - Monitor and control spending across models and teams with real-time cost tracking`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Access Control`}),` - Manage API keys and permissions centrally with role-based access`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Rate Limiting`}),` - Protect your applications from unexpected usage spikes with configurable limits`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Analytics Dashboard`}),` - Visualize usage patterns and performance metrics across your organization`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Learn more at `,_jsx(_components.a,{href:`https://truefoundry.com/docs/ai-gateway?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:`TrueFoundry AI Gateway`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsx(_components.p,{children:`Before you begin, ensure you have:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cerebras API Key`}),` - Get a free API key `,_jsx(_components.a,{href:`https://cloud.cerebras.ai/?utm_source=3pi_truefoundry\u0026utm_campaign=integrations`,children:`here`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`TrueFoundry Account`}),` - Visit `,_jsx(_components.a,{href:`https://truefoundry.com/?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:`TrueFoundry`}),` and create an account or log in`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Python 3.12 or higher`}),` - For running the code examples`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`configure-truefoundry-ai-gateway`,children:`Configure TrueFoundry AI Gateway`}),`\n`,_jsxs(Steps,{children:[_jsxs(Step,{title:`Navigate to Cerebras in AI Gateway`,children:[_jsx(_components.p,{children:`From the TrueFoundry dashboard, navigate to the Cerebras models section:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Models`}),` > `,_jsx(_components.strong,{children:`Cerebras`})]}),`\n`]}),_jsx(Frame,{caption:`Navigate to AI Gateway > Models > Cerebras`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-page%20Large.jpeg?fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=1113b3d699d69a4be6e582499b9960c4`,alt:`Navigate to Cerebras in TrueFoundry AI Gateway`,\"data-og-width\":`1100`,width:`1100`,\"data-og-height\":`567`,height:`567`,\"data-path\":`images/foundry/cerebras-page Large.jpeg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-page%20Large.jpeg?w=280\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=2d0cee91ce0a0ee0aa118f57b8e90ca7 280w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-page%20Large.jpeg?w=560\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=8fa7a763c0a8f784baf28b0232dddd30 560w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-page%20Large.jpeg?w=840\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=1fd1c4dd09882e18d3e91b142812f2bb 840w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-page%20Large.jpeg?w=1100\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=fda85bdebcfede09d5c4436d2cbc9006 1100w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-page%20Large.jpeg?w=1650\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=f521dc8e27819af2522021d8e74a8d9b 1650w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-page%20Large.jpeg?w=2500\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=e43b5fd0f95c91e9b0a8d5df30e9e645 2500w`})}),_jsx(_components.p,{children:`This opens the Cerebras configuration panel where you’ll add your account and models.`})]}),_jsxs(Step,{title:`Add your Cerebras account`,children:[_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Add Cerebras Account`}),` to configure your Cerebras API credentials:`]}),_jsx(Frame,{caption:`Add your Cerebras account credentials`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-integrations%20Large.jpeg?fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=1f6d852879a8ab15088d451e1b55e02b`,alt:`Add Cerebras Account in TrueFoundry`,\"data-og-width\":`1100`,width:`1100`,\"data-og-height\":`814`,height:`814`,\"data-path\":`images/foundry/cerebras-integrations Large.jpeg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-integrations%20Large.jpeg?w=280\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=4a9e72fcbf858e97d820b7ed0d50a81b 280w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-integrations%20Large.jpeg?w=560\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=53942c577f8ecd37e07b6f5052e42d80 560w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-integrations%20Large.jpeg?w=840\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=efcde6cbfca0c438f999c58571f15499 840w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-integrations%20Large.jpeg?w=1100\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=fc4c483f567479598cffb2cc731cad4e 1100w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-integrations%20Large.jpeg?w=1650\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=491d532d4f3687ad7dfb1aa50eccfbd8 1650w, https://mintcdn.com/cerebras-inference/tIeu2BQYuFCZQaac/images/foundry/cerebras-integrations%20Large.jpeg?w=2500\u0026fit=max\u0026auto=format\u0026n=tIeu2BQYuFCZQaac\u0026q=85\u0026s=5615f3a7b333626954df589a46dd3b69 2500w`})}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click the `,_jsx(_components.strong,{children:`Add Cerebras Account`}),` button`]}),`\n`,_jsxs(_components.li,{children:[`Enter your `,_jsx(_components.strong,{children:`Account Name`}),` (e.g., “Production” or “Development”)`]}),`\n`,_jsxs(_components.li,{children:[`Enter your `,_jsx(_components.strong,{children:`Cerebras API Key`}),` from the prerequisites step`]}),`\n`,_jsxs(_components.li,{children:[`Optionally add `,_jsx(_components.strong,{children:`Collaborators`}),` who should have access`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save`})]}),`\n`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`You can configure multiple Cerebras accounts with different access controls. This is useful for separating production and development environments or managing different teams. See `,_jsx(_components.a,{href:`https://www.truefoundry.com/docs/ai-gateway/gateway-access-control`,children:`Access Control`}),` for more details.`]})})]}),_jsxs(Step,{title:`Add Cerebras models`,children:[_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`+ Add Model`}),` to add Cerebras models to your gateway. Unlike other providers, you need to get the Model ID directly from the Cerebras documentation.`]}),_jsx(_components.p,{children:`To add a model:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`+ Add Model`})]}),`\n`,_jsxs(_components.li,{children:[`Enter the `,_jsx(_components.strong,{children:`Model ID`}),` exactly as shown in the `,_jsx(_components.a,{href:`https://inference-docs.cerebras.ai/models?utm_source=3pi_truefoundry\u0026utm_campaign=integrations`,children:`Cerebras Models documentation`})]}),`\n`,_jsx(_components.li,{children:`Configure any model-specific settings like rate limits or access controls`}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Save`}),` to activate the model`]}),`\n`]}),_jsx(Tip,{children:_jsxs(_components.p,{children:[`For Cerebras, you don’t select from a dropdown list. Instead, copy the exact Model ID from the `,_jsx(_components.a,{href:`https://inference-docs.cerebras.ai/models/overview`,children:`Cerebras docs`}),` and paste it in the Model ID field.`]})})]}),_jsxs(Step,{title:`Get your TrueFoundry API credentials`,children:[_jsx(_components.p,{children:`After configuring your models, TrueFoundry will provide you with gateway credentials. These credentials authenticate your application to the TrueFoundry gateway, which then routes requests to Cerebras.`}),_jsx(_components.p,{children:`Find your credentials in the AI Gateway settings:`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Navigate to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`API Credentials`})]}),`\n`,_jsxs(_components.li,{children:[`Copy your `,_jsx(_components.strong,{children:`Gateway Base URL`}),` (e.g., `,_jsx(_components.code,{children:`https://gateway.truefoundry.ai`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Copy your `,_jsx(_components.strong,{children:`Gateway API Key`}),` (a JWT token)`]}),`\n`]}),_jsx(_components.p,{children:`Keep these credentials secure - they provide access to all models configured in your gateway.`})]}),_jsxs(Step,{title:`Install required dependencies`,children:[_jsx(_components.p,{children:`Install the OpenAI Python SDK, which is compatible with Cerebras through TrueFoundry’s OpenAI-compatible API:`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`pip`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openai`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` python-dotenv`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`python-dotenv`}),` package helps manage environment variables securely.`]})]}),_jsxs(Step,{title:`Configure environment variables`,children:[_jsxs(_components.p,{children:[`Create a `,_jsx(_components.code,{children:`.env`}),` file in your project directory to store your TrueFoundry credentials securely:`]}),_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TRUEFOUNDRY_API_KEY`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`your-truefoundry-gateway-key-here`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`TRUEFOUNDRY_BASE_URL`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`https://gateway.truefoundry.ai`})]}),`\n`]})})}),_jsx(_components.p,{children:`Replace the placeholder values with your actual credentials from Step 4.`}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Never commit your `,_jsx(_components.code,{children:`.env`}),` file to version control. Add it to your `,_jsx(_components.code,{children:`.gitignore`}),` file to keep your credentials secure.`]})})]}),_jsxs(Step,{title:`Initialize the client`,children:[_jsx(_components.p,{children:`Set up the OpenAI client to route requests through TrueFoundry’s gateway. The gateway intercepts your requests, captures observability data, and forwards them to Cerebras.`}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`15`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`15`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dotenv `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_dotenv`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Load environment variables`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`load_dotenv()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Initialize client with TrueFoundry gateway`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_BASE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Cerebras-3rd-Party-Integration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TrueFoundry\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`10`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TRUEFOUNDRY_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/chat/completions\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TRUEFOUNDRY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Cerebras-3rd-Party-Integration: Foundry\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"cerebras/gpt-oss-120b\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Hello!\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`base_url`}),` parameter routes all requests through TrueFoundry’s gateway, which then forwards them to Cerebras while collecting metrics and logs.`]})]}),_jsxs(Step,{title:`Make your first request`,children:[_jsx(_components.p,{children:`Now you can make requests to Cerebras models through TrueFoundry. The gateway will automatically track this request in your analytics dashboard.`}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`26`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dotenv `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_dotenv`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`load_dotenv()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_BASE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Cerebras-3rd-Party-Integration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TrueFoundry\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Make a chat completion request`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cerebras/gpt-oss-120b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"system\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"You are a helpful assistant.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Explain quantum computing in simple terms.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_tokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`500`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`13`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TRUEFOUNDRY_BASE_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/chat/completions\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$TRUEFOUNDRY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Cerebras-3rd-Party-Integration: Foundry\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"cerebras/gpt-oss-120b\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"system\", \"content\": \"You are a helpful assistant.\"},`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` {\"role\": \"user\", \"content\": \"Explain quantum computing in simple terms.\"}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\": 500,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"temperature\": 0.7`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})})]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`Use the model ID returned by TrueFoundry model discovery, such as `,_jsx(_components.code,{children:`cerebras/gpt-oss-120b`}),`. The provider-account prefix tells the gateway which configured Cerebras account should handle the request.`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`advanced-features`,children:`Advanced Features`}),`\n`,_jsx(Heading,{level:`3`,id:`streaming-responses`,children:`Streaming Responses`}),`\n`,_jsx(_components.p,{children:`TrueFoundry supports streaming responses from Cerebras models, allowing you to process tokens as they’re generated. This is ideal for building responsive chat interfaces or processing long-form content.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`26`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`26`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dotenv `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_dotenv`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`load_dotenv()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_BASE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Cerebras-3rd-Party-Integration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TrueFoundry\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Stream the response`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`stream `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cerebras/gpt-oss-120b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Write a short story about a robot.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` stream`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`True`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` stream:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` chunk.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].delta.content `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`is`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(chunk.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].delta.content, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`end`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})})}),`\n`,_jsx(Heading,{level:`3`,id:`custom-metadata-and-tagging`,children:`Custom Metadata and Tagging`}),`\n`,_jsx(_components.p,{children:`Add custom metadata to your requests for better tracking and analytics. TrueFoundry captures these headers and makes them available in your analytics dashboard for filtering and analysis.`}),`\n`,_jsx(CodeGroup,{children:_jsx(CodeBlock,{filename:`Python`,numberOfLines:`23`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` dotenv `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` load_dotenv`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`load_dotenv()`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.getenv(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TRUEFOUNDRY_BASE_URL\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` default_headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-Cerebras-3rd-Party-Integration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"TrueFoundry\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-TrueFoundry-User-ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user-123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-TrueFoundry-Session-ID\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"session-456\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"X-TrueFoundry-Environment\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"production\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"cerebras/gpt-oss-120b\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Summarize this article...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})}),`\n`,_jsx(_components.p,{children:`These custom headers will appear in your TrueFoundry analytics dashboard, making it easy to filter and analyze requests by user, session, or environment.`}),`\n`,_jsx(Heading,{level:`3`,id:`rate-limiting-and-budget-controls`,children:`Rate Limiting and Budget Controls`}),`\n`,_jsx(_components.p,{children:`TrueFoundry allows you to set rate limits and budget controls directly in the dashboard to prevent unexpected costs and manage usage across your organization.`}),`\n`,_jsx(_components.p,{children:`To configure rate limits:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Navigate to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Rate Limiting`})]}),`\n`,_jsx(_components.li,{children:`Configure limits per user, API key, or model`}),`\n`,_jsx(_components.li,{children:`Set daily or monthly budget caps to prevent unexpected costs`}),`\n`,_jsx(_components.li,{children:`Configure alerts to notify you when limits are approached`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Learn more in the `,_jsx(_components.a,{href:`https://www.truefoundry.com/docs/ai-gateway/ratelimiting`,children:`TrueFoundry Rate Limiting documentation`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`virtual-models`,children:`Virtual Models`}),`\n`,_jsx(_components.p,{children:`Create virtual models that combine multiple Cerebras models with custom routing logic, fallback strategies, and load balancing. This allows you to optimize for cost, performance, or availability.`}),`\n`,_jsxs(_components.p,{children:[`Learn more in the `,_jsx(_components.a,{href:`https://www.truefoundry.com/docs/ai-gateway/virtual-model`,children:`TrueFoundry Virtual Models documentation`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`monitoring-and-analytics`,children:`Monitoring and Analytics`}),`\n`,_jsx(Heading,{level:`3`,id:`view-request-logs`,children:`View Request Logs`}),`\n`,_jsx(_components.p,{children:`Access detailed logs for all requests through the TrueFoundry dashboard. Each log entry includes the full request and response payload, latency metrics, token usage, and any custom metadata you’ve added.`}),`\n`,_jsx(_components.p,{children:`To view logs:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Observability`}),` > `,_jsx(_components.strong,{children:`Request Logging`})]}),`\n`,_jsx(_components.li,{children:`Filter by model, user, time range, or custom metadata`}),`\n`,_jsx(_components.li,{children:`View request and response payloads, latencies, and errors`}),`\n`,_jsx(_components.li,{children:`Export logs for further analysis or compliance requirements`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`cost-tracking`,children:`Cost Tracking`}),`\n`,_jsx(_components.p,{children:`Monitor your Cerebras spending in real-time with TrueFoundry’s cost tracking dashboard. View costs broken down by model, user, team, or any custom dimension you’ve configured.`}),`\n`,_jsx(_components.p,{children:`To access cost tracking:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Navigate to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Cost Tracking`})]}),`\n`,_jsx(_components.li,{children:`View costs broken down by model, user, or time period`}),`\n`,_jsx(_components.li,{children:`Set up alerts for budget thresholds`}),`\n`,_jsx(_components.li,{children:`Export cost reports for billing or analysis`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`analytics-dashboard`,children:`Analytics Dashboard`}),`\n`,_jsx(_components.p,{children:`Visualize usage patterns and performance metrics across your organization with TrueFoundry’s analytics dashboard. Track key metrics like request volume, latency percentiles, error rates, and token usage.`}),`\n`,_jsx(_components.p,{children:`Key metrics available:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Request Volume`}),` - Total requests over time, broken down by model`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Latency`}),` - P50, P95, and P99 latency percentiles`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Error Rates`}),` - Track errors by type and model`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Token Usage`}),` - Monitor input and output tokens across models`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cost Trends`}),` - Visualize spending patterns over time`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`export-metrics`,children:`Export Metrics`}),`\n`,_jsx(_components.p,{children:`TrueFoundry supports exporting metrics to external monitoring tools for integration with your existing observability stack.`}),`\n`,_jsx(_components.p,{children:`Supported export formats:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`OpenTelemetry`}),` - Export traces and metrics to your observability platform`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Prometheus`}),` - Scrape metrics for custom dashboards`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Grafana`}),` - Visualize performance and cost data`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Learn more in the `,_jsx(_components.a,{href:`https://www.truefoundry.com/docs/ai-gateway/fetch-request-logs`,children:`TrueFoundry request logs documentation`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsxs(AccordionGroup,{children:[_jsxs(Accordion,{title:`Authentication Errors`,id:`authentication-errors`,children:[_jsx(_components.p,{children:`If you receive authentication errors when making requests:`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Check your TrueFoundry API key:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Verify the key is correct in your `,_jsx(_components.code,{children:`.env`}),` file`]}),`\n`,_jsx(_components.li,{children:`Ensure there are no extra spaces or newlines`}),`\n`,_jsx(_components.li,{children:`Confirm the key hasn’t been revoked in the TrueFoundry dashboard`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Verify Cerebras account configuration:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Models`}),` > `,_jsx(_components.strong,{children:`Cerebras`})]}),`\n`,_jsx(_components.li,{children:`Ensure your Cerebras account is properly configured`}),`\n`,_jsx(_components.li,{children:`Check that your Cerebras API key is valid and active`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Check access permissions:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Verify your TrueFoundry account has access to the Cerebras models you’re trying to use`}),`\n`,_jsx(_components.li,{children:`Ensure you’re using the correct account if you have multiple configured`}),`\n`]})]}),_jsxs(Accordion,{title:`Model Not Found Errors`,id:`model-not-found-errors`,children:[_jsx(_components.p,{children:`If you see “model not found” errors:`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Verify model configuration:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Check that you’ve added the specific Cerebras model in the TrueFoundry dashboard`}),`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Models`}),` > `,_jsx(_components.strong,{children:`Cerebras`}),` and confirm the model is listed`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Check model name format:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Copy the complete model ID from `,_jsx(_components.code,{children:`GET /models`}),` (for example, `,_jsx(_components.code,{children:`cerebras/gpt-oss-120b`}),`)`]}),`\n`,_jsxs(_components.li,{children:[`Ensure the Model ID matches exactly what’s in the `,_jsx(_components.a,{href:`https://inference-docs.cerebras.ai/models?utm_source=3pi_truefoundry\u0026utm_campaign=integrations`,children:`Cerebras documentation`})]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Available models:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`cerebras/gpt-oss-120b`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.code,{children:`cerebras/gemma-4-31b`})}),`\n`]})]}),_jsxs(Accordion,{title:`Rate Limit Errors`,id:`rate-limit-errors`,children:[_jsx(_components.p,{children:`If you’re hitting rate limits:`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Check your rate limit configuration:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Navigate to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Rate Limiting`})]}),`\n`,_jsx(_components.li,{children:`Review your current limits and usage`}),`\n`,_jsx(_components.li,{children:`Adjust limits for your use case or upgrade your TrueFoundry plan`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Implement retry logic:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Add exponential backoff in your application code`}),`\n`,_jsxs(_components.li,{children:[`Use the `,_jsx(_components.code,{children:`Retry-After`}),` header to determine when to retry`]}),`\n`,_jsx(_components.li,{children:`Consider implementing request queuing for high-volume applications`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Optimize your usage:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Batch requests where possible`}),`\n`,_jsx(_components.li,{children:`Use caching for repeated queries`}),`\n`,_jsx(_components.li,{children:`Consider using smaller models for simpler tasks`}),`\n`]})]}),_jsxs(Accordion,{title:`High Latency Issues`,id:`high-latency-issues`,children:[_jsx(_components.p,{children:`If you’re experiencing higher latency than expected:`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Check gateway region:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Ensure the TrueFoundry gateway region is close to your application`}),`\n`,_jsx(_components.li,{children:`Contact TrueFoundry support to discuss multi-region deployment options`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Review request logs:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Go to `,_jsx(_components.strong,{children:`AI Gateway`}),` > `,_jsx(_components.strong,{children:`Observability`}),` > `,_jsx(_components.strong,{children:`Request Logging`})]}),`\n`,_jsx(_components.li,{children:`Identify bottlenecks in request processing`}),`\n`,_jsx(_components.li,{children:`Check for network issues or timeouts`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Optimize your requests:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Use streaming for long responses to reduce perceived latency`}),`\n`,_jsx(_components.li,{children:`Consider using TrueFoundry’s caching features for repeated queries`}),`\n`,_jsxs(_components.li,{children:[`Reduce `,_jsx(_components.code,{children:`max_tokens`}),` if you’re generating unnecessarily long responses`]}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Monitor performance:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Set up alerts for latency thresholds`}),`\n`,_jsx(_components.li,{children:`Track P95 and P99 latencies in the analytics dashboard`}),`\n`,_jsx(_components.li,{children:`Compare latency across different models to find the best fit`}),`\n`]})]}),_jsxs(Accordion,{title:`Missing Metrics or Logs`,id:`missing-metrics-or-logs`,children:[_jsx(_components.p,{children:`If you’re not seeing expected metrics or logs in the dashboard:`}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Verify integration header:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Ensure you’re including the `,_jsx(_components.code,{children:`X-Cerebras-3rd-Party-Integration: Foundry`}),` header`]}),`\n`,_jsx(_components.li,{children:`Check that the header is properly formatted with no typos`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Check data retention:`})}),_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Review your TrueFoundry plan’s data retention policy`}),`\n`,_jsx(_components.li,{children:`Older logs may have been archived or deleted`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Verify custom metadata:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Ensure custom headers are properly formatted (e.g., `,_jsx(_components.code,{children:`X-TrueFoundry-User-ID`}),`)`]}),`\n`,_jsx(_components.li,{children:`Check that metadata is being sent with each request`}),`\n`]}),_jsx(_components.p,{children:_jsx(_components.strong,{children:`Contact support:`})}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`If issues persist, contact `,_jsx(_components.a,{href:`https://truefoundry.com/support?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:`TrueFoundry support`}),` with example request IDs`]}),`\n`]})]})]}),`\n`,_jsxs(_components.p,{children:[`For additional support, contact `,_jsx(_components.a,{href:`https://truefoundry.com/support?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:`TrueFoundry support`}),` or visit their `,_jsx(_components.a,{href:`https://truefoundry.com/docs?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:`documentation`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next Steps`}),`\n`,_jsxs(CardGroup,{cols:2,children:[_jsx(Card,{title:`Explore Advanced Features`,icon:`rocket`,href:`https://truefoundry.com/docs/ai-gateway?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:_jsx(_components.p,{children:`Discover TrueFoundry’s full capabilities including virtual models, guardrails, and advanced routing`})}),_jsx(Card,{title:`Set Up Rate Limiting`,icon:`gauge`,href:`https://www.truefoundry.com/docs/ai-gateway/ratelimiting`,children:_jsx(_components.p,{children:`Configure rate limits and budget controls to manage costs and prevent unexpected usage`})}),_jsx(Card,{title:`Configure Custom Metadata`,icon:`tags`,href:`https://www.truefoundry.com/docs/ai-gateway/request-headers`,children:_jsx(_components.p,{children:`Add custom metadata to requests for better tracking and analytics`})}),_jsx(Card,{title:`Try Different Models`,icon:`brain`,href:`https://inference-docs.cerebras.ai/models?utm_source=3pi_truefoundry\u0026utm_campaign=integrations`,children:_jsx(_components.p,{children:`Explore Cerebras models to find the best fit for your use case`})}),_jsx(Card,{title:`Set Up Alerting`,icon:`bell`,href:`https://truefoundry.com/docs/ai-gateway/alerting?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:_jsx(_components.p,{children:`Configure alerts for cost thresholds, error rates, and performance issues`})}),_jsx(Card,{title:`Enable Caching`,icon:`database`,href:`https://truefoundry.com/docs/ai-gateway/caching?utm_source=cerebras_docs\u0026utm_medium=integration_page\u0026utm_campaign=3pi_truefoundry`,children:_jsx(_components.p,{children:`Reduce costs and latency by caching repeated queries`})})]})]})}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":{"config":{},"pageMetadata":{"title":"Get Started with TrueFoundry AI Gateway","sidebarTitle":"TrueFoundry","description":"Learn how to route Cerebras Inference requests through TrueFoundry's AI Gateway for enhanced observability, cost tracking, and access control.","href":"/integrations/foundry"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What is TrueFoundry AI Gateway?","slug":"what-is-truefoundry-ai-gateway","depth":2,"children":[]},{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Configure TrueFoundry AI Gateway","slug":"configure-truefoundry-ai-gateway","depth":2,"children":[]},{"title":"Advanced Features","slug":"advanced-features","depth":2,"children":[{"title":"Streaming Responses","slug":"streaming-responses","depth":3,"children":[]},{"title":"Custom Metadata and Tagging","slug":"custom-metadata-and-tagging","depth":3,"children":[]},{"title":"Rate Limiting and Budget Controls","slug":"rate-limiting-and-budget-controls","depth":3,"children":[]},{"title":"Virtual Models","slug":"virtual-models","depth":3,"children":[]}]},{"title":"Monitoring and Analytics","slug":"monitoring-and-analytics","depth":2,"children":[{"title":"View Request Logs","slug":"view-request-logs","depth":3,"children":[]},{"title":"Cost Tracking","slug":"cost-tracking","depth":3,"children":[]},{"title":"Analytics Dashboard","slug":"analytics-dashboard","depth":3,"children":[]},{"title":"Export Metrics","slug":"export-metrics","depth":3,"children":[]}]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"Next Steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/cerebras-inference/56d68d851a96fab0/docs-tester/src/javascript/cli.js","/_mintlify/custom/cerebras-inference/6951250b2061eb3d/docs-tester/src/javascript/extractor.js","/_mintlify/custom/cerebras-inference/b3aec877e7bef626/docs-tester/src/javascript/runner.js"],"subdomain":"cerebras-inference","siteName":"Cerebras Inference","title":"Get Started with TrueFoundry AI Gateway - Cerebras Inference","contextualStarterQuestions":[{"_id":"6a69216e73c41bf08a8140c3","deploymentId":"669fd27cb92fff2394c27767","questionText":"How do I set up the AI Gateway?","status":"active","generatedBy":"contextual","path":"integrations/foundry","createdAt":"2026-07-28T21:38:54.399Z","updatedAt":"2026-07-28T21:38:54.399Z","__v":0},{"_id":"6a69216e73c41bf08a8140c4","deploymentId":"669fd27cb92fff2394c27767","questionText":"What are the key benefits?","status":"active","generatedBy":"contextual","path":"integrations/foundry","createdAt":"2026-07-28T21:38:54.399Z","updatedAt":"2026-07-28T21:38:54.399Z","__v":0},{"_id":"6a69216e73c41bf08a8140c5","deploymentId":"669fd27cb92fff2394c27767","questionText":"Do I need a Cerebras API key?","status":"active","generatedBy":"contextual","path":"integrations/foundry","createdAt":"2026-07-28T21:38:54.399Z","updatedAt":"2026-07-28T21:38:54.399Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-28T21:38:37.835Z","originalFileLocation":"integrations/foundry.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=\"system\"}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=\"Learn how to route Cerebras Inference requests through TrueFoundry\u0026#x27;s AI Gateway for enhanced observability, cost tracking, and access control.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Cerebras Inference\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/cerebras-inference/FcAuEx9Fi3BOAJGk/_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/cerebras-inference/FcAuEx9Fi3BOAJGk/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/cerebras-inference/FcAuEx9Fi3BOAJGk/_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/cerebras-inference/FcAuEx9Fi3BOAJGk/_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/cerebras-inference/FcAuEx9Fi3BOAJGk/_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/cerebras-inference/FcAuEx9Fi3BOAJGk/_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/cerebras-inference/FcAuEx9Fi3BOAJGk/_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/cerebras-inference/FcAuEx9Fi3BOAJGk/_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/cerebras-inference/FcAuEx9Fi3BOAJGk/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Get Started with TrueFoundry AI Gateway - Cerebras Inference\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to route Cerebras Inference requests through TrueFoundry\u0026#x27;s AI Gateway for enhanced observability, cost tracking, and access control.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Cerebras Inference\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://inference-docs.cerebras.ai/integrations/foundry\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://cerebras-inference.mintlify.app/_mintlify/api/og/v2?division=Multi-LLM+Management\u0026amp;title=Get+Started+with+TrueFoundry+AI+Gateway\u0026amp;description=Learn+how+to+route+Cerebras+Inference+requests+through+TrueFoundry%27s+AI+Gateway+for+enhanced+observability%2C+cost+tracking%2C+and+access+control.\u0026amp;theme=206ad799b192022dc275f7f7\u0026amp;signature=79829fcc33e560ec0e8473a536acd1212a610fc81a55ac71586bda59e07b08d6\">\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=\"Get Started with TrueFoundry AI Gateway - Cerebras Inference\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to route Cerebras Inference requests through TrueFoundry\u0026#x27;s AI Gateway for enhanced observability, cost tracking, and access control.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://cerebras-inference.mintlify.app/_mintlify/api/og/v2?division=Multi-LLM+Management\u0026amp;title=Get+Started+with+TrueFoundry+AI+Gateway\u0026amp;description=Learn+how+to+route+Cerebras+Inference+requests+through+TrueFoundry%27s+AI+Gateway+for+enhanced+observability%2C+cost+tracking%2C+and+access+control.\u0026amp;theme=206ad799b192022dc275f7f7\u0026amp;signature=79829fcc33e560ec0e8473a536acd1212a610fc81a55ac71586bda59e07b08d6\">\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/cerebras-inference/FcAuEx9Fi3BOAJGk/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Cerebras Inference\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F1592A\">\u003clink data-mint-head rel=\"canonical\" href=\"https://inference-docs.cerebras.ai/integrations/foundry\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/integrations/foundry.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://inference-docs.cerebras.ai/#organization\",\"name\":\"Cerebras Inference\",\"url\":\"https://inference-docs.cerebras.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/cerebras-inference/b3jx4ZXgBWCXv7Rn/logo/2.png?fit=max\u0026auto=format\u0026n=b3jx4ZXgBWCXv7Rn\u0026q=85\u0026s=98684d23487c722617419a5dbeb0c678\"}},{\"@type\":\"WebSite\",\"@id\":\"https://inference-docs.cerebras.ai#website\",\"name\":\"Cerebras Inference\",\"url\":\"https://inference-docs.cerebras.ai\",\"publisher\":{\"@id\":\"https://inference-docs.cerebras.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://inference-docs.cerebras.ai/integrations/foundry#webpage\",\"url\":\"https://inference-docs.cerebras.ai/integrations/foundry\",\"name\":\"Get Started with TrueFoundry AI Gateway\",\"description\":\"Learn how to route Cerebras Inference requests through TrueFoundry's AI Gateway for enhanced observability, cost tracking, and access control.\",\"dateModified\":\"2026-07-28T21:38:37.835Z\",\"isPartOf\":{\"@id\":\"https://inference-docs.cerebras.ai#website\"},\"breadcrumb\":{\"@id\":\"https://inference-docs.cerebras.ai/integrations/foundry#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://inference-docs.cerebras.ai/integrations/foundry#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Multi-LLM Management\",\"item\":\"https://inference-docs.cerebras.ai/integrations/litellm\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Get Started with TrueFoundry AI Gateway\",\"item\":\"https://inference-docs.cerebras.ai/integrations/foundry\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://inference-docs.cerebras.ai/integrations/foundry#article\",\"headline\":\"Get Started with TrueFoundry AI Gateway\",\"name\":\"Get Started with TrueFoundry AI Gateway\",\"description\":\"Learn how to route Cerebras Inference requests through TrueFoundry's AI Gateway for enhanced observability, cost tracking, and access control.\",\"url\":\"https://inference-docs.cerebras.ai/integrations/foundry\",\"mainEntityOfPage\":{\"@id\":\"https://inference-docs.cerebras.ai/integrations/foundry#webpage\"},\"dateModified\":\"2026-07-28T21:38:37.835Z\",\"publisher\":{\"@id\":\"https://inference-docs.cerebras.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://inference-docs.cerebras.ai#website\"}}]}\u003c/script>","siteName":"Cerebras Inference","nav":{"global":{"anchors":[{"anchor":"Python SDK","icon":"github","href":"https://github.com/Cerebras/cerebras-cloud-sdk-python"},{"anchor":"Node.js SDK","icon":"github","href":"https://github.com/Cerebras/cerebras-cloud-sdk-node"}]},"tabs":[{"tab":"Docs","pages":[{"title":"Docs","href":"/quickstart"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/authentication"}]},{"tab":"Integrations","groups":[{"group":"Integrations","pages":[{"title":"Integrations","sidebarTitle":"Overview","mode":"custom","href":"/integrations"}]},{"group":"Agentic Frameworks","pages":[{"title":"Get Started with AG2","sidebarTitle":"AG2","href":"/integrations/ag2"},{"title":"Get Started with Agno","sidebarTitle":"Agno","href":"/integrations/agno"},{"title":"Get Started with Browser-Use","sidebarTitle":"Browser-Use","href":"/integrations/browser-use"},{"title":"Get Started with CrewAI","sidebarTitle":"CrewAI","href":"/integrations/crewai"},{"title":"Get Started with Stagehand","sidebarTitle":"Stagehand","href":"/integrations/stagehand"}]},{"group":"AI Development Kits","pages":[{"title":"Get Started with Vercel AI SDK","sidebarTitle":"Vercel AI SDK","href":"/integrations/vercel-ai-sdk"},{"title":"Get Started with AI Suite","sidebarTitle":"AI Suite","href":"/integrations/ai-suite"},{"title":"Get Started with Milvus","sidebarTitle":"Milvus","href":"/integrations/milvus"}]},{"group":"Coding Tools","pages":[{"title":"Get Started with Aider","sidebarTitle":"Aider","href":"/integrations/aider"},{"title":"Get Started with Cline and Cerebras","sidebarTitle":"Cline","href":"/integrations/cline"},{"title":"Get Started with OpenCode","sidebarTitle":"OpenCode","tag":"FEATURED","href":"/integrations/opencode"},{"title":"Get Started with Cerebras for VS Code","sidebarTitle":"VS Code","href":"/integrations/vscode"},{"title":"Get Started with Kilo Code","sidebarTitle":"Kilo Code","href":"/integrations/kilocode"}]},{"group":"Containerization","pages":[{"title":"Cerebras Inference with Docker","sidebarTitle":"Docker","href":"/integrations/docker"}]},{"group":"Observability \u0026 Evaluation","pages":[{"title":"Get Started with Arize Phoenix","sidebarTitle":"Arize Phoenix","href":"/integrations/arize-phoenix"},{"title":"Get Started with Braintrust","sidebarTitle":"Braintrust","href":"/integrations/braintrust"},{"title":"Get Started with Helicone","sidebarTitle":"Helicone","href":"/integrations/helicone"},{"title":"Get Started with Langfuse","sidebarTitle":"Langfuse","href":"/integrations/langfuse"},{"title":"Get Started with Opik","sidebarTitle":"Opik","href":"/integrations/opik"},{"title":"Get Started with Weave","sidebarTitle":"Weave","href":"/integrations/weave"},{"title":"Get Started with Cloudflare AI Gateway","sidebarTitle":"Cloudflare AI Gateway","href":"/integrations/cloudflare-ai-gateway"},{"title":"Get Started with Kong API Gateway","sidebarTitle":"Kong API Gateway","href":"/integrations/kong-api-gateway"},{"title":"Get Started with Operant","sidebarTitle":"Operant","href":"/integrations/operant"}]},{"group":"LLM Integration Tools","pages":[{"title":"Get Started with Exa","sidebarTitle":"Exa","href":"/integrations/exa"},{"title":"Cerebras Inference on Hugging Face","sidebarTitle":"Hugging Face","href":"/integrations/huggingface"},{"title":"Get Started with LlamaIndex","sidebarTitle":"LlamaIndex","href":"/integrations/llamaindex"},{"title":"Get Started with Maxim","sidebarTitle":"Maxim","href":"/integrations/maxim"},{"title":"Get Started with Parallel","sidebarTitle":"Parallel","href":"/integrations/parallel"}]},{"group":"LLM Application Frameworks","pages":[{"title":"Get Started with Instructor","sidebarTitle":"Instructor","href":"/integrations/instructor"},{"title":"Get Started with LangChain","sidebarTitle":"LangChain","href":"/integrations/langchain"},{"title":"Get Started with LangGraph","sidebarTitle":"LangGraph","href":"/integrations/langgraph"},{"title":"Get Started with Pydantic AI","sidebarTitle":"Pydantic AI","href":"/integrations/pydantic-ai"},{"title":"Get Started with OGX","sidebarTitle":"OGX","href":"/integrations/llama-stack"}]},{"group":"Document Processing","pages":[{"title":"Get Started with Reducto","sidebarTitle":"Reducto","href":"/integrations/reducto"},{"title":"Get Started with Unstructured","sidebarTitle":"Unstructured","href":"/integrations/unstructured"}]},{"group":"Real-Time Audio","pages":[{"title":"Get Started with Cartesia","sidebarTitle":"Cartesia","href":"/integrations/cartesia"},{"title":"Get Started with LiveKit","sidebarTitle":"LiveKit","href":"/integrations/livekit"},{"title":"Get Started with ElevenLabs","sidebarTitle":"ElevenLabs","href":"/integrations/elevenlabs"},{"title":"Get Started with Hume AI","sidebarTitle":"Hume AI","href":"/integrations/hume"}]},{"group":"Multi-LLM Management","pages":[{"title":"Get Started with LiteLLM","sidebarTitle":"LiteLLM","href":"/integrations/litellm"},{"title":"Cerebras Inference on OpenRouter","sidebarTitle":"OpenRouter","href":"/integrations/openrouter"},{"title":"Get Started with Portkey","sidebarTitle":"Portkey","description":"Learn how to use Portkey's AI gateway to route, monitor, and manage Cerebras Inference API calls with advanced features like caching, load balancing, and fallbacks.","href":"/integrations/portkey"},{"title":"Get Started with TrueFoundry AI Gateway","sidebarTitle":"TrueFoundry","href":"/integrations/foundry"},{"title":"Get Started with AWS Marketplace","sidebarTitle":"AWS Marketplace","description":"Learn how to subscribe to Cerebras Inference through AWS Marketplace and integrate it with your applications for seamless billing through your AWS account.","href":"/integrations/aws-marketplace"}]},{"group":"No-Code/Low-Code Platforms","pages":[{"title":"Get Started with Dify","sidebarTitle":"Dify","href":"/integrations/dify"},{"title":"Get Started with FlutterFlow","sidebarTitle":"FlutterFlow","href":"/integrations/flutterflow"}]}]},{"tab":"Cookbook","pages":[{"title":"Cookbook","href":"/cookbook"}]}]},"basePath":"","title":"Get Started with TrueFoundry AI Gateway - Cerebras Inference","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["07c022d89b","a74be98ba7","a9bb46feb3"],"chunks":["Frame-DXXFP6nH.js","DynamicMarkdown-B54_zNBF.js","zoom-image-lightbox-BG6oD64b.js","lightbox-handle-r17bVUz3.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}