API Documentation

CheapAI gives you OpenAI-compatible access to Claude, GPT-5, Gemini, and DeepSeek at up to 65% off official list prices. Same endpoints, real models, lower cost.

Connect Any App in 3 Steps

Works with any app that supports OpenAI or OpenAI Compatible connection. Just 3 simple changes:

1

Change Base URL

Set your base URL to:

https://cheapai-netifly-app.up.railway.app
2

Add Your API Key

Use the API key and base URL from your completed delivery flow:

Pricing and activation flow →
3

Choose a Model

Pick from our available models:

Browse Models →

Popular: openai/gpt-5.4, anthropic/claude-sonnet-4-6-20260217, google/gemini-3-pro-preview

✅ That's it! You're ready to go.

If the app has an "OpenAI" or "OpenAI Compatible" option, just switch the base URL and use your API key. No other changes needed.

Example: Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    base_url="https://cheapai-netifly-app.up.railway.app",  # ← Change this
    api_key="your-api-key-here"               # ← Your API key
)

response = client.chat.completions.create(
    model="openai/gpt-5.4",  # ← Any model from /models
    messages=[{"role": "user", "content": "Hello!"}]
)

Example: cURL

curl https://cheapai-netifly-app.up.railway.app/chat/completions \
  -H "Authorization: Bearer your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/gpt-5.4", "messages": [{"role": "user", "content": "Hello!"}]}'

🔧 Advanced Configuration

Detailed API reference and tool-specific integration guides below.

🚀 Quick Start

Our API is 100% OpenAI-compatible. Just change the base URL and you're ready.

Three Things You Need

Base URL https://cheapai-netifly-app.up.railway.app
API Key Get yours at Pricing
Models Browse available models

30-Second Setup

# Install: pip install openai
from openai import OpenAI

client = OpenAI(
    api_key="your-api-key-here",
    base_url="https://cheapai-netifly-app.up.railway.app"
)

response = client.chat.completions.create(
    model="openai/gpt-5.4",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)

🔑 Authentication

Get Your API Key

  1. Visit Pricing
  2. Complete the purchase flow and wait for payment confirmation
  3. Use the API key and base URL delivered by email. If your product includes a separate dashboard activation step, follow the instructions in that delivery message.

Using Your API Key

Include your API key in the Authorization header as a Bearer token:

curl https://cheapai-netifly-app.up.railway.app/chat/completions \
  -H "Authorization: Bearer your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{"model": "openai/gpt-5.4", "messages": [{"role": "user", "content": "Hello!"}]}'

🌐 Base URL

All API requests should be made to:

https://cheapai-netifly-app.up.railway.app

Endpoints

POST /chat/completions Create chat completions
GET /models List available models
POST /embeddings Create embeddings

📋 Available Models

Browse all models at CheapAI Models directory — Claude, GPT-5, Gemini, and DeepSeek available via one OpenAI-compatible endpoint.

Model Catalog

Model ID Provider Context Input Output Savings
openai/gpt-5.4OpenAISee docs$2.50/1M$15.00/1M50%-65%
openai/gpt-5.3-codexOpenAISee docs$1.75/1M$14.00/1M50%-65%
openai/gpt-5.2-codexOpenAISee docs$1.75/1M$14.00/1M50%-65%
openai/gpt-5.2OpenAISee docs$1.75/1M$14.00/1M50%-65%
anthropic/claude-sonnet-4-6-20260217AnthropicSee docs$3.00/1M$15.00/1M50%-65%
anthropic/claude-opus-4-6-20260205AnthropicSee docs$5.00/1M$25.00/1M50%-65%
anthropic/claude-opus-4-5-20251101AnthropicSee docs$5.00/1M$25.00/1M50%-65%
anthropic/claude-haiku-4-5-20251001AnthropicSee docs$1.00/1M$5.00/1M50%-65%
deepseek/deepseek-v3.2DeepSeekSee docs$0.28/1M$0.42/1M50%-65%
google/gemini-3-pro-previewGoogleSee docs$2.00/1M$12.00/1M50%-65%
google/gemini-3-flash-previewGoogleSee docs$0.50/1M$3.00/1M50%-65%

