09

Integrations

Anything that speaks the OpenAI API works with NXIO by changing the base URL.

OpenAI SDKs

Set baseURL to the NXIO API base and apiKey to your NXIO key. No other change is needed.

TypeScript
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.nxioai.com/api/v1',
  apiKey: process.env.NXIO_API_KEY,
  defaultHeaders: { 'X-Title': 'My App' }, // optional: shows up in your usage analytics
});

const res = await client.chat.completions.create({
  model: 'anthropic/claude-sonnet-5',
  messages: [{ role: 'user', content: 'Say hello' }],
});
console.log(res.choices[0].message.content);
console.log(res.usage); // prompt/completion/cached tokens + cost in USD
Python
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.nxioai.com/api/v1", api_key=os.environ["NXIO_API_KEY"])
res = client.chat.completions.create(
    model="anthropic/claude-sonnet-5",
    messages=[{"role": "user", "content": "Say hello"}],
)
print(res.choices[0].message.content)
print(res.usage)

Open WebUI

Add NXIO as an OpenAI-compatible connection. The model list is loaded from GET /models and every conversation is billed to the key you configure.

settings
# Open WebUI → Admin Settings → Connections → OpenAI API
URL:  https://api.nxioai.com/api/v1
Key:  sk-nxio-v1-…
# Models appear automatically from GET /models; every chat is billed to your NXIO key.

Frameworks

LangChain, LlamaIndex, Vercel AI SDK, LiteLLM and similar libraries all accept a custom OpenAI base URL. Use the NXIO model id as the model name.