Skip to content
CheaperAPI

Setup guides

It is the same everywhere: set our address and paste your key. Ready-made settings for popular tools below.

Before you start

  1. 1Top up your balance (from $10).
  2. 2In your dashboard, open API keys and create a key. Copy it right away.
  3. 3Pick your tool below.

Address for Anthropic tools (Claude Code): https://api.llmforless.com. Address for OpenAI tools: https://api.llmforless.com/v1.

Claude Code

The simplest way: put two variables in Claude Code's settings file. Works in the terminal and the VS Code extension.

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.llmforless.com",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-key"
  }
}

Or just for one terminal session:

export ANTHROPIC_BASE_URL="https://api.llmforless.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-key"
claude

Want to pin specific models? Add to the same env block:

"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"

If you see a 400 error about unknown fields, also add CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1.

Codex CLI

Add a provider to Codex's config file (in your home folder, not the project):

~/.codex/config.toml
model = "gpt-6.1-sol"
model_provider = "cheaperapi"

[model_providers.cheaperapi]
name = "CheaperAPI"
base_url = "https://api.llmforless.com/v1"
env_key = "CHEAPERAPI_API_KEY"
wire_api = "responses"

Then set the key in your terminal:

export CHEAPERAPI_API_KEY="sk-your-key"
codex

Cline

  1. 1Cline settings → API Provider: Anthropic.
  2. 2Tick “Use custom base URL” and enter: https://api.llmforless.com
  3. 3Paste your sk-… key into the key field.
  4. 4Pick a model, e.g. claude-sonnet-5-5.

OpenCode

In OpenCode's config file, set the Anthropic provider address:

opencode.jsonc
{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "anthropic": {
      "settings": { "baseURL": "https://api.llmforless.com/v1" }
    }
  }
}

Add the key in OpenCode with the /connect command (Anthropic provider), pasting your sk-… key.

Your own code (SDK)

Python, OpenAI library (works for every model):

from openai import OpenAI

client = OpenAI(base_url="https://api.llmforless.com/v1", api_key="sk-your-key")
reply = client.chat.completions.create(
    model="claude-sonnet-5-5",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(reply.choices[0].message.content)

TypeScript, official Anthropic SDK (Claude models):

import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic({ baseURL: "https://api.llmforless.com", apiKey: "sk-your-key" });
const msg = await client.messages.create({
  model: "claude-sonnet-5-5",
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello!" }],
});

When something does not work

  1. 1401: the key is wrong, disabled or deleted. Check it in your dashboard (API keys).
  2. 2403 or a balance message: your balance or the key's limit ran out. Top up or raise the limit.
  3. 3404 / 503 “model not found”: check the exact model name on the Models page.
  4. 4Long answers get cut: use streaming (Claude Code does this by itself).
  5. 5Every request, failed ones too, is in your dashboard's Request log.