Model Aliases

Use short names for convenience:

Model Full Model ID
openai/gpt-5.4openai/gpt-5.4
openai/gpt-5.3-codexopenai/gpt-5.3-codex
openai/gpt-5.2-codexopenai/gpt-5.2-codex
openai/gpt-5.2openai/gpt-5.2
anthropic/claude-sonnet-4-6-20260217anthropic/claude-sonnet-4-6-20260217
anthropic/claude-opus-4-6-20260205anthropic/claude-opus-4-6-20260205
anthropic/claude-opus-4-5-20251101anthropic/claude-opus-4-5-20251101
anthropic/claude-haiku-4-5-20251001anthropic/claude-haiku-4-5-20251001
deepseek/deepseek-v3.2deepseek/deepseek-v3.2
google/gemini-3-pro-previewgoogle/gemini-3-pro-preview
google/gemini-3-flash-previewgoogle/gemini-3-flash-preview

List Models via API

curl https://cheapai-netifly-app.up.railway.app/models \
  -H "Authorization: Bearer your-api-key-here"

📖 Chat Completions

POST /v1/chat/completions

Request Body

{
  "model": "openai/gpt-5.4",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Hello!"}
  ],
  "temperature": 0.7,
  "max_tokens": 4096,
  "stream": false
}

Parameters

Parameter Type Required Description
model string Yes Model ID to use
messages array Yes Conversation messages
temperature number No Sampling temperature (0-2)
max_tokens integer No Maximum tokens to generate
stream boolean No Enable streaming responses
top_p number No Nucleus sampling parameter
stop array No Stop sequences

Response

{
  "id": "chatcmpl-xxx",
  "object": "chat.completion",
  "created": 1234567890,
  "model": "openai/gpt-5.4",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 20,
    "total_tokens": 30
  }
}

Streaming Responses

Enable streaming by setting stream: true:

response = client.chat.completions.create(
    model="openai/gpt-5.4",
    messages=[{"role": "user", "content": "Write a poem"}],
    stream=True
)

for chunk in response:
    if chunk.choices[0].delta.content:
        print(chunk.choices[0].delta.content, end="")

🔌 Integrations

Our API works with any tool that supports OpenAI-compatible endpoints.

💻 Claude Code

Anthropic's official CLI tool. Use claude-code-router to connect it to CheapAI for access to Claude at up to 65% off Anthropic's official API pricing. See the Claude Code setup guide for the full walkthrough.

Powered by: This integration uses claude-code-router by musistudio. If you encounter any issues, check their Issues section.

Step 1: Install Claude Code & Router

npm install -g @anthropic-ai/claude-code
npm install -g @musistudio/claude-code-router

Step 2: Create Config File

Create the config file at:

  • Windows: C:\Users\YOUR_NAME\.claude-code-router\config.json
  • Mac/Linux: ~/.claude-code-router/config.json
{
  "Providers": [{
    "name": "CheapAI",
    "api_base_url": "https://cheapai-netifly-app.up.railway.app/chat/completions",
    "api_key": "YOUR_API_KEY",
    "models": ["openai/gpt-5.4", "openai/gpt-5.3-codex", "anthropic/claude-sonnet-4-6-20260217", "google/gemini-3-pro-preview", "deepseek/deepseek-v3.2"]
  }],
  "Router": {
    "default": "CheapAI,openai/gpt-5.4",
    "background": "CheapAI,deepseek/deepseek-v3.2",
    "think": "CheapAI,anthropic/claude-opus-4-6-20260205",
    "longContext": "CheapAI,google/gemini-3-pro-preview",
    "longContextThreshold": 60000
  }
}

Step 3: Start Coding

ccr code

Useful Commands

ccr code Start Claude Code with router
ccr start Start router server in background
ccr stop Stop router server
ccr model Switch model interactively
ccr ui Open web UI for config management
ccr restart Restart router (after config changes)

Model Switching

Switch models on-the-fly in Claude Code:

/model CheapAI,anthropic/claude-opus-4-6-20260205

Router Config Options

