Cheap’ai provides a unified API that gives you access to multiple open sources AI models through a single endpoint, while automatically handling fallbacks and selecting the most cost-effective options. Get started with just a few lines of code using your preferred SDK or framework.

Go to our Dashboard

Go to our dashboard at https://console.buycheap.ai/, sign up and create an API Key.

Using the OpenAI SDK

import OpenAI from 'openai';

const openai = new OpenAI({
  baseURL: 'https://api.buycheap.ai/avocado',
  apiKey: '<API_KEY>'
});

async function main() {
  const completion = await openai.chat.completions.create({
    model: 'deepseek/deepseek-chat-v3-0324',
    messages: [
      {
        role: 'user',
        content: 'Who is Joseph Stalin?',
      },
    ],
  });

  console.log(completion.choices[0].message);
}

main();