Loading…
The WorkChi API is fully compatible with OpenAI. Just change the base URL and you're done.
Create a key with the gateway:invoke scope in your API keys dashboard.
Update your code to use the WorkChi endpoint:
Set model: "auto" to let the router select the optimal model, or specify a specific model.
import OpenAI from "openai";
// Fully OpenAI-compatible — just change the base URL + key.
const client = new OpenAI({
apiKey: process.env.WORKCHI_API_KEY, // wcb_live_...
baseURL: "https://benchmarks.datachi.ai/api/v1",
});
const response = await client.chat.completions.create({
model: "auto", // router picks the optimal model, or pass a model id
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Explain quantum computing in simple terms." },
],
max_tokens: 1000,
});
console.log(response.choices[0].message.content);Native Python and JS support
RAG and indexing support
Autonomous agent support
Microsoft ecosystem
Define your own routing logic based on task type, language, or user tier.
{
"model": {
"task": "code",
"language": "de",
"tier": "premium"
}
}Route all requests to EU-hosted models for compliance.
{
"model": "auto",
"region": "eu" // Forces EU providers
}Get your API key and start using the WorkChi Router today.