Getting started
Quickstart
Get from zero to your first proxied AI call in under five minutes. You will change two lines of code — nothing else in your app needs to change.
Steps
- 1
Connect a provider API key (admin)
Go to API Keys → Provider keys → Add key. Paste your OpenAI, Anthropic, or Google API key. Zelyx validates the format and stores it encrypted — your real key never leaves the vault.
Supported providers: OpenAI, Anthropic, Google, Groq, Together, Mistral, DeepSeek, xAI, OpenRouter, Fireworks, Perplexity, or any custom slug.
- 2
Create your Zelyx key
On the same API Keys page, under Zelyx proxy keys, click New proxy key. Give it a label (e.g.
dev-laptop), set an optional daily budget, and click Generate key.Your key is shown once. Copy it now — it cannot be retrieved again. It looks like:
nk_a1b2c3d4e5f6_aBcDeFgHiJkLmNoPqRsTuVwXyZ0123456789abc
- 3
Point your SDK at Zelyx
Change two things in your code:
api_key(use your Zelyx key) andbase_url(point to Zelyx). Everything else — model names, streaming, tool use, message format — stays exactly the same.OpenAI SDK (Python)
pythonfrom openai import OpenAI client = OpenAI( api_key="nk_<your-zelyx-key>", base_url="https://api.zelyx.app/proxy/openai/v1", ) response = client.chat.completions.create( model="gpt-4o-mini", messages=[{"role": "user", "content": "Hello"}], ) print(response.choices[0].message.content)Anthropic SDK (Python)
pythonimport anthropic client = anthropic.Anthropic( api_key="nk_<your-zelyx-key>", base_url="https://api.zelyx.app/proxy/anthropic", ) message = client.messages.create( model="claude-haiku-4-5", max_tokens=256, messages=[{"role": "user", "content": "Hello"}], ) print(message.content[0].text)OpenAI SDK (TypeScript)
typescriptimport OpenAI from "openai"; const client = new OpenAI({ apiKey: "nk_<your-zelyx-key>", baseURL: "https://api.zelyx.app/proxy/openai/v1", }); const response = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: "Hello" }], }); console.log(response.choices[0].message.content); - 4
stream=True (or stream: true in TypeScript) exactly as you would with the provider SDK — Zelyx streams the response transparently.What happens on each call
When your app sends a request through Zelyx, the proxy:
- Verifies your Zelyx key and resolves your workspace
- Decrypts your provider API key from the encrypted vault
- Runs the gate — checks budgets, model policies, and payment patterns
- Forwards the request to the provider if approved
- Streams the response back to your app (recording tokens and latency)
- Records the cost event in the background for analytics
Your app never sees the provider key. If a budget is exceeded, Zelyx returns HTTP 402 before the provider is contacted — so no tokens are consumed and no cost is incurred.