default Default model for general tasks
background Model for background tasks (cost-saving)
think Model for reasoning-heavy tasks (Plan Mode)
longContext Model for long contexts (>60K tokens)
webSearch Model for web search tasks

Tip: After modifying the config file, run ccr restart for changes to take effect.

🤖 Codex CLI

OpenAI's Codex CLI supports custom providers through environment variables.

Installation

npm install -g @openai/codex

Configuration

Mac/Linux:

export CheapAI_API_KEY="your-api-key-here"
export CheapAI_BASE_URL="https://cheapai-netifly-app.up.railway.app"

Windows (PowerShell):

$env:CheapAI_API_KEY="your-api-key-here"
$env:CheapAI_BASE_URL="https://cheapai-netifly-app.up.railway.app"

Run

codex --provider CheapAI "your prompt here"

🦘 Roo Code

VSCode extension for AI-assisted coding.

Installation

  1. Open VSCode
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Roo Code"
  4. Click Install

Configuration

  1. Open Roo Code in VSCode
  2. Click Configure Provider
  3. Add an OpenAI Compatible provider
  4. Enter settings:
OpenAI Base URL https://cheapai-netifly-app.up.railway.app
API Key Your API key
Model openai/gpt-5.4 or any model

⚡ Kilo Code

Powerful VSCode extension for AI coding.

