Yes: APIClaw ($19–$129/mo flat, 500–8,000 requests/day) is one, and it fits developers who run Claude Code most of the day and would rather pay a fixed monthly price than watch a per-token meter. Other routes can be cheaper for lighter use, and some "cheap" endpoints simply don't work with Claude Code at all. This post is about telling those apart before you spend anything.
One setup detail first, because it's the most common mistake: Claude Code takes https://apiclaw.biz› as its base URL (no/v1›), while OpenAI SDKs and OpenAI-compatible tools take https://apiclaw.biz/v1›. Claude Code adds/v1/messages› itself, so a base URL ending in /v1› turns into/v1/v1/messages› and every request 404s.
Why a cheap endpoint can still be useless for Claude Code
Claude Code doesn't just send chat messages. A normal session mixes three kinds of request to `/v1/messages›:
- Plain replies, for short internal tasks.
-
Streamed replies, which is how you see output appear in the terminal. Claude Code expects Anthropic's server-sent events:
message_start›, a run ofcontent_block_delta›, then `message_stop›. -
Tool calls, which is how it reads files, runs commands and edits code. The response has to come back with
stop_reason: "tool_use"› and atool_use› block whose `input› matches the tool's schema.
A proxy that only translates plain chat will pass a quick curl test and then break the moment Claude Code tries to open a file. That's the failure I see most often with cheap endpoints, so it's worth checking before price.
The options, checked Oct 31, 2026
| Option | How you pay | What limits you |
|---|---|---|
| Claude Pro | $20/mo monthly, or $17/mo billed annually | Usage limits every 5 hours and every week |
| Claude Max | $100/mo | 5x Pro usage every 5 hours and every week; includes $100/mo in API credits |
| Claude Ultra | $200/mo | No 5-hour limit for verified accounts, 10x Pro usage per week; $200/mo in API credits |
| Anthropic API | Per token: Sonnet 5.5 $2 in / $10 out, Opus 5.5 $4 / $20 per million tokens | Your spend; 50% off with batch processing |
| OpenRouter | Provider list price, plus a 5.5% fee when you buy credits (8% on Business) | Your credits |
| Requesty | Model cost plus 5% | Your spend; free tier 200 requests/day on free models |
| APIClaw | $19–$129/mo flat | Daily request quota, 500–8,000 depending on plan |
APIClaw's plans: Plus $19 (500 requests/day), Pro $39 (1,000), Max $59 (1,500), Ultimate $69 (3,000), Ultimate Plus $89 (4,000), Ultimate Pro $99 (6,000), Ultimate Max $129 (8,000), plus a free 50-request trial. Every model call counts as one request, with no per-token metering. Payment is crypto on site (card on request via support).
If you want to price your own usage against these numbers, the LLM API cost calculator takes requests per day and average tokens and compares per-token and flat plans.
The three-request probe
This script sends one request of each kind to whatever `ANTHROPIC_BASE_URL› points at, using the same environment variables Claude Code reads. Standard library only, so it runs anywhere Python 3 does.
#!/usr/bin/env python3
"""Check whether an API can serve Claude Code before you pay for it.
Sends the three kinds of /v1/messages traffic Claude Code produces:
a plain reply, a streamed reply, and a tool call. Stdlib only."""
import json, os, sys, time, urllib.request, urllib.error
BASE = os.environ["ANTHROPIC_BASE_URL"].rstrip("/") # no /v1 here
KEY = os.environ["ANTHROPIC_AUTH_TOKEN"]
MODEL = sys.argv[1] if len(sys.argv) > 1 else "apiclaw/claude-sonnet-5.5"
def post(body):
req = urllib.request.Request(
BASE + "/v1/messages", data=json.dumps(body).encode(), method="POST",
headers={"Authorization": "Bearer " + KEY, "x-api-key": KEY,
"anthropic-version": "2023-06-01",
"content-type": "application/json"})
return urllib.request.urlopen(req, timeout=120)
def plain():
r = json.load(post({"model": MODEL, "max_tokens": 64,
"messages": [{"role": "user", "content": "Reply with the word ok."}]}))
return r.get("type") == "message" and r["content"][0]["type"] == "text"
def streamed():
seen = set()
with post({"model": MODEL, "max_tokens": 64, "stream": True,
"messages": [{"role": "user", "content": "Count to three."}]}) as r:
for line in r:
line = line.decode().strip()
if line.startswith("event:"):
seen.add(line.split(":", 1)[1].strip())
need = {"message_start", "content_block_delta", "message_stop"}
return need <= seen
def tool_call():
tool = {"name": "read_file", "description": "Read a file from disk",
"input_schema": {"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"]}}
r = json.load(post({"model": MODEL, "max_tokens": 256, "tools": [tool],
"messages": [{"role": "user", "content": "Open README.md with read_file."}]}))
blocks = [b for b in r["content"] if b["type"] == "tool_use"]
return r.get("stop_reason") == "tool_use" and blocks and "path" in blocks[0]["input"]
ok = True
for name, check in [("plain reply", plain), ("streaming", streamed), ("tool call", tool_call)]:
t = time.time()
try:
passed = bool(check())
except urllib.error.HTTPError as e:
passed = False
print(f" {name}: HTTP {e.code} {e.read()[:120]!r}")
except Exception as e:
passed = False
print(f" {name}: {type(e).__name__}: {e}")
ok &= passed
print(f"{'PASS' if passed else 'FAIL'} {name:12s} {time.time() - t:5.1f}s")
sys.exit(0 if ok else 1)
Run it with your own key:
export ANTHROPIC_BASE_URL="https://apiclaw.biz"
export ANTHROPIC_AUTH_TOKEN="$APICLAW_KEY"
python3 cc_probe.py apiclaw/claude-sonnet-5.5
python3 cc_probe.py apiclaw/deepseek-v4-pro
I tested the script against two local mock servers: one that implements all three behaviours, and one that drops message_stop› from the stream and rejectstools› with a 400, which is roughly what a chat-only proxy does. The output:
PASS plain reply 0.0s
PASS streaming 0.0s
PASS tool call 0.0s
PASS plain reply 0.0s
FAIL streaming 0.0s
tool call: HTTP 400 b'{"error":"tools not supported"}'
FAIL tool call 0.0s
The second result is the trap: the endpoint answers, the price looks good, and Claude Code would hang or error on its first file read.
Reading the result
- All three pass on every model you plan to use: the endpoint can carry a Claude Code session. Now compare price.
- Streaming fails: Claude Code may hang waiting for `message_stop›. Don't use it, whatever it costs.
- Tool call fails: Claude Code can talk but can't act. Some gateways support tools on Claude models and not on others, so run the probe once per model ID.
- 404 on everything: check the base URL first; the usual cause is a trailing `/v1›.
The timings matter too. Each probe is one request, so the times are a fair first look at latency. If the streaming check takes 20 seconds to count to three, the session will feel slow too.
Once the probe passes, point Claude Code at the same values:
export ANTHROPIC_BASE_URL="https://apiclaw.biz"
export ANTHROPIC_AUTH_TOKEN="$APICLAW_KEY"
export ANTHROPIC_MODEL="apiclaw/claude-sonnet-5.5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="apiclaw/glm-5.3-flash"
claude
On APIClaw that gives you Claude, GPT, Gemini, DeepSeek, Qwen, Kimi, GLM, Mistral, Llama and more behind the same key, so you can rerun the probe against any model before mapping it to a Claude Code role.
When APIClaw isn't the right choice
- You use Claude Code for an hour or two a week. Per-token billing on the Anthropic API, OpenRouter or Requesty will likely cost less than $19.
- You already pay for Claude Pro or Max for chat and the desktop apps, and its Claude Code limits are enough for you. A second subscription adds nothing.
- Your heaviest days go past 8,000 requests. A daily quota will cut you off; per-token billing won't.
- You need contractual SLAs, SSO or audit logs for a company rollout.
FAQ
Is there a cheap API for Claude Code that doesn't bill per token?
Yes. Flat plans such as APIClaw charge a fixed monthly price for a daily request quota instead of metering tokens. Whether that's cheaper depends on how many requests a day you send.
Why does Claude Code fail with a 404 on a new API?
Usually because the base URL includes /v1›. Claude Code appends/v1/messages› itself, so give it the bare host.
Does every tool call count as a request?
Yes. Each model call Claude Code makes is one request, including the tool-use turns in between edits. On a request quota, long agent loops use more of your day than short chats.
Can I check a gateway without paying?
Use its free trial or free tier and run the probe once per model. Three requests per model is a small fraction of any trial.
Disclosure: I build APIClaw. This article was written with AI assistance and checked by me. Prices for other services were read on their public pricing pages on Oct 31, 2026, and may change.
Related reading: Claude Max alternatives for Claude Code API in 2026 and How can I use Claude Code without the weekly limits in 2026?
Top comments (0)