Skip to main content
You signed up, you have a key. Now you need to point your client at ByteSpike instead of a model vendor’s own gateway. The whole gateway lives at https://llm.bytespike.ai — every protocol, every model. Pick the protocol that matches your client, set two env vars, and you’re done.

1. Get an API key

Sign in to console.bytespike.ai/keys and Create key. Pick the routing group (claude-default for Claude models, gemini-default for Gemini, or default to route everything — see Models for what’s in each group). The plaintext is shown once at creation — store it. Format: sk-byts-….
Treat the key like a database password. Each key binds to one routing group; create separate keys for each model family you want to reach instead of trying to put one key everywhere.

2. Pick a protocol

Three protocols hit the same gateway. Pick whichever your client speaks natively — billing, throttling, and credit accounting are identical across all three. The URL you use depends on whether you’re driving an SDK (which auto-appends the endpoint path) or hand-rolling curl / REST (where you write the full path yourself).

SDK base URL

Set this as ANTHROPIC_BASE_URL / OPENAI_BASE_URL / Gemini client endpoint. The SDK appends /v1/messages, /chat/completions, or /models/{model}:generateContent for you.
ProtocolSDK base URLTypical clients
Anthropic Messageshttps://llm.bytespike.aiClaude Code, Claude Desktop, Anthropic SDK
OpenAI Chat Completionshttps://llm.bytespike.ai/v1OpenAI SDK, Cherry Studio, NextChat, LobeChat
Gemini Nativehttps://llm.bytespike.ai/v1betaGoogle AI Studio examples, vertex-compat clients

Full endpoint (curl / REST) [#full-endpoint]

If you’re calling the gateway with curl or any client that needs the literal request URL, use the full endpoint instead. This is what the console’s Keys → EndpointBanner copies.
ProtocolFull endpoint
Anthropichttps://llm.bytespike.ai/v1/messages
OpenAIhttps://llm.bytespike.ai/v1/chat/completions
Geminihttps://llm.bytespike.ai/v1beta/models/{model}:generateContent
Gemini’s path needs the model id baked into the URL (e.g. gemini-3.1-pro:generateContent); the other two take the model in the JSON body.

3. Set the env vars

For Claude Code and the Anthropic SDK, two env vars are all you need:
export ANTHROPIC_BASE_URL=https://llm.bytespike.ai
export ANTHROPIC_API_KEY=sk-byts-...
Any client that reads these standard vars (Claude Code, Anthropic Python / TypeScript SDK, third-party clients) picks them up transparently. Then call any Anthropic-compatible model:
import anthropic
client = anthropic.Anthropic()  # reads env vars
msg = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    messages=[{"role": "user", "content": "hi"}],
)
Or, with the full endpoint via curl:
curl https://llm.bytespike.ai/v1/messages \
  -H "x-api-key: sk-byts-..." \
  -H "anthropic-version: 2023-06-01" \
  -H "content-type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 64,
    "messages": [{"role": "user", "content": "hi"}]
  }'

4. Pick a model

One key calls every model regardless of which vendor originally made it. You don’t need a separate Anthropic / OpenAI / Google / DeepSeek subscription — ByteSpike serves them all through one endpoint. Common model IDs (full catalog at Console → Models or via GET /v1/models):
FamilyUse these ids
Claudeclaude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5
GPT-5gpt-5-5, gpt-5-4, gpt-5-4-mini, gpt-5-4-nano, gpt-5-2
Geminigemini-3-1-pro, gemini-3-5-flash, gemini-2-5-flash
DeepSeekdeepseek-v4-pro, deepseek-v4-flash, deepseek-v3-2, deepseek-v3-anthropic
Kimi / GLM / MiniMax / Doubaokimi-k2-6, glm-5-1, minimax-m2-7, doubao-seed-2-0-pro
Imageseedream-4-5, seedream-v5lite, nano-banana, nano-banana-v2, gpt-image-2
Videosora2, sora2-pro, veo3-1, veo3-1-fast, seedance-pro, seedance-1-5-pro
A model id is the same string regardless of which protocol you use — claude-sonnet-4-6 works on Anthropic Messages, OpenAI Chat Completions, and Gemini Native.

5. Client-specific setup

Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY automatically. Add to your shell profile:
# ~/.zshrc or ~/.bashrc
export ANTHROPIC_BASE_URL=https://llm.bytespike.ai
export ANTHROPIC_API_KEY=sk-byts-...
Then claude calls every Anthropic-protocol model through ByteSpike.
Open Settings → Developer → Edit Config. Add the env vars under your OS’s section. Restart the app for the change to take.
Settings → Model Providers → Add Provider → “OpenAI Compatible”. Base URL: https://llm.bytespike.ai/v1. API key: your ByteSpike key. Then any of the model ids from the table above works.
Settings → Custom Endpoint. API URL: https://llm.bytespike.ai/v1. API Key: your ByteSpike key. Model: any of the ids above.
Pass base_url / baseURL in the client constructor. The model string is the only thing that changes per call.Python:
from openai import OpenAI
OpenAI(base_url="https://llm.bytespike.ai/v1", api_key="sk-byts-...")
TypeScript:
import OpenAI from "openai"
new OpenAI({ baseURL: "https://llm.bytespike.ai/v1", apiKey: "sk-byts-..." })

6. Verify the wiring

Hit /v1/models to confirm the key is live and see what your account can actually call:
curl https://llm.bytespike.ai/v1/models \
  -H "Authorization: Bearer sk-byts-..."
The response is a JSON array of model objects. data[].id should include every model your tier exposes. If the list is short and you expected more, check console.bytespike.ai/account — your allowed_models may be capped by an org default or admin policy.
Errors come back in the protocol’s native shape. A 401 means the key is wrong; a 403 means the key is fine but the model isn’t on your tier; a 402 means out of credits — top up at console.bytespike.ai/billing.

Next steps