Quickstart
Four steps: get an API key, choose a model, send your first request and see the usage in the console.
The examples use the OpenAI Chat Completions format; the Anthropic and Gemini formats and each tool's setup are linked at the end.
1. Get an API key
- Register an account and verify your email. Accounts with an unverified email cannot create API keys or top up.
- Top up on the console's Billing page. Credits are prepaid in US dollars and shared by every team member and API key of the account.
- Create a key on the API keys page. It starts with
sk-, and you can limit its credits, models and source IPs.
The full key is shown only once, right after you create it. Save it somewhere safe; if you lose it, create a new one.
2. Choose a model
Use the official model name, for example claude-opus-5, gpt-5.5 or gemini-3.6-flash. Prices and capabilities are in the model catalog; the model list explains how to see which models your key can use.
3. Send your first request
Send a Chat Completions request to https://api.relayvia.dev/v1 with your key in the Authorization header. If a reply comes back, you are set up.
curl https://api.relayvia.dev/v1/chat/completions \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{"model":"gpt-5.5","messages":[{"role":"user","content":"Hello!"}]}'from openai import OpenAI
client = OpenAI(base_url="https://api.relayvia.dev/v1", api_key="sk-...")
resp = client.chat.completions.create(model="gpt-5.5", messages=[{"role": "user", "content": "Hello!"}])
print(resp.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.relayvia.dev/v1", apiKey: "sk-..." });
const resp = await client.chat.completions.create({
model: "gpt-5.5",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(resp.choices[0].message.content);Using the Anthropic or Gemini SDK? See Messages and Gemini native. For Claude Code, Codex CLI and other tools, see the integration guides below.
4. See the usage in the console
Every request appears in Usage logs with its model, tokens, charge and latency, and Usage shows totals by day and model. Each response carries an x-robi-request-id header that matches its log entry.
To check from code, call /v1/balance for the credits your key can still spend and /v1/usage for its usage.
Next: set up your tool
- Claude Code Install Claude Code and point it at Relayvia with a settings file or environment variables.
- Codex CLI Install Codex CLI and add Relayvia to ~/.codex/config.toml.
- Cursor Enter Relayvia's URL and your API key in Cursor's model settings.
- Cherry Studio Add an OpenAI-type model service in Cherry Studio that points at Relayvia.