[{"data":1,"prerenderedAt":513},["ShallowReactive",2],{"navigation_docs":3,"-gateway-overview":160,"-gateway-overview-surround":508},[4,21,62,82,103,149],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":20},"Get Started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,15],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction","i-lucide-info",{"title":16,"path":17,"stem":18,"icon":19},"Quickstart","\u002Fgetting-started\u002Fquickstart","1.getting-started\u002F2.quickstart","i-lucide-play-circle",false,{"title":22,"icon":23,"path":24,"stem":25,"children":26,"page":20},"Gateway","i-lucide-network","\u002Fgateway","2.gateway",[27,32,37,42,47,52,57],{"title":28,"path":29,"stem":30,"icon":31},"Overview","\u002Fgateway\u002Foverview","2.gateway\u002F1.overview","i-lucide-waypoints",{"title":33,"path":34,"stem":35,"icon":36},"Models and Routing","\u002Fgateway\u002Fmodels-and-routing","2.gateway\u002F2.models-and-routing","i-lucide-brain",{"title":38,"path":39,"stem":40,"icon":41},"Smart Router","\u002Fgateway\u002Fsmart-routing","2.gateway\u002F3.smart-routing","i-lucide-route",{"title":43,"path":44,"stem":45,"icon":46},"Context Engine","\u002Fgateway\u002Fcontext-engine","2.gateway\u002F4.context-engine","i-product-context-engine",{"title":48,"path":49,"stem":50,"icon":51},"Data Integrations","\u002Fgateway\u002Fdata-integrations","2.gateway\u002F5.data-integrations","i-lucide-database",{"title":53,"path":54,"stem":55,"icon":56},"Tools","\u002Fgateway\u002Ftools","2.gateway\u002F6.tools","i-lucide-wrench",{"title":58,"path":59,"stem":60,"icon":61},"Guardrails","\u002Fgateway\u002Fguardrails","2.gateway\u002F7.guardrails","i-lucide-shield-alert",{"title":63,"icon":64,"path":65,"stem":66,"children":67,"page":20},"Compliance","i-lucide-shield-check","\u002Fcompliance","3.compliance",[68,72,77],{"title":69,"path":70,"stem":71,"icon":64},"Data Governance","\u002Fcompliance\u002Fdata-governance","3.compliance\u002F01.data-governance",{"title":73,"path":74,"stem":75,"icon":76},"Network Access","\u002Fcompliance\u002Fnetwork-access","3.compliance\u002F02.network-access","i-lucide-lock",{"title":78,"path":79,"stem":80,"icon":81},"Audit Logs","\u002Fcompliance\u002Faudit-logs","3.compliance\u002F03.audit-logs","i-lucide-scroll-text",{"title":83,"icon":84,"path":85,"stem":86,"children":87,"page":20},"Observability","i-lucide-eye","\u002Fobservability","4.observability",[88,93,98],{"title":89,"path":90,"stem":91,"icon":92},"Organization","\u002Fobservability\u002Forganization","4.observability\u002F1.organization","i-lucide-building-2",{"title":94,"path":95,"stem":96,"icon":97},"Application","\u002Fobservability\u002Fapplication","4.observability\u002F2.application","i-lucide-activity",{"title":99,"path":100,"stem":101,"icon":102},"Metrics","\u002Fobservability\u002Fmetrics","4.observability\u002F3.metrics","i-lucide-bar-chart-2",{"title":104,"icon":105,"path":106,"stem":107,"children":108,"page":20},"Administration","i-lucide-settings","\u002Fadministration","5.administration",[109,114,119,129,144],{"title":110,"path":111,"stem":112,"icon":113},"Organization and Projects","\u002Fadministration\u002Forganizations-and-projects","5.administration\u002F1.organizations-and-projects","i-lucide-box",{"title":115,"path":116,"stem":117,"icon":118},"Members and Access","\u002Fadministration\u002Fmembers-and-access","5.administration\u002F2.members-and-access","i-lucide-shield-user",{"title":120,"path":121,"stem":122,"children":123,"icon":76},"Authentication","\u002Fadministration\u002Fauthentication","5.administration\u002F3.authentication",[124],{"title":125,"path":126,"stem":127,"icon":128},"Connect Model APIs","\u002Fadministration\u002Fauthentication\u002Fconnect-model-apis","5.administration\u002F3.authentication\u002F31.connect-model-apis","i-lucide-cpu",{"title":130,"path":131,"stem":132,"children":133,"icon":143},"Connections","\u002Fadministration\u002Fconnections","5.administration\u002F4.connections",[134,139],{"title":135,"path":136,"stem":137,"icon":138},"Connect MCP Servers","\u002Fadministration\u002Fconnections\u002Fmcp-connections","5.administration\u002F4.connections\u002F42.mcp-connections","i-lucide-plug",{"title":140,"path":141,"stem":142,"icon":51},"Connect Data Sources","\u002Fadministration\u002Fconnections\u002Fdata-sources-connections","5.administration\u002F4.connections\u002F43.data-sources-connections","i-lucide-link",{"title":145,"path":146,"stem":147,"icon":148},"Budgets","\u002Fadministration\u002Fbudgets","5.administration\u002F5.budgets","i-lucide-wallet",{"title":150,"icon":151,"path":152,"stem":153,"children":154,"page":20},"Reference","i-lucide-book-open","\u002Freference","6.reference",[155],{"title":156,"path":157,"stem":158,"icon":159},"Using the API","\u002Freference\u002Fapi-usage","6.reference\u002F1.api-usage","i-lucide-terminal-square",{"id":161,"title":28,"body":162,"description":501,"extension":502,"links":503,"meta":504,"navigation":505,"path":29,"seo":506,"stem":30,"__hash__":507},"docs\u002F2.gateway\u002F1.overview.md",{"type":163,"value":164,"toc":486},"minimark",[165,169,188,193,200,248,252,255,261,265,268,283,287,290,313,318,322,325,358,362,376,380,383,409,421,425,428,460,464],[166,167,168],"p",{},"The Gateway is the endpoint your applications call: an OpenAI-compatible API for inference and an MCP endpoint for tools. Every request runs through the same pipeline of policies and optimizations before any provider or tool sees it.",[170,171,174,175,179,180,183,184,187],"who-panel",{":applies-to":172,":roles":173},"[\"LLM requests\", \"Tool calls\"]","[\"Organization Admin\", \"Workspace Admin\", \"Project Admin\", \"App Admin\"]","Organization Admins decide what the Gateway may use, in ",[176,177,178],"strong",{},"Company setup",". Workspace Admins, Project Admins and App Admins turn on what each application needs, in its ",[176,181,182],{},"Configuration"," tab. See ",[185,186,115],"a",{"href":116}," for each role's scope.",[189,190,192],"h2",{"id":191},"why-use-it","Why use it",[166,194,195,196,199],{},"Every model call and every tool call your applications make crosses the Gateway. That single point is what lets your organization govern, optimize and audit AI without building any of it into each application, and it's where the control, choice and efficiency described in the ",[185,197,11],{"href":198},"\u002Fgetting-started\u002Fintroduction#why-use-optiak"," take effect.",[201,202,203,210,216,227,233,239],"ul",{},[204,205,206,209],"li",{},[176,207,208],{},"Drop-in for existing code."," The inference API is OpenAI-compatible, so the OpenAI SDKs and other OpenAI-compatible clients work after changing the base URL and key. Tools use the standard MCP protocol.",[204,211,212,215],{},[176,213,214],{},"Enforced at runtime, not reviewed after."," Approved models and tools, data residency and retention rules, network access, spending limits and guardrails all apply in the request path, before any provider or tool is called. No application can bypass them.",[204,217,218,221,222,226],{},[176,219,220],{},"Interchangeable providers."," Requests name a model ID, so switching provider is a one-line change, or none at all with ",[223,224,225],"code",{},"smart",". Provider keys live in one place in Optiak, encrypted at rest and never shown again once saved, managed only by the admins allowed to handle them instead of being scattered across application code, config files and developer machines.",[204,228,229,232],{},[176,230,231],{},"One governed door to your tools."," Agents reach approved tools through one MCP endpoint, using the MCP servers your organization connects. Connections are managed centrally, credentials never live in agents, and each application sees only the tools it's allowed to use.",[204,234,235,238],{},[176,236,237],{},"Optimization outside your code."," Model choice, retrieval and context fitting happen in the Gateway, so every application gets them without a release.",[204,240,241,244,245,247],{},[176,242,243],{},"Every interaction on record."," Each LLM request and each tool call is recorded: which application and key made it, what model or tool it reached, its outcome and latency, and every step the Gateway took along the way. Security teams and auditors can reconstruct what happened, request by request, in ",[185,246,83],{"href":95},".",[189,249,251],{"id":250},"how-it-works","How it works",[166,253,254],{},"Every request follows the same life, whether it's an LLM request to the OpenAI-compatible API or a tool call to the MCP endpoint. Each is authenticated and checked against your organization's policies, then follows its own path to a model provider or a tool server:",[256,257],"request-lifecycle",{":modes":258,":stages":259,"caption":260},"[{\"id\":\"llm\",\"label\":\"LLM requests\",\"icon\":\"i-lucide-message-square\"},{\"id\":\"tools\",\"label\":\"Tool calls\",\"icon\":\"i-lucide-wrench\"}]","[{\"icon\":\"i-lucide-log-in\",\"numbered\":false,\"title\":\"A request arrives\",\"titles\":{\"llm\":\"Your application sends an LLM request\",\"tools\":\"An MCP client calls a tool\"}},{\"icon\":\"i-lucide-key-round\",\"title\":\"Authentication\",\"items\":[{\"icon\":\"i-lucide-key-round\",\"label\":\"Application API key\"}]},{\"icon\":\"i-lucide-shield-check\",\"title\":\"Organization policies\",\"items\":[{\"icon\":\"i-lucide-globe\",\"label\":\"IP allowlists\"},{\"icon\":\"i-lucide-map-pin\",\"label\":\"Data residency\"},{\"icon\":\"i-lucide-shield-check\",\"label\":\"Zero data retention\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-ban\",\"label\":\"No training on your data\",\"modes\":[\"llm\"]}]},{\"icon\":\"i-lucide-settings-2\",\"title\":\"Preparing the request\",\"ordered\":true,\"items\":[{\"icon\":\"i-lucide-wallet\",\"label\":\"Budgets\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-shield-alert\",\"label\":\"Guardrails\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-git-branch\",\"label\":\"Model choice or Smart Router\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-database\",\"label\":\"Data Integrations\",\"modes\":[\"llm\"]},{\"icon\":\"i-product-context-engine\",\"label\":\"Context Engine\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-list-checks\",\"label\":\"Only the application's tools\",\"modes\":[\"tools\"]},{\"icon\":\"i-lucide-plug\",\"label\":\"Organization's connection attached\",\"modes\":[\"tools\"]}]},{\"icon\":\"i-lucide-send\",\"title\":\"Delivery\",\"ordered\":true,\"items\":[{\"icon\":\"i-lucide-cloud\",\"label\":\"Model provider\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-refresh-cw\",\"label\":\"Fallback models, if it fails\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-server\",\"label\":\"Tool server\",\"modes\":[\"tools\"]}]},{\"icon\":\"i-lucide-activity\",\"title\":\"The record\",\"items\":[{\"icon\":\"i-lucide-list-tree\",\"label\":\"Every step, timed\"},{\"icon\":\"i-lucide-coins\",\"label\":\"Tokens and cost\",\"modes\":[\"llm\"]},{\"icon\":\"i-lucide-scroll-text\",\"label\":\"Trace in the Requests tab\"}]}]","How the Gateway handles a request. Switch between LLM requests and tool calls.",[262,263,120],"h3",{"id":264},"authentication",[166,266,267],{},"Each request carries an application API key, which tells the Gateway which application is calling and what it may use. Optiak never stores the key itself, only a one-way fingerprint of it, so it can't be read back or leaked from Optiak. MCP clients connect over Streamable HTTP and send the key as a bearer token.",[166,269,270,271,273,274,277,278,280,281,247],{},"You'll find both URLs in the application's ",[176,272,182],{}," tab, under ",[176,275,276],{},"Credentials",". For the full list of endpoints and request options, see ",[185,279,156],{"href":157},"; to create or revoke keys, see ",[185,282,120],{"href":121},[262,284,286],{"id":285},"organization-policies","Organization policies",[166,288,289],{},"Next, the Gateway applies the policies Organization Admins set for the whole organization. No application can opt out, and they act before a model or tool sees any data:",[201,291,292,298,308],{},[204,293,294,297],{},[185,295,296],{"href":74},"IP allowlists"," reject requests from outside your allowed address ranges.",[204,299,300,303,304,307],{},[185,301,302],{"href":70},"Data residency"," limits models and tools to the selected region, and ",[185,305,306],{"href":70},"zero data retention and no training on your data"," exclude providers that store or train on it.",[204,309,310,312],{},[185,311,145],{"href":146}," stop LLM requests once a spending limit is reached.",[166,314,315,316,247],{},"Changes to these policies are recorded in ",[185,317,78],{"href":79},[262,319,321],{"id":320},"preparing-the-request","Preparing the request",[166,323,324],{},"Each request is then prepared on its own path, using only what the application has enabled:",[201,326,327,348],{},[204,328,329,332,333,335,336,338,339,341,342,344,345,347],{},[176,330,331],{},"LLM requests."," ",[185,334,58],{"href":59}," inspect the prompt and can block it or redact personal data. The model is chosen: the requested model ID, or the one ",[185,337,38],{"href":39}," picks for ",[223,340,225],{},". ",[185,343,48],{"href":49}," retrieve relevant passages from your documents, and ",[185,346,43],{"href":44}," builds the final prompt for the chosen model.",[204,349,350,353,354,357],{},[176,351,352],{},"Tool calls."," The application sees and can call only the ",[185,355,356],{"href":54},"tools"," enabled for it from the MCP servers your organization connects. The Gateway resolves each call to the right server and attaches the organization's stored connection.",[262,359,361],{"id":360},"delivery","Delivery",[201,363,364,370],{},[204,365,366,369],{},[176,367,368],{},"LLM requests"," go to the model provider with your organization's provider key. If the provider fails and other candidate models are available, such as the application's fallback models, the Gateway retries with the next one. Redacted values are restored in the response, so your application gets a complete answer while the provider never sees the data.",[204,371,372,375],{},[176,373,374],{},"Tool calls"," go to the tool server, and the result returns to the client. The Gateway authenticates each call with the connection your organization set up, so tool credentials, such as a GitHub token, never live in your application.",[262,377,379],{"id":378},"the-record","The record",[166,381,382],{},"Every LLM request and every tool call leaves a complete record, so security teams and auditors can see exactly what happened, not just that something happened. For each request, the Gateway records:",[201,384,385,391,397,403],{},[204,386,387,390],{},[176,388,389],{},"Who and how:"," the application and API key that made it, the endpoint, and the outcome, including why it failed if it did.",[204,392,393,396],{},[176,394,395],{},"Every step, in order and timed:"," guardrail checks and their results, how the model was chosen and why, the documents retrieved, how the context was compressed and the final prompt sent to the model.",[204,398,399,402],{},[176,400,401],{},"What it reached:"," the provider, model and provider key used, every fallback attempt, and each tool call with its result.",[204,404,405,408],{},[176,406,407],{},"What it cost:"," input, output and cached tokens, latency and cost.",[166,410,411,412,415,416,418,419,247],{},"Each request opens as a step-by-step trace in the application's ",[176,413,414],{},"Requests"," tab, and the same data feeds the usage and cost dashboards in ",[185,417,83],{"href":90},". Who can open request records follows each person's role; see ",[185,420,115],{"href":116},[189,422,424],{"id":423},"capabilities","Capabilities",[166,426,427],{},"Each capability has its own page with setup steps:",[201,429,430,435,440,445,450,455],{},[204,431,432,434],{},[185,433,33],{"href":34},": which models an application can call, its inference defaults and fallback models.",[204,436,437,439],{},[185,438,38],{"href":39},": lets the Gateway choose the best model for each request.",[204,441,442,444],{},[185,443,43],{"href":44},": fits long conversations into the model's context window and reduces token use.",[204,446,447,449],{},[185,448,48],{"href":49},": adds relevant passages from your files, Google Drive or Notion to the prompt.",[204,451,452,454],{},[185,453,53],{"href":54},": web search, preintegrated servers and your own MCP servers, behind one MCP endpoint.",[204,456,457,459],{},[185,458,58],{"href":59},": detects prompt injection, personal data and toxic content, and blocks or redacts it.",[189,461,463],{"id":462},"related","Related",[201,465,466,471,476,481],{},[204,467,468,470],{},[185,469,11],{"href":12},": why Optiak, how the layers fit together and the core concepts.",[204,472,473,475],{},[185,474,120],{"href":121},": application API keys, provider keys and connections.",[204,477,478,480],{},[185,479,69],{"href":70},": the organization policies the Gateway enforces.",[204,482,483,485],{},[185,484,156],{"href":157},": endpoints, parameters and errors.",{"title":487,"searchDepth":488,"depth":488,"links":489},"",2,[490,491,499,500],{"id":191,"depth":488,"text":192},{"id":250,"depth":488,"text":251,"children":492},[493,495,496,497,498],{"id":264,"depth":494,"text":120},3,{"id":285,"depth":494,"text":286},{"id":320,"depth":494,"text":321},{"id":360,"depth":494,"text":361},{"id":378,"depth":494,"text":379},{"id":423,"depth":488,"text":424},{"id":462,"depth":488,"text":463},"One entry point for your application's LLM requests and tool calls.","md",null,{},{"icon":31},{"title":28,"description":501},"-tLAy0bTfjyuNncuJwiMPCyv3wlgqJoxhYqz62RyKmA",[509,511],{"title":16,"path":17,"stem":18,"description":510,"icon":19,"children":-1},"Send your first inference request, then optionally test a tool through MCP.",{"title":33,"path":34,"stem":35,"description":512,"icon":36,"children":-1},"Choose which models your applications can call and how requests reach them.",1795006120970]