For Anthropic API users
Spend less on Anthropic,
same code.
Change the base URL and add your Makas key. Your Anthropic key stays yours, and Makas sends eligible requests to a lower-cost Anthropic model.
Step 1
Two lineschange.
Keep the Anthropic SDK. It adds /v1/messages itself, so the base URL stops at /proxy/anthropic.
import os
import anthropic
client = anthropic.Anthropic(
api_key=os.environ["ANTHROPIC_API_KEY"],
base_url="https://eu.makas.ai/proxy/anthropic",
default_headers={"Makas-Api-Key": os.environ["MAKAS_API_KEY"]},
)Set MAKAS_API_KEY and ANTHROPIC_API_KEY in your environment to your own keys, and keep both on your server.
TypeScript and cURL examples are in the Anthropic quick start. Open the Anthropic quick start
What you get
Routing thatexplains itself.
Endpoints, streaming included
Messages. Both buffered and streaming requests are routed.
Both prices, when they are known
Request Logs show the model you asked for and the model used. Cost and savings appear when usage and pricing are known: in response headers for buffered requests, and in Request Logs for streams once they end.
Your key, not ours
Your Anthropic key travels in the X-Api-Key header with every request, and usage stays on your Anthropic account. Makas reads its own key from Makas-Api-Key and removes it before forwarding.
Routing scope
What gets routed,what passes through.
Routed
Eligible text requests move to a lower-cost Anthropic model when one fits. Capabilities, request shape and conversation continuity can keep a request on the model you asked for, and that is a normal outcome.
Routed routes
/proxy/anthropic/v1/messages
Passed through
Token counting, model listing and legacy Text Completions are forwarded in Anthropic's own format, with the model you named.
Stays inside Anthropic
Anthropic requests stay with Anthropic. Routing never switches provider.
Questions
Before you change that URL.
Which Anthropic models does routing use?
Routing picks a lower-cost Anthropic model for an eligible request. Which models qualify depends on the request and your routing rules, and each request records the model you asked for and the model used.
Do my prompts get stored?
Prompt plaintext is not persisted during normal routing. (Coming soon) Semantic caching is the exception. On Growth and up, it sends the prompt to OpenAI to create an embedding, including for requests to Anthropic and Google, keeps a SHA-256 hash and an unencrypted embedding, and stores the response encrypted per-customer. Retention is enforced, and there is no separate opt-out. It is off during the Founding period.
Do I still use my own Anthropic key?
Yes. Send it with each request in its usual header, next to your Makas key. Provider usage stays on your own Anthropic account.
What if I need a specific model?
Opt a routing group out in Routing Rules, or add a custom rule of your own; the Founding plan includes up to 10 custom rules. Requests that routing leaves alone keep the model you asked for.
Does streaming work?
Yes, streaming requests go through the same routing. A stream's final usage and cost are in Request Logs once it ends, not in response headers. While a monthly cap applies, which is always the case on Founding, a stream must target a model in the Makas model catalog, or it is rejected before it starts.
The Anthropic reference covers endpoints, streaming and errors.
Read the Anthropic reference