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.

NoteThe workspace admin must connect at least one provider key before developers can create their own Zelyx keys. If you are the first person setting up the workspace, complete both steps below. Otherwise skip to step 2.

Steps

  1. 1

    Connect a provider API key (admin)

    Go to API Keys Provider keysAdd 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. 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. 3

    Point your SDK at Zelyx

    Change two things in your code: api_key (use your Zelyx key) and base_url (point to Zelyx). Everything else — model names, streaming, tool use, message format — stays exactly the same.

    OpenAI SDK (Python)

    python
    from 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)

    python
    import 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)

    typescript
    import 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. 4

    Verify in the dashboard

    Make a call. Within a few seconds it should appear in Overview and Explorer. Cost, tokens, latency, and model are all recorded automatically.

TipStreaming works out of the box. Pass 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:

  1. Verifies your Zelyx key and resolves your workspace
  2. Decrypts your provider API key from the encrypted vault
  3. Runs the gate — checks budgets, model policies, and payment patterns
  4. Forwards the request to the provider if approved
  5. Streams the response back to your app (recording tokens and latency)
  6. 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.