Connection basics
Use this base URL
https://api.cheaperinference.com/v1
Before you start
Create an API key, then copy an exact model ID from the live model catalog. Store keys in an environment variable when the app supports it.
OpenAI Node
OpenAI Node SDK
import OpenAI from "openai";const client = new OpenAI({ apiKey: process.env.CHEAPER_INFERENCE_API_KEY, baseURL: "https://api.cheaperinference.com/v1",});const response = await client.chat.completions.create({ model: "gpt-5.4", messages: [{ role: "user", content: "Hello" }],});