Quickstart
Use the API (2 min)
Point any OpenAI-compatible client at the gateway. During the beta the operator issues keys.
from openai import OpenAI
client = OpenAI(base_url="https://gateway.querais.xyz/v1", api_key="sk-...")
stream = client.chat.completions.create(
model="llama3.2",
messages=[{"role": "user", "content": "Explain Arbitrum in one sentence."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)Prefer a typed client? pip install querais or npm i @querais/sdk — both wrap the official OpenAI client and add sessions, nodes, and stats.
Run a node (~5 min)
You need Node 22.13+ and Ollama with a model pulled.
# 1. pull a model
ollama pull llama3.2
# 2. download the latest node release from GitHub, then:
./run-node.sh # macOS / Linux (run-node.ps1 on Windows)The node auto-claims $QAIS from the faucet, stakes, registers on-chain, and starts serving. Watch your earnings and reputation in the dashboard's operator console.
Pre-fund credit (skip per-call gas)
In the dashboard's Credit page: deposit $QAIS, sign one EIP-712 spending cap, then fire as many calls as you like — they batch-settle in a single transaction.