First token in minutes.
GateVia speaks the OpenAI chat-completions wire format. Point an existing SDK at the GateVia base URL and use a workspace inference key. The console’s playground exercises the same execution path.
Quickstart
Create a workspace, open API keys, mint an inference key, then call the gateway. In this isolated preview the console is at https://app.gatevia.ai.
export GATEVIA_API_KEY="gv-ik-…"
curl https://app.gatevia.ai/api/v1/chat/completions \
-H "Authorization: Bearer $GATEVIA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seed-model",
"messages": [{"role":"user","content":"Say hello in one sentence."}]
}'
The console proxy uses the workspace’s server-side playground key, so no customer secret is stored in the browser. Customer inference keys are shown once and stored as hashes.
Authentication
Inference requests use Authorization: Bearer gv-ik-…. The key is scoped to one workspace and the inference.chat scope. Management and session credentials are separate: a console cookie cannot be used as an inference bearer, and an inference key cannot mint console actions.
| Credential | Scope | Use |
|---|---|---|
| Console session | one account | HTML console + JSON product API |
| Inference key | one workspace | M3 chat/completions |
| Internal playground key | one workspace | server-side proxy only; encrypted at rest |
Credits, budgets and ledger
Prepaid credits are held by the M2 financial authority and settled through the M2 ledger. This preview funds credits through invoice-backed settlement: create an invoice, an operator records the settlement, and the money-in path posts a normalized ledger entry. External card processing is not activated.
Usage is metered by the gateway after routing. The console’s Usage page reads aggregate tokens/cost from the finance API and a daily series from the workspace usage event table. Missing data is shown as missing, never zero-filled as a quality signal.
Streaming
Set "stream": true. The response is server-sent events with canonical OpenAI-style delta frames and a terminal [DONE]. The console proxies the stream without reimplementing the gateway contract.
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://app.gatevia.ai/api/v1", apiKey: process.env.GATEVIA_API_KEY });
const stream = await client.chat.completions.create({ model: "seed-model", messages: [{ role: "user", content: "hello" }], stream: true });
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content || "");
Catalog
Published model and endpoint rows come from the M0 catalog snapshot. The model pages expose context length, per-million prices and supported parameters. Price provenance is the published price book, not a separate marketing table.
Teams and access
Organizations are billing scopes; workspaces are request scopes. Owners and admins invite people, billing roles see invoices and credits, workspace admins manage keys for their workspace, and viewers can read activity without minting credentials.
Errors
Product API errors use:
{"error":{"code":"…","message":"…","request_id":"req_…"}}
Gateway errors are passed through with their original status and body. The console never converts an upstream refusal into a success; refusals and policy blocks remain distinct.