Installation

  1. Open VSCode
  2. Go to Extensions (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "Kilo Code"
  4. Click Install

Configuration

Same as Roo Code - add an OpenAI Compatible provider with:

OpenAI Base URL https://cheapai-netifly-app.up.railway.app
API Key Your API key
Model openai/gpt-5.4

🤖 Droid CLI

Terminal-based AI coding assistant from Factory AI.

Installation

macOS/Linux:

curl -fsSL https://app.factory.ai/cli | sh

Windows:

irm https://app.factory.ai/cli | iex

Configuration

Edit ~/.factory/config.json:

{
    "custom_models": [
        {
            "model_display_name": "CheapAI-gpt5",
            "model": "openai/gpt-5.4",
            "base_url": "https://cheapai-netifly-app.up.railway.app",
            "api_key": "YOUR_API_KEY",
            "provider": "generic-chat-completion-api",
            "max_tokens": 128000
        }
    ]
}

🦞 OpenClaw

AI agent framework supporting Telegram, Discord, and more.

Download

openclaw.ai

Configuration

Config file location:

  • Windows: C:\Users\YOUR_NAME\.openclaw\openclaw.json
  • Mac/Linux: ~/.openclaw/openclaw.json
{
  "models": {
    "providers": {
      "custom": {
        "baseUrl": "https://cheapai-netifly-app.up.railway.app",
        "apiKey": "YOUR_API_KEY",
        "api": "openai-completions",
        "models": [
          {
            "id": "openai/gpt-5.4",
            "name": "GPT-5",
            "contextWindow": 400000,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "custom/openai/gpt-5.4" }
    }
  }
}

🔄 n8n

Workflow automation tool that supports OpenAI nodes.

Setup

  1. Open n8n workflow editor
  2. Add an OpenAI or AI Agent node
  3. Configure credentials:
Base URL https://cheapai-netifly-app.up.railway.app
API Key Your API key

💻 Code Examples

Python (OpenAI SDK)

from openai import OpenAI

client = OpenAI(
    api_key="your-api-key-here",
    base_url="https://cheapai-netifly-app.up.railway.app"
)

# Basic completion
response = client.chat.completions.create(
    model="openai/gpt-5.4",
    messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)

# Streaming
for chunk in client.chat.completions.create(
    model="openai/gpt-5.4",
    messages=[{"role": "user", "content": "Write a story"}],
    stream=True
):
    print(chunk.choices[0].delta.content or "", end="")

JavaScript/TypeScript

import OpenAI from 'openai';

const client = new OpenAI({
  apiKey: 'your-api-key-here',
  baseURL: 'https://cheapai-netifly-app.up.railway.app',
});

const response = await client.chat.completions.create({
  model: 'openai/gpt-5.4',
  messages: [{ role: 'user', content: 'Hello!' }],
});

console.log(response.choices[0].message.content);

cURL

curl https://cheapai-netifly-app.up.railway.app/chat/completions \
  -H "Authorization: Bearer your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

LangChain (Python)

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(
    model="openai/gpt-5.4",
    openai_api_key="your-api-key-here",
    openai_api_base="https://cheapai-netifly-app.up.railway.app"
)

response = llm.invoke("Hello!")
print(response.content)

💰 Pricing

Pay as you go - no monthly fees, no minimum spend.

Compare and Save

Model Official Input Our Input Official Output Our Output Savings
GPT 5.4 (openai/gpt-5.4)$2.50/1M$1.25/1M$15.00/1M$7.50/1M50%
GPT 5.3 Codex (openai/gpt-5.3-codex)$1.75/1M$0.88/1M$14.00/1M$7.00/1M50%
GPT 5.2 Codex (openai/gpt-5.2-codex)$1.75/1M$0.88/1M$14.00/1M$7.00/1M50%
GPT 5.2 (openai/gpt-5.2)$1.75/1M$0.88/1M$14.00/1M$7.00/1M50%
Claude Sonnet 4.6 (anthropic/claude-sonnet-4-6-20260217)$3.00/1M$1.50/1M$15.00/1M$7.50/1M50%
Claude Opus 4.6 (anthropic/claude-opus-4-6-20260205)$5.00/1M$2.50/1M$25.00/1M$12.50/1M50%
Claude Opus 4.5 (anthropic/claude-opus-4-5-20251101)$5.00/1M$2.50/1M$25.00/1M$12.50/1M50%
Claude Haiku 4.5 (anthropic/claude-haiku-4-5-20251001)$1.00/1M$0.50/1M$5.00/1M$2.50/1M50%
DeepSeek V3.2 (deepseek/deepseek-v3.2)$0.28/1M$0.14/1M$0.42/1M$0.21/1M50%
Gemini 3 Pro (google/gemini-3-pro-preview)$2.00/1M$1.00/1M$12.00/1M$6.00/1M50%
Gemini 3 Flash (google/gemini-3-flash-preview)$0.50/1M$0.25/1M$3.00/1M$1.50/1M50%

Need pricing details first? Start from Pricing and choose the product that matches your workflow.

FAQ

General Questions

Q: Is this API really OpenAI-compatible?

Yes! Our API uses the exact same request/response format as OpenAI. Any code or tool that works with OpenAI will work with CheapAI.

Q: How does CheapAI offer up to 65% off official AI API prices?

CheapAI aggregates usage across many developers and teams, purchasing API access at volume. The savings from bulk purchasing are passed directly to customers. You access the same real models through our OpenAI-compatible proxy — no code changes needed beyond the base URL.

Q: Is there a rate limit?

The service is designed for real developer workloads, but infrastructure protections and fair-use controls may still apply when needed for stability or abuse prevention.

Q: Do you store my data?

We aim to minimize retained data. Temporary technical processing or short-lived optimization layers may be used where needed for delivery, stability, or abuse prevention, and you should avoid placing real API keys in committed project files.

Which tool should I use?

  • Claude Code - Best for terminal-based coding
  • Roo Code / Kilo Code - Best for VSCode users
  • Codex CLI - Best for OpenAI ecosystem
  • Droid CLI - Best for Factory AI users
  • OpenClaw - Best for multi-channel AI agents
  • n8n - Best for workflow automation

Which model should I use?

  • openai/gpt-5.4 - Best general-purpose OpenAI default
  • anthropic/claude-opus-4-6-20260205 - Highest-end Claude reasoning
  • anthropic/claude-sonnet-4-6-20260217 - Fast daily Claude default
  • google/gemini-3-pro-preview - Long-context premium option
  • deepseek/deepseek-v3.2 - Code generation

🆘 Support

Website CheapAI.com
Pricing & delivery Pricing
Models cheap AI Models
Contact Telegram Support

🚀 Start Here

  1. Choose the matching plan at Pricing
  2. Set your base URL to https://cheapai-netifly-app.up.railway.app
  3. Start making requests!
View pricing

🖥️ Welcome to the Claude Code Installation Guide

Last updated: 01 08

Welcome! This guide will help you set up Claude Code with your CheapAI Claude Pack subscription — giving you access to advanced Claude 4 series models at 50% off official pricing.


✨ What is Claude Code?

Claude Code is Anthropic's official agentic coding tool that runs directly in your terminal. It understands your codebase, reads files, writes code, runs commands and helps you build faster. With CheapAI's Claude Pack, you get access using your own API key at 50% the official price.

  • Runs in your terminal — no browser required
  • Reads and modifies your project files directly
  • Executes shell commands, runs tests, git operations
  • Supports VS Code, Cursor, JetBrains IDE integration
  • Works on Windows, macOS, and Linux

🖥️ Installation Guides

Choose your platform:

☐ Windows Installation

LanguageGuide LinkStatus
🇬🇧 English Installation Windows (English) ✅ Ready

🍎 / 🐧 macOS / Linux Installation

LanguageGuide LinkStatus
🇬🇧 English Claude Code Installation Guide for macOS/Linux ✅ Ready

Error 400

Solution: Add the environment variable:

Codeblock
1CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1

After configuration, close all terminals and reopen them.


🎯 Quick Start

Get started in 3 simple steps:

Step 1: Install Node.js

Download from nodejs.org — version 22 or higher required.

Step 2: Install Claude Code

Codeblock
1npm install -g @anthropic-ai/claude-code

Step 3: Configure and Run

Codeblock
1# Set environment variables (see platform-specific guides)
2# Then run:
3claude

🧩 VSCode, Cursor IDE Integration

Seamless integration:

First Install All Environments, Then Install:

  • Visual Studio Code
  1. Open Cursor
  2. Press Ctrl + Shift + X (open extensions)
  3. In search, type Claude Code for VSCode
  4. Click Install
  • JetBrains IDEs, Cursor
  • Command Line Interface

Configuration

Create a local-only .claude/config.json file in your project root only if that folder is ignored by git. Otherwise use a user-level config path instead:

Codeblock
1{
2    "primaryApiKey": "sk-your-key"
3}

Never commit real API keys or provider configs into a project repository. Keep them in ignored local files or user-level config directories.

Slash Commands

CommandDescription
/helpGet help with Claude Code
/compactCompress context to save tokens
/clearClear command history
/initCreate CLAUDE.md memory file
/ideCheck IDE connection

Common Problems

> Command not found

  • Restart terminal after installation
  • Check Node.js installation: node --version

> API key issues

  • Verify environment variables are set correctly
  • Check API key format (starts with sk-)

> Connection errors

  • Check internet connection
  • Verify ANTHROPIC_BASE_URL configuration

Get Help

  • 📋 Official Documentation
  • 🤝 Report issues: Claude_Code-Troubleshooting.md
  • 💬 Community Discussions — @cheapai1sell on Telegram

🔒 Security Best Practices

⚠️ Important Security Recommendations:

  • Never share your API key (sk-...)
  • Never commit API keys to version control
  • Use .gitignore to exclude sensitive files
  • Keep backups of your code
  • Rotate keys regularly

📂 Project Organization

💡 File Structure Best Practices:

Codeblock
1project/
2├── src/         # Source code
3├── tests/       # Test files
4├── docs/        # Documentation
5├── config/      # Configuration files
6├── scripts/     # Utilities and scripts
7└── examples/    # Code examples

Rule: Never save working files in the root folder!


🎓 Learning Resources


🤝 Support and Community

Need Help?

Contact our support team on Telegram for fast, personal assistance:

@cheapai1sell on Telegram


💬 Feedback

Have suggestions or found an issue with these docs? Let us know!

Send Feedback on Telegram

🪟 Windows Installation Guide

Complete step-by-step guide to install Claude Code on Windows.

Prerequisites

  • Windows 10 or Windows 11
  • Administrator access (for installing software)
  • Internet connection

Step 1: Install Node.js

1

Download Node.js v22+

Go to nodejs.org → Click "Current" or "LTS v22+" → Run the installer

2

Important

During install: ✅ Check "Add to PATH" option. After install, restart your computer.

3

Verify Installation

Open Command Prompt and run:

Codeblock
1node --version
2npm --version

Step 2: Install Git Bash (Recommended)

Git Bash provides a Unix-like terminal on Windows. Download from git-scm.com

Step 3: Install Claude Code

Open Git Bash or PowerShell as Administrator and run:

Codeblock
1npm install -g @anthropic-ai/claude-code
2claude --version

Step 4: Set Environment Variables

Press Win+R → type sysdm.cpl → Advanced tab → Environment Variables → System variables → New:

Variable NameValue
ANTHROPIC_API_KEYYour CheapAI API key
ANTHROPIC_BASE_URLhttps://cheapai-netifly-app.up.railway.app
CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS1
⚠️

Important: Always set CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 to prevent Error 400!

Step 5: Start Claude Code

Codeblock
1# Navigate to your project folder
2cd C:\Users\YourName\YourProject
3# Start Claude Code
4claude

🍎🐧 macOS / Linux Installation Guide

Complete step-by-step guide to install Claude Code on macOS or Linux.

Step 1: Install Node.js v22+

macOS (using Homebrew):

Codeblock
1brew install node@22
2echo 'export PATH="/usr/local/opt/node@22/bin:$PATH"' >> ~/.zshrc
3source ~/.zshrc

Ubuntu / Debian Linux:

Codeblock
1curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
2sudo apt-get install -y nodejs

Arch Linux:

Codeblock
1sudo pacman -S nodejs npm

Step 2: Install Claude Code

Codeblock
1npm install -g @anthropic-ai/claude-code
2claude --version

Step 3: Set Environment Variables

Add to your ~/.zshrc (macOS) or ~/.bashrc (Linux):

Codeblock
1export ANTHROPIC_API_KEY='your_cheapai_api_key'
2export ANTHROPIC_BASE_URL='https://cheapai-netifly-app.up.railway.app'
3export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1

Then apply:

Codeblock
1source ~/.zshrc   # or source ~/.bashrc

Step 4: Start Claude Code

Codeblock
1cd /path/to/your/project
2claude

Optional: Set via Terminal (Temporary)

Codeblock
1ANTHROPIC_API_KEY=your_key ANTHROPIC_BASE_URL=https://cheapai-netifly-app.up.railway.app CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 claude

🆘 Troubleshooting Guide

Solutions to the most common Claude Code issues.

Error 400

⚠️

Cause: Missing or wrong environment variable.

Fix: Set this variable before running claude:

Windows (PowerShell)
1$env:CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS = "1"
macOS / Linux (Bash)
1export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1

Error 401 — Unauthorized

  • Check your ANTHROPIC_API_KEY is set correctly
  • Make sure ANTHROPIC_BASE_URL is set to https://cheapai-netifly-app.up.railway.app
  • Verify the API key against the delivery email or activation instructions that belong to your purchased product

Error 413 — Request Too Large

  • Use /compact to compress the context
  • Remove large files from the context
  • Start a fresh session with /clear

Response Exceeded 32,000 Tokens

You may have hit your subscription tier limit. Contact @cheapai1sell on Telegram to check your quota.

Error 500 — Server Error

  • Wait a few seconds and try again
  • If persistent, contact support on Telegram

Command not found: claude

  • Restart your terminal
  • Check npm global path: npm root -g
  • Re-run: npm install -g @anthropic-ai/claude-code

Reset Configuration

OSCommand
Windowsdel %USERPROFILE%\.claude-code
macOS/Linuxrm -rf ~/.claude-code

Still Having Issues?

Contact CheapAI Support

Our team responds fast on Telegram. Share your error message and we'll help you fix it.

@cheapai1sell on Telegram

💰 Quota Limits and Pricing

Claude Pack uses a quota system. You get all models at 50% off the official Anthropic pricing.

Model Quota Cost per Request

ModelQuota per RequestToken Doubling (>125k tokens)
Claude Opus 4.53060
Claude Sonnet 4 / 4.52040
Claude Haiku 4.5510
⚠️

Token Doubling Rule: If your total request tokens exceed 125,000, the quota cost is doubled.

Daily Quota by Tier

TierDaily QuotaHourly BonusDaily Reset
VIP~5,500+100/hr16:00 UTC
Plus~7,500+100/hr16:00 UTC
SVIP~12,000+200/hr16:00 UTC
Ultra~16,000+200/hr16:00 UTC

Pricing — 50% Off Official

ModelOfficial Input / 1MCheapAI Input / 1MOfficial Output / 1MCheapAI Output / 1M
Claude Opus 4.5$15.00$7.50$75.00$37.50
Claude Sonnet 4.5$3.00$1.50$15.00$7.50
Claude Haiku 4.5$0.80$0.40$4.00$2.00

🎯 CheapAI Claude Pack = 50% Off Official Anthropic Pricing

All prices listed are exactly half of the official Anthropic API prices. No hidden fees, no markup.

View All Plans →

CheapAI + Codex CLI: Setup and Debugging

Getting your API Key and Base URL:

  1. Start from Pricing and complete your order.
  2. Wait for the delivery email or activation instructions that belong to your purchased product.
  3. Use the API key and base URL from that delivery flow. If your product includes the separate dashboard origin, treat it as a distinct service boundary and follow only the instructions sent for your order.

📦 1) Required Installations

To work with Claude Code and the CheapAI Codex setup, you will need:

  • Node.js (version 18 or higher recommended).
  • Git (mandatory for Claude Code functionality).

🔧 2) Manual Installation (if automatic failed)

If the standard command npm install -g @anthropic-ai/claude-code throws an error, follow the instructions for manual configuration via .npmrc (details depend on your OS).

3) Verify Installation

