API
Change one line.
OpenAI-compatible where it counts: same request shape, same response shape, same SDKs. Sampling parameters and tool calling are not supported and are refused outright rather than ignored — the full list is in the docs.
from openai import OpenAI client = OpenAI( base_url="https://calestai.com", api_key="clst_live_...",) answer = client.chat.completions.create( model="calest-auto", messages=[{"role": "user", "content": "Break down our revenue for the first half."}],)What comes back on top
The response has the shape every client expects. What CALEST knows beyond that sits in a field of its own — an OpenAI client ignores fields it doesn't recognise.
response.json
{ "object": "chat.completion", "choices": [{ "message": { "role": "assistant", "content": "..." } }], "usage": { "prompt_tokens": 737, "completion_tokens": 226 }, # Everything of ours sits under one key. # An OpenAI client ignores it. "calest": { "tier": "balanced", "cost_eur": 0.0168, "latency_ms": 17700 }}- tier
- Which tier the router picked for this request
- cost_eur
- What this request cost you
- latency_ms
- End to end, including every compilation stage
For developers
Change one line.
CALEST speaks the API your tools already use. Point them at a different address and carry on.
request.py
from openai import OpenAI client = OpenAI( base_url="https://calestai.com", api_key="clst_live_...",) answer = client.chat.completions.create( model="calest-auto", messages=[{"role": "user", "content": "Break down our revenue for the first half."}],)response.json
{ "object": "chat.completion", "choices": [{ "message": { "role": "assistant", "content": "Total revenue €8,731; monthly average €1,455 …" }, "finish_reason": "stop" }], "usage": { "prompt_tokens": 737, "completion_tokens": 226, "total_tokens": 963 }, "calest": { "tier": "balanced", "cost_eur": 0.0168, "latency_ms": 17700 }}