NewHow we catch a seller listing the wrong model, and refund you if one does.

The cheapest Claude API (and how to switch in one line)

The cheapest way to use Claude is to stop paying one fixed list price and instead route each request to the cheapest healthy seller for that model. MartLLM does this automatically: you call Claude Opus, Sonnet or Haiku through a single key — with either the OpenAI SDK or the Anthropic SDK (/v1/messages) — and pay the lowest live price, with no fee added to the number you see.

Why "cheapest" depends on the seller, not the model

Claude has a published list price per model, but that is not the only price you can pay for it. On a marketplace, several sellers offer the same Claude model at the same quality and the live price is whatever the cheapest healthy one is charging right now. The job of a gateway is to send each request to that seller for you, every single time, with no change to your code.

That is exactly what MartLLM does. You keep one key and one base URL, and every call to a Claude model is matched to the cheapest healthy seller for it. MartLLM adds no fee to requests, so the number on the live pricing board is the number you pay. A card fee of 5.5% + $0.50 is added only when you add credit, never per request.

Switch in one line

Claude works through both SDKs. With the OpenAI SDK, change only the base URL and key:

from openai import OpenAI

client = OpenAI(
    base_url="https://api.martllm.com/v1",
    api_key="ull_your_key_here",
)

resp = client.chat.completions.create(
    model="anthropic/claude-sonnet-5.5",   # pick any Claude model id from /models
    messages=[{"role": "user", "content": "Hello, Claude!"}],
)

Prefer the Anthropic SDK? Point it at the same host and use /v1/messages — see the Anthropic SDK doc. This is the same path Claude Code uses.

Make it cheaper still

  • Match the model to the task. Haiku-class models cost a fraction of Opus-class ones. Browse the full model list and compare the live input/output prices before you default to the biggest model.
  • Keep reasoning scoped. You pay per token, so a tight system prompt and a sensible max_tokens cut the output bill directly.
  • Fall back one line. If a request does not need frontier quality, change the model id to a cheaper open-weight model (DeepSeek, GLM, Qwen) and keep every other line the same.

You never pay for failures

If a Claude call fails before any output starts, MartLLM retries it on the next healthy seller automatically, and a request that never returns a result costs $0. You are billed only for output you actually receive — see how pricing works.

Keep reading

Live Claude pricing

ModelInput / 1MOutput / 1M
Claude Haiku 5.5$0.0180$0.0900
Claude Sonnet 4.6$0.3087$1.54
Claude Sonnet 5$0.3500$1.75
Claude Sonnet 5.5$0.3600$1.80
Claude Haiku 4.5$0.3608$1.80
Claude Opus 4.6$0.5180$2.59
Claude Opus 4.5$0.5645$2.82
Claude Opus 5.5$0.6780$3.39
Claude Opus 4.7$0.8056$4.03
Claude Opus 5$0.8991$4.50
Claude Opus 4.8$0.9000$4.50
Claude Sonnet 4.5$2.10$10.50

Live prices via MartLLM, no fee added · full pricing table →

FAQ

What is the cheapest way to call the Claude API?

Route each request to the cheapest healthy seller for that Claude model instead of paying a single fixed list price. MartLLM does this automatically through one key; MartLLM adds no fee to the live price shown, so it is the price you pay.

Can I use the Anthropic SDK?

Yes. Point the Anthropic SDK at the MartLLM /v1/messages endpoint with your MartLLM key and Claude models work unchanged. The OpenAI SDK also reaches Claude — set only the base URL and key.

Do I pay if a Claude request fails?

No. If a call fails before any output starts it is retried on the next healthy seller, and a request that returns no result costs $0. You are billed only for output you receive.