Connect CheapLLM to JavaScript
The openai library for Node.js. Step-by-step CheapLLM API setup for JavaScript to run Claude, GPT-6, Gemini, and DeepSeek up to 70% cheaper.
1. Create a CheapLLM API key
Create a CheapLLM account and generate an API key. One key unlocks all 48+ OpenAI, Anthropic, Google, and DeepSeek models at up to 70% off official API rates.
Base URL (OpenAI-compatible)
https://api.cheapllm.com/v12. Install the package
Terminal
npm install openai3. Make your first request
index.ts
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.cheapllm.com/v1",
apiKey: "sk-clm-8a4f9e2b4d1c7a609c21",
});
const res = await client.chat.completions.create({
model: "openai/gpt-6-astra",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(res.choices[0].message.content);Top models to run in JavaScript
All 48+ models →| Model | Official (in / out) | CheapLLM (in / out) | Savings |
|---|---|---|---|
| Claude Opus 5.5 | $2.80 / $14.00 | −30% | |
| GPT-6.1 Sol | $1.40 / $7.00 | −30% | |
| Gemini 4 Argon | $1.40 / $7.00 | −30% | |
| DeepSeek V4 Pro 0813 | $0.078 / $3.11 | −30% |