SDKs and frameworks

LlamaIndex

LlamaIndex reaches OpenAI-compatible APIs through OpenAILike. Tell it the model is a chat model that can call tools, and it works in query engines and agents alike.

Python

LlamaIndex · Python
# pip install llama-index-llms-openai-like
import os
from llama_index.core import Settings
from llama_index.llms.openai_like import OpenAILike

llm = OpenAILike(
    model="claude-sonnet-5-5",
    api_base="https://vioneer.xyz/api/v1",
    api_key=os.environ["VIONEER_API_KEY"],
    is_chat_model=True,
    is_function_calling_model=True,
    context_window=200000,
)

Settings.llm = llm  # the default for indexes, query engines and agents
print(llm.complete("Write a haiku about the sea."))

is_chat_model=True sends requests to /chat/completions, which every model on Vioneer answers. context_window is the model’s own; Claude Sonnet 5.5’s page gives it.

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.