How to configure CheapAI in your favorite AI agent 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
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
Cursor Settings → Models → Add Model:
https://cheapai.space/v1cheapai-chatSettings → API Provider:
https://cheapai.space/v1cheapai-chatAdd to ~/.continue/config.json:
{
"models": [{
"title": "CheapAI Chat",
"provider": "openai",
"model": "cheapai-chat",
"apiKey": "sk-your-key-here",
"apiBase": "https://cheapai.space/v1"
}]
}
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)
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);
CheapAI is fully OpenAI-compatible. Any tool that supports custom OpenAI endpoints works. You always need three things:
sk-your-key-herehttps://cheapai.space/v1cheapai-chat (or cheapai-flash, cheapai-pro)