CheapAI

Agent Setup Guide

How to configure CheapAI in your favorite AI agent tools.

Universal Method (All Tools)

Most AI tools use the OpenAI SDK internally. Setting these environment variables redirects all OpenAI requests to CheapAI.

export OPENAI_API_KEY="sk-your-key-here"
export OPENAI_BASE_URL="https://cheapai.space/v1"

Available models: cheapai-chat cheapai-flash cheapai-pro

Legacy aliases that also work: gpt-4o gpt-4o-mini claude-3-opus

Windows: use setx instead of export

Tool-Specific Guides

H

Hermes Agent

Add to ~/.hermes/config.yaml:

custom_providers:
  - name: cheapai
    base_url: https://cheapai.space/v1
    api_key: sk-your-key-here
    api_mode: chat_completions
    models:
      cheapai-chat:
        name: CheapAI Chat
      cheapai-flash:
        name: CheapAI Flash
      cheapai-pro:
        name: CheapAI Pro
    model: cheapai-chat

Then set model via hermes model cheapai-chat --provider cheapai

C

Cursor

Cursor Settings → Models → Add Model:

1. Provider: Select OpenAI
2. API Key: Paste your CheapAI key
3. Base URL: https://cheapai.space/v1
4. Model name: cheapai-chat
R

Cline / Roo Code (VS Code)

Settings → API Provider:

1. API Provider: OpenAI Compatible
2. Base URL: https://cheapai.space/v1
3. API Key: Paste your CheapAI key
4. Model ID: cheapai-chat
D

Continue (VS Code / JetBrains)

Add to ~/.continue/config.json:

{
  "models": [{
    "title": "CheapAI Chat",
    "provider": "openai",
    "model": "cheapai-chat",
    "apiKey": "sk-your-key-here",
    "apiBase": "https://cheapai.space/v1"
  }]
}
P

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="sk-your-key-here",
    base_url="https://cheapai.space/v1"
)

response = client.chat.completions.create(
    model="cheapai-chat",  # or cheapai-flash, cheapai-pro
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

Node.js / TypeScript

import OpenAI from 'openai';

const client = new OpenAI({
    apiKey: 'sk-your-key-here',
    baseURL: 'https://cheapai.space/v1'
});

const response = await client.chat.completions.create({
    model: 'cheapai-chat',
    messages: [{ role: 'user', content: 'Hello!' }]
});
console.log(response.choices[0].message.content);

Any OpenAI-Compatible Tool

CheapAI is fully OpenAI-compatible. Any tool that supports custom OpenAI endpoints works. You always need three things:

API Key: sk-your-key-here
Base URL: https://cheapai.space/v1
Model: cheapai-chat (or cheapai-flash, cheapai-pro)
Home · Pricing · Dashboard · Tutorial