Skip to main content
Tokios exposes standard OpenAI and Anthropic API surfaces, so any tool or library that allows you to override the base URL works out of the box. The only changes needed are the base URL and your Tokios API key.

Supported clients

ClientBase URL env/settingAPI key env/setting
Claude CodeANTHROPIC_BASE_URLANTHROPIC_API_KEY
OpenAI CodexOPENAI_BASE_URLOPENAI_API_KEY
OpenAI Python SDKbase_url paramapi_key param
OpenAI Node.js SDKbaseURL paramapiKey param
LangChain (Python)openai_api_baseopenai_api_key
Cursor IDECustom model base URLAPI key field
Continue.devapiBaseapiKey
If your client uses OPENAI_BASE_URL or ANTHROPIC_BASE_URL, you can set those environment variables once and every compatible tool in your terminal session picks them up automatically.

Code examples

OpenAI Node.js SDK

openai_node.js
import OpenAI from 'openai';

const client = new OpenAI({
  baseURL: 'https://api.tokios.com/v1',
  apiKey: 'sk-tokios-YOUR_KEY_HERE',
});

const response = await client.chat.completions.create({
  model: 'gemma-tunnel',
  messages: [{ role: 'user', content: 'Hello!' }],
});
console.log(response.choices[0].message.content);

LangChain (Python)

langchain_tokios.py
from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="gemma-tunnel",
    openai_api_base="https://api.tokios.com/v1",
    openai_api_key="sk-tokios-YOUR_KEY_HERE",
)
result = llm.invoke("Summarize this code: print('hello')")
print(result.content)