Connect CheapLLM to AI SDK
Vercel's AI SDK for TypeScript. Step-by-step CheapLLM API setup for AI SDK 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 (sk-clm-YOUR_API_KEY). One key unlocks all 49+ OpenAI, Anthropic, Google, and DeepSeek models at up to 70% off official API rates.
Base URL (OpenAI-compatible)
https://api.cheapllm.app/v12. Install packages
Terminal
npm install ai @ai-sdk/openai-compatible3. Create the provider
ai.ts
import { createOpenAICompatible } from "@ai-sdk/openai-compatible";
import { generateText } from "ai";
const cheapllm = createOpenAICompatible({
name: "cheapllm",
baseURL: "https://api.cheapllm.app/v1",
apiKey: "sk-clm-YOUR_API_KEY",
});
const { text } = await generateText({
model: cheapllm("claude-opus-5-5"),
prompt: "Write a Vitest suite",
});Top models to run in AI SDK
All 49+ 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% |