01

Quickstart

NXIO is a drop-in replacement for the OpenAI API. Set the base URL, use your NXIO key, pick a model.

Three steps

1. Create an API key in the dashboard (Dashboard → API keys). The full key is shown once.

2. Point your OpenAI SDK or HTTP client at the NXIO base URL.

3. Call any model from the catalog using its NXIO id, e.g. anthropic/claude-sonnet-5.

curl
curl https://api.nxioai.com/api/v1/chat/completions \
  -H "Authorization: Bearer $NXIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "anthropic/claude-sonnet-5",
    "messages": [{"role": "user", "content": "Say hello"}]
  }'
TypeScript (openai)
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 (openai)
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)

What you get back

Responses follow the OpenAI chat completion schema. Two things are NXIO-specific: the response id is your NXIO request id (usable with GET /generation), and usage always includes the cost in USD and the cached token count.

usage
"usage": {
  "prompt_tokens": 1200,
  "completion_tokens": 300,
  "total_tokens": 1500,
  "prompt_tokens_details": { "cached_tokens": 1000, "cache_write_tokens": 0 },
  "completion_tokens_details": { "reasoning_tokens": 0 },
  "cost": 0.00546,
  "is_byok": false
}

Base URLs

The API is served under /api/v1. For SDKs that append /v1 themselves, the same routes are also available under /v1.

PurposeURL
API basehttps://api.nxioai.com/api/v1
Models cataloghttps://api.nxioai.com/api/v1/models
OpenAPI spechttps://platform.nxioai.com/openapi.json