Inference gates
An inference gate is a model endpoint you can point an application at. It speaks the OpenAI chat-completions protocol, authenticates with a key you create yourself, and bills per token against the same credit balance as your GPU blades. Nothing is deployed or scaled on your side: there is no endpoint to provision and no model to load.
Use a gate when you want to consume a model. Use a GPU blade when you want to train, fine-tune, or run something the gate does not offer.
How a gate differs from a blade
Section titled “How a gate differs from a blade”| Inference gate | GPU blade | |
|---|---|---|
| Unit of work | One request | One machine, for a stretch of time |
| Billed on | Tokens used | Wall-clock runtime |
| Charged | As each call completes | When the blade stops |
| Credential | A gate key (rb-gate-…) |
Your CLI session, then SSH |
| Idle cost | None | The blade keeps billing |
Both draw on one balance and one ledger — see Credits and billing.
Keys, models and scope
Section titled “Keys, models and scope”A gate key belongs to an account, not to a person, so any application holding it spends that account’s credits. Keys are shown once, at creation, and stored only as a hash: if you lose one, revoke it and make another.
A key can be narrowed in two ways:
- Allowed models. A key can be restricted to a list of model ids. A request for anything else is refused with HTTP 403. This is set when the key is created through the API; the web app’s create form only asks for a name.
- Budget cap. A key can carry a maximum lifetime spend in euros, after which its requests fail with HTTP 402. Ask KlusAI to set this — it is not yet self-serve.
Model ids are aliases in the form klusai/<name> — for example klusai/fast,
which is what the CLI uses when you do not name a model. The authoritative list
for your account comes from the models endpoint (below); it changes as routes are
added, so read it rather than hard-coding a catalogue.
Create a key
Section titled “Create a key”From the CLI:
rb gate keys create "Lab notebook"The full key is printed once. It begins with rb-gate-.
Or in the web app: Inference Gates → Create API Key → give it a name → Create Key. The key is revealed once, in a green banner, with the same warning.
List and revoke keys with:
rb gate keys listrb gate keys revoke <KEY_ID>Revoking is immediate and permanent; existing requests using that key start failing with HTTP 401.
Call the gate from the OpenAI SDK
Section titled “Call the gate from the OpenAI SDK”The base URL is the gate root; the SDK appends /chat/completions itself.
import osfrom openai import OpenAI
client = OpenAI( base_url="https://api.razorbridge.eu/v1/gate", api_key=os.environ["RB_GATE_KEY"],)
response = client.chat.completions.create( model="klusai/fast", messages=[{"role": "user", "content": "Explain backpropagation in simple terms"}],)
print(response.choices[0].message.content)export RB_GATE_KEY="rb-gate-…"Call the gate with curl
Section titled “Call the gate with curl”curl https://api.razorbridge.eu/v1/gate/chat/completions \ -H "Authorization: Bearer $RB_GATE_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "klusai/fast", "messages": [{"role": "user", "content": "Hello!"}] }'The response is the provider’s OpenAI-shaped JSON, returned in one piece.
Streamed responses ("stream": true) are not available yet.
Try it without writing code
Section titled “Try it without writing code”rb gate test "Say hello in Romanian"rb gate test --model klusai/fast "Summarise this paragraph…"rb gate test uses your CLI session rather than a gate key, so it works before
you have created one. It prints the model, the token counts and the reply — and it
is billed like any other call.
The web app has the same thing under Inference Gates → Playground, plus a Recent Usage table.
List the models a key may use
Section titled “List the models a key may use”curl https://api.razorbridge.eu/v1/gate/models \ -H "Authorization: Bearer $RB_GATE_KEY"Watch what it costs
Section titled “Watch what it costs”rb gate usageThis lists your most recent calls with the model, prompt and completion token
counts, and the cost in euros of each. Every call also appears in the credit
ledger with the source inference, so rb credits reconciles against it.
Costs are deducted as calls complete. A call attempted with an empty balance returns HTTP 402 rather than running and leaving a debt.
Related pages
Section titled “Related pages”- API reference — the gate endpoints, fields and status codes.
- CLI reference — the full
rb gatecommand set. - Credits and billing — how inference charges appear.