Drop-in compatibility
Keep the SDK. Change the route.
Use familiar OpenAI client libraries while InferencePass selects a healthy compatible provider behind one endpoint.
A practical compatibility target
InferencePass follows the OpenAI chat completions request and response shapes for the supported v1 features. It normalizes provider text, usage, errors, SSE chunks, JSON output, and tool calls.
OpenAI JavaScript SDK
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.INFERENCEPASS_API_KEY,
baseURL: "https://api.inferencepass.com/v1",
});
const response = await client.chat.completions.create({
model: "auto",
messages: [{ role: "user", content: "Hello" }],
});Stable routing selectors
Use auto, fast, or reasoning when you want the router to choose. Use a concrete published model when you need that exact model and it is healthy.
Clear boundaries
Compatibility does not mean every OpenAI product is emulated. The v1 boundary excludes images, audio, embeddings, fine-tuning, and the Responses API.