SDKs and frameworks

OpenAI SDK

The official OpenAI SDKs work unchanged. Set the base URL to https://vioneer.xyz/api/v1 and the key to your Vioneer key, and name any model in the catalogue, Claude models included.

Python

OpenAI SDK · Python
# 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="claude-sonnet-5-5",
    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)

Node.js and TypeScript

OpenAI SDK · Node
// npm install openai
import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: process.env.VIONEER_API_KEY,
  baseURL: 'https://vioneer.xyz/api/v1',
});

const stream = await client.chat.completions.create({
  model: 'gpt-6.2-sol',
  messages: [{ role: 'user', content: 'Write a haiku about the sea.' }],
  stream: true,
});
for await (const chunk of stream) {
  process.stdout.write(chunk.choices[0]?.delta?.content ?? '');
}

With environment variables

Both SDKs read their address and key from the environment, so existing code can switch without an edit:

shell
export OPENAI_BASE_URL="https://vioneer.xyz/api/v1"
export OPENAI_API_KEY="$VIONEER_API_KEY"

Tools, JSON and the Responses API

Tool calling, JSON output and streaming pass through as the SDK sends them. client.responses.create is served at /responses too. See the API reference for the full list.

If something does not work

  • 401: the key is wrong, revoked or missing. Keys are shown once, when you create them; make a new one in the dashboard if in doubt.
  • 402: the account is out of credit. Top up and the next request goes through.
  • 403: the key is not allowed that model. Check its model allowlist under Keys.
  • 404 on a model: the id is not in the catalogue. Copy it from the price list.
  • 429: a rate or concurrency limit was hit. Wait for the retry-after seconds, or raise the key’s limit.

Every request, failed ones included, is listed in the dashboard’s activity log with its status and cost.