Quickstart
The gateway is one HTTP host that speaks the OpenAI, Anthropic and Gemini wire formats. You keep your SDK, change the base URL and the key, and every model in the catalog is available through every chat format.
The examples on this site use https://api.test.whocare.xyz as the gateway address. Use the address your operator gave you (it is the GATEWAY_PUBLIC_URL of the deployment).
1. Create a key and check the balance
Section titled “1. Create a key and check the balance”- Create an API key on the API keys page. The secret (
sk-followed by 48 characters) is shown once. Copy it. - Put some balance on the account: balance and top-ups. A request is refused with
402 insufficient_balancewhen the balance cannot cover the worst case of that request (see Billing basis).
export GATEWAY_API_KEY="sk-..."2. List the models you can call
Section titled “2. List the models you can call”curl https://api.test.whocare.xyz/v1/models \ -H "Authorization: Bearer $GATEWAY_API_KEY"Use the id of an entry as model. The same list, with prices and capabilities, is in the model catalog.
3. Send a request
Section titled “3. Send a request”curl https://api.test.whocare.xyz/v1/chat/completions \ -H "Authorization: Bearer $GATEWAY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gpt-4o-mini", "messages": [{"role": "user", "content": "Say hello in one word."}] }'The response is the normal OpenAI response with one addition: usage.cost, the USD amount this request was charged.
4. With an SDK
Section titled “4. With an SDK”Point the official SDK at the gateway. Nothing else changes.
import osfrom openai import OpenAI
client = OpenAI(base_url="https://api.test.whocare.xyz/v1", api_key=os.environ["GATEWAY_API_KEY"])
resp = client.chat.completions.create( model="gpt-4o-mini", messages=[{"role": "user", "content": "Say hello in one word."}],)print(resp.choices[0].message.content)print("cost (USD):", resp.usage.model_extra["cost"])import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.test.whocare.xyz/v1", apiKey: process.env.GATEWAY_API_KEY,});
const resp = await client.chat.completions.create({ model: "gpt-4o-mini", messages: [{ role: "user", content: "Say hello in one word." }],});console.log(resp.choices[0].message.content);console.log("cost (USD):", resp.usage.cost);- Use another dialect (Anthropic, Gemini, Responses): Endpoints.
- Stream tokens: Streaming.
- Handle failures: Errors and retries.
- Read what a request cost:
usage.costand/v1/generation. - Configure Claude Code, Cursor, Cline or Codex: Clients.