For OpenAI API users
Spend less on OpenAI,
same code.
Change the base URL and add your Makas key. Your OpenAI key stays yours, and Makas sends eligible requests to a lower-cost OpenAI model.
Step 1
Two lineschange.
Keep the OpenAI SDK. Point its base URL at Makas and send your Makas key as a header; your OpenAI key stays as it is.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["OPENAI_API_KEY"],
base_url="https://eu.makas.ai/proxy/openai/v1",
default_headers={"Makas-Api-Key": os.environ["MAKAS_API_KEY"]},
)Set MAKAS_API_KEY and OPENAI_API_KEY in your environment to your own keys, and keep both on your server.
TypeScript and cURL examples are in the OpenAI quick start. Open the OpenAI quick start
What you get
Routing thatexplains itself.
Endpoints, streaming included
Chat Completions and Responses. 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 OpenAI key travels in the Authorization header with every request, and usage stays on your OpenAI 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 OpenAI 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/openai/v1/chat/completions/proxy/openai/v1/responses
Passed through
Embeddings, model listing, legacy completions, conversations and the other OpenAI calls are forwarded in OpenAI's own format, with the model you named.
Stays inside OpenAI
OpenAI requests stay with OpenAI. Routing never switches provider.
Questions
Before you change that URL.
Which OpenAI models does routing use?
Routing picks a lower-cost OpenAI 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 OpenAI key?
Yes. Send it with each request in its usual header, next to your Makas key. Provider usage stays on your own OpenAI 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 OpenAI reference covers endpoints, streaming and errors.
Read the OpenAI reference