Getting StartedQuickstart
Quickstart
Get from zero to your first model response in under five minutes. RusAI is fully OpenAI-SDK compatible — point your client at our base URL and you're done.
Install
Pick your preferred SDK. Both ship with full type definitions.
# JavaScript / TypeScript npm install openai # Python pip install openai
Make your first request
Set the base URL to https://rusai.ru/api/v1 and use any model slug.
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://rusai.ru/api/v1",
apiKey: process.env.RUSAI_API_KEY,
});
const res = await client.chat.completions.create({
model: "anthropic/claude-opus-4.7",
messages: [{ role: "user", content: "Hello world" }],
});Streaming
Pass stream: true to get incremental tokens via SSE.
const stream = await client.chat.completions.create({
model: "openai/gpt-5.5",
messages: [{ role: "user", content: "Write a haiku" }],
stream: true,
});
for await (const chunk of stream) {
process.stdout.write(chunk.choices[0]?.delta?.content || "");
}Tool use
All major reasoning models support OpenAI-style function calling.
Tip: Combine tools with our Fusion router to fall back automatically when a provider returns a malformed tool call.