Get started
API reference
The gateway answers the OpenAI and Anthropic wire formats as their SDKs expect. Requests and responses are the standard shapes; Vioneer adds a few headers that say what a request cost.
Base URLs and authentication
- OpenAI-compatible base URL
https://vioneer.xyz/api/v1- Anthropic-compatible base URL
https://vioneer.xyz/api- Authentication
Authorization: Bearer <key>orx-api-key: <key>
The API is served under both /api/v1 and /v1, so a client that adds its own /v1 and one that does not both find it.
Endpoints
| Method and path | What it does |
|---|---|
POST /chat/completions | OpenAI chat completions, streamed or not, with tools |
POST /responses | The OpenAI Responses API |
POST /messages | The Anthropic Messages API, streamed or not, with tools |
GET /models | The catalogue with prices, in OpenRouter’s shape. No key needed |
GET /models/{id} | One model |
GET /key | The calling key: its label, limit and usage |
GET /credits | The account’s total credit and total usage |
GET /generation?id= | Usage and cost for one request id |
Paths are relative to https://vioneer.xyz/api/v1.
Streaming
Set "stream": true on either format. Server-sent events are relayed as they arrive, with no buffering added, tool calls and reasoning included.
# pip install openai
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["VIONEER_API_KEY"],
base_url="https://vioneer.xyz/api/v1",
)
stream = client.chat.completions.create(
model="gpt-6.2-sol",
messages=[{"role": "user", "content": "Write a haiku about the sea."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)
Response headers
Every answer says what it cost. A streamed answer carries only its id, because the cost is known when the stream ends; GET /generation?id= has the rest.
x-vioneer-request-id: gen_9f3c… # the row in your activity log
x-vioneer-cost-usd: 0.000412000 # what this request cost
x-vioneer-tokens-prompt: 318
x-vioneer-tokens-completion: 96
Errors
Errors come back in the format of the endpoint you called: {"error": {"message", "type", "code"}} on the OpenAI paths, {"type": "error", "error": {"type", "message"}} on /messages.
| Status | Type | Meaning |
|---|---|---|
| 400 | invalid_request_error | The request is malformed, or the model is not served on that endpoint |
| 401 | authentication_error | Missing, wrong or revoked key |
| 402 | insufficient_credits | Not enough credit: top up |
| 403 | permission_error | The key may not use that model, or its budget is spent |
| 404 | not_found_error | Unknown model or path |
| 429 | rate_limit_error | A rate or concurrency limit; honour retry-after |