Skip to content
NewFinOps, Kubernetes and AI, on one platform
Book a demo
UnitVane docs
API referenceReleases

Gateway quickstart

Connect a provider, create a route and a team key, and send your first request through the UnitVane AI gateway.

Who does what

The path of a model request

  1. 01

    Authenticate

    The application calls a route with a scoped team or application key.

    Your application

  2. 02

    Check policy

    The gateway checks routes, budgets and rate limits and applies configured redaction.

    AI gateway

  3. 03

    Select target

    Use the route strategy, permitted regions and configured fallback targets.

    AI gateway

  4. 04

    Return + meter

    Return the provider response and record request metadata, tokens and cost.

    Gateway + tokenomics

The gateway is in the request path. Direct calls to providers bypass gateway controls.

Read the workflow
On this page

1. Connect a provider

In AI > Gateway > Providers, add the deployments the gateway may call. Connect AI providers grants read access to cost and telemetry; to route requests, the gateway also needs permission to call each deployment you add. UnitVane stores provider credentials encrypted and uses them only to call your provider.

2. Create a route

A route is the name your apps call. It lists targets in order, with the conditions for moving to the next one.

Route chat-default
apiVersion: ai.unitvane.com/v1kind: Routemetadata:  name: chat-defaultspec:  strategy: priority          # priority | lowest-cost | lowest-latency | weighted  targets:    - provider: azure-openai      deployment: chat-prod     # gpt-4.1, Data Zone, 100 PTU      until:        utilization: 90%        # PTU first, then spill over    - provider: azure-openai      deployment: chat-paygo    # gpt-4.1, Global pay-as-you-go    - provider: bedrock      model: anthropic.claude-sonnet      region: us-east-1      on: [429, 5xx, timeout]   # fallback only  retries: { attempts: 2, backoff: exponential }  timeoutSeconds: 20  cache: { mode: exact, ttl: 1h }  redact: [email, phone, credit_card]  residency: us  maxOutputTokens: 4096

3. Create a key

Create a team key
curl https://acme.kubeon.io/api/ai/keys \  -H "Authorization: Bearer $KUBEON_ADMIN_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "name": "support-bot",    "team": "Support assistant",    "product": "Customer support",    "routes": ["chat-default", "embed"],    "budget": { "monthlyUsd": 50000, "action": "hard-stop" },    "limits": { "tokensPerMinute": 2000000, "requestsPerMinute": 3000 }  }'

4. Send a request

Python
import osfrom openai import OpenAIclient = OpenAI(    base_url="https://gateway.unitvane.com/v1",    api_key=os.environ["KUBEON_AI_KEY"],   # a team key, not a provider key)resp = client.chat.completions.create(    model="chat-default",                  # a route name, not a vendor model    messages=[{"role": "user", "content": "Summarize this ticket in two lines."}],)print(resp.choices[0].message.content)

The response is the provider's response. Three headers tell you how it was served: x-kubeon-route (the target), x-kubeon-tokens and x-kubeon-cost-usd. The request appears in AI > Gateway > Requests within seconds.

Use route names such as chat-default instead of vendor model names. You can then change models or providers in the route without redeploying any app.
Need help with this guide?Contact support