Quickstart
Relay speaks the OpenAI wire format. Change the base URL and the key; leave your request bodies alone. The Anthropic-compatible endpoint is built but not live yet — see Not live yet below.
| OpenAI-compatible base URL | https://ai-gateway.getborg.com/api/v1/proxy/v1 | |
|---|---|---|
| Anthropic-compatible base URL | https://ai-gateway.getborg.com/api/v1/proxy | not live yet |
| Auth header | Authorization: Bearer <your key> | or x-api-key: <key> |
Create a key under API keys. The secret is shown exactly once. Every key on your account draws down the same prepaid balance.
The OpenAI SDK below sends
Authorization: Bearer <key> for you — just set
api_key. Model ids are the short ids listed on
Models (glm-5.3, not
z-ai/glm-5.3); anything not on that page is not callable yet.
curl
curl https://ai-gateway.getborg.com/api/v1/proxy/v1/chat/completions \
-H "Authorization: Bearer $RELAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3",
"messages": [{"role": "user", "content": "In one line: what is prepaid inference?"}]
}'
OpenAI SDK — Python
from openai import OpenAI
client = OpenAI(
base_url="https://ai-gateway.getborg.com/api/v1/proxy/v1",
api_key=os.environ["RELAY_API_KEY"],
)
resp = client.chat.completions.create(
model="glm-5.3",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)
OpenAI SDK — JavaScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://ai-gateway.getborg.com/api/v1/proxy/v1",
apiKey: process.env.RELAY_API_KEY,
});
const resp = await client.chat.completions.create({
model: "gemini-3-flash",
messages: [{ role: "user", content: "Hello" }],
});
console.log(resp.choices[0].message.content);
Cursor
Settings → Models → OpenAI API Key: tick Override OpenAI Base URL, set it to
https://ai-gateway.getborg.com/api/v1/proxy/v1, and paste your Relay key as the API key. Add
glm-5.3 as a custom model — Cursor's built-in model names are
GPT and Claude ids, which are not on sale yet.
Not live yet
We would rather tell you than let you debug it. These are built but not callable on a Relay key today, so they are not priced on Models and there is no example for them here:
- GPT, Claude, Grok, Muse and Kimi models. Capacity and entitlement work in
progress. Use
glm-5.3orgemini-3-flashmeanwhile — same OpenAI-compatible request body, just a different"model". - The Anthropic-compatible endpoint (and so Claude Code via
ANTHROPIC_BASE_URL), because it needs a Claude-family model. - Codex CLI, which pins a GPT model id.
- Image generation, not a live route yet.
Everything above is on the way; nothing here costs you credit in the meantime. Ask us if a specific model is blocking you and we will tell you where it stands.
Errors worth knowing
| Status | Means | Do |
|---|---|---|
| 402 | insufficient_credit — your balance is empty, top up to continue | Add credit |
| 429 | Too many requests in flight at once | Back off and retry; ask us to raise your concurrency limit |
| 401 | Key is wrong, rotated, or revoked | Check API keys |
| 403 | Account disabled | Contact support |