Switch your SDK. Keep your code.

Start with the API you already run. Keep streaming, tool calls, and JSON modes; change the endpoint and key.

Choose migration guide Open quickstart →
client.py2 lines changed
−base_url="https://api.openai.com/v1"+base_url="https://www.ninjachat.ai/api/v1"−api_key=os.environ["OPENAI_API_KEY"]+api_key=os.environ["NINJACHAT_API_KEY"]
streamingunchangedtool callsunchangedresponse shapeunchanged
01The client stays.OpenAI-compatible.
02The catalog opens.Chat, image, video, search.
03Every request leaves a receipt.Route, cost, attempts, outcome.

Framework code stays boring.

Vercel AI SDK, LangChain, LlamaIndex, and LiteLLM keep working with the new endpoint and an nj_sk_ key.

Vercel AI SDK

TypeScript
typescript
import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";

const ninjachat = createOpenAI({
  baseURL: "https://www.ninjachat.ai/api/v1",
  apiKey: process.env.NINJACHAT_API_KEY,
});

const { text } = await generateText({
  model: ninjachat.chat("claude-opus-4.6"), // .chat() → chat/completions
  prompt: "Summarize the CAP theorem in two sentences.",
});

One key. Every lab.

Start building Browse all models →