After installation, check the version with the following command:

claude --version

⚙️ 4) API Setup (Windows and macOS)

To correctly route requests to our servers:

  • Windows: Edit C:\Users\<YourUser>\.claude\config.toml
  • macOS/Linux: Edit ~/.claude/config.toml

Configuration Example:

[api]
base_url = "https://cheapai-netifly-app.up.railway.app/v1"
api_key = "your_api_key_here"

Use a local user config path and a placeholder while editing. Never paste a real API key into files you intend to commit or share.

💻 5) Codex Extension for VS Code

  1. Install the Claude Dev or Cline extension.
  2. In the extension settings, specify the following:
    • Base URL: https://cheapai-netifly-app.up.railway.app/v1
    • API Key: Your provided key.
    • Model: gpt-5.3-codex

Example chatgpt.config block:

{
  "preferred_auth_method": "apikey",
  "model": "gpt-5.3-codex",
  "model_reasoning_effort": "high",
  "wire_api": "responses"
}

Note: You must restart VS Code after applying configuration changes.

🖱️ 6) Codex Extension for Cursor

Install the official extension, add the identical configuration block shown above into your local settings.json, and fully restart the Cursor IDE. Do not place real keys in shared workspace settings that might be committed.

⌨️ 7) Useful CLI Commands

  • codex --ask-for-approval never --sandbox danger-full-access — Advanced local-only mode. Use it only when you fully trust the workspace, understand the risks, and do not expose real credentials in project files.
  • /init — Create the AGENTS.md file.
  • /status — Display session configuration and remaining tokens.
  • /diff — Show changes inside git.
  • /model — Switch the active model and reasoning effort.
  • /approvals — Toggle the approval mode.
  • codex --resume or codex --continue — Restore an interrupted session.

🚭 8) Common Errors and Solutions

  • 401 on first launch: Check your config.toml file. Ensure there are no extra trailing spaces inside your API key string, and completely restart your terminal.
  • 401 after working previously: Your quota might be exhausted. Check your usage and consider a top-up via the CheapAI pricing page.
  • streamerror: Extended reasoning time or an unstable network connection. Please try running the request again.
  • Unable to persist auth file (os error 3): Ensure there are no lingering extra .codex folders. Delete them and recreate the files.
  • stream error: error sending request for url: Verify that your base_url is correct and check your internet connection stability.
  • VS Code «error start conversation»: This is a known issue within the extension itself; please wait for an official extension update.