Probabilities you can trust
Send the true answer whenever you learn it. From 30 labels per question, Curva calibrates the answers when that helps, so a 0.9 means right about 90% of the time on your data. Calibration →


You give Curva some data and typed questions. It returns typed answers with probabilities, and never free text.
teamChoicefrustrationScorerefundNoulEvery answer is one of the labels you declared, with a probability for each label. There is no reply text to parse.
Text, pictures, PDFs, recordings, live calls and camera video all go through the same kind of call, and an AI agent can ask Curva before it acts.
Curva means “curve”: the calibration curve is what keeps its probabilities honest. Once calibrated on your data, when Curva says 90%, it is right about 90% of the time.
Curva is a small Rust server with Python and TypeScript SDKs. It works with any OpenRouter or OpenAI-compatible model, free ones included, using your own key. It is free to use under the Curva Free License, runs on your own servers, and its source code is not published.
From one run on real models, failures included. See every case and how it was run
pip install curva-aiexport GEMINI_API_KEY=... # one key of any provider, e.g. OPENROUTER_API_KEY (free models work)import curvafrom curva import Choice, Score, Noul
client = curva.local() # starts a private server for this processd = client.decide( state={"ticket": "I was charged twice for order A-104. Please refund the duplicate!"}, questions={ "team": Choice("Which team should handle this?", {"billing": "payments, refunds", "technical": "bugs", "sales": "pricing"}), "frustration": Score("How frustrated is the customer?", ["calm", "annoyed", "angry"]), "refund": Noul("The customer explicitly asks for a refund"), },)
print(d["team"].choice, d["team"].confidence) # billing 0.9999print(d["frustration"].score) # 0.65 (expected level, 0 = calm)print(d["refund"].noul) # 0.999 (P(yes))npm install curva-aiimport { Curva, choice, score, noul } from "curva-ai";
const curva = new Curva(); // CURVA_BASE_URL (default http://localhost:7777), CURVA_API_KEYconst d = await curva.decide( { ticket: "I was charged twice for order A-104. Please refund the duplicate!" }, { team: choice("Which team should handle this?", { billing: "payments, refunds", technical: "bugs", sales: "pricing" }), frustration: score("How frustrated is the customer?", ["calm", "annoyed", "angry"]), refund: noul("The customer explicitly asks for a refund"), },);
d.answers.team.choice; // "billing" | "technical" | "sales" | "none_of_these"d.answers.team.confidence;d.answers.frustration.score;d.answers.refund.noul; // P(yes)The TypeScript SDK is a client for a running server. Start one with curva serve or with Docker. See TypeScript.
curl -s localhost:7777/v1/decide -H 'content-type: application/json' -d '{ "state": {"ticket": "The app crashes on launch"}, "questions": {"team": {"type": "choice", "instructions": "Which team?", "options": {"billing": "", "technical": ""}}}}'Any language can call the server directly. The full contract is in the HTTP API reference.
docker run --rm -p 127.0.0.1:7777:7777 -e GEMINI_API_KEY ghcr.io/itsmohitrohilla/curva \ serve --addr 0.0.0.0:7777 --no-authThis runs a local server without API keys, for trying things out. For production, create a key first: see Self-hosting.
Each number below was measured on the date and sample its guide gives. Known limits says where each of these is weak.
curva.decide answers typed questions about any data: Choice, Score, yes or no, Multi, numbers and short text. On a public test of 2,000 decisions, Kimi K2.5 was right on 72.1% with a calibration error of 0.085, at 326 ms a case. Two models in a council reached 75.9% with an error of 0.028, at 5.4 s a case. See Questions and answers and Benchmarks.
curva.listen hears a call as it happens and fires your actions, such as warn_user or end_call. With seven ready-made call sets on Gemini 3.1 Flash Live (preview), it took the right action on 64 of 70 calls and fired nothing on 21 of 21 neutral calls, a median 1.07 s after the speech ended. See Voice calls.
curva.watch reads a camera, a stream, a file or your own frames. It drops frames that did not change, sends the changed ones to a vision model and runs your actions. A frame judged by the hosted model took 811 ms at the median (n 18). Reusing answers for near-identical frames cut hosted-model calls by 8% to 16% on a lobby clip and 42% on a kitchen clip, both synthetic. On 94 short clips sent to decide, precision was 100%, recall 82% to 87%, and the median answer 2.8 to 3.7 s. See Watch live video and Video clips.
curva.library reads PDFs, photos and long recordings, so you can search them and answer from them. A 2,131-page PDF was read in 2.3 s with no model call. On a 1,066-page novel the right page was in the top 5 for 90% of 50 scenes, with search under 4 ms at the median. Answers cite their page. Scanned pages are not read yet. See Library.
Send pictures with images= and ask about them. Yes or no about a photo was right on 87% (VQA v2, n 100), and 82% of boxes overlapped the true one by half or more (RefCOCO, n 125). Searching 300 photos in words in the library gave a precision at 5 of 94%, or 98% after checking the pixels, at $0.143 per 1,000 photos read. See Images and recordings and Boxes.
A trigger on any decision, call or camera posts to a webhook, Slack, Teams, Discord or Telegram, with retries, a delivery log and replay. Webhooks are signed. To a local receiver the POST leaves 1.4 to 2 ms after the decision at the median; real chat channels have not been tested yet. See Actions.
curva.check judges an action before it runs, and curva.guard screens text before a model reads it. An approval claimed in text unlocked 0 of 40 destructive actions. Agents reach Curva through curva mcp or tools for agent frameworks. See AI agents.
Every decision can carry an Ed25519 signature that anyone with the server’s public key can check offline. Signing adds 0.015 ms a decision at the median. See Signed receipts.
Once Curva has learned a question from your labels, curva pack writes a file that a small C library answers from with no network. On 1,552 held-out texts it gave the server’s answer or abstain on 1,551, at 4.8 µs a text. Those timings are from a laptop; Android and iOS builds have not been run. See Learned answers on a phone.
Probabilities you can trust
Send the true answer whenever you learn it. From 30 labels per question, Curva calibrates the answers when that helps, so a 0.9 means right about 90% of the time on your data. Calibration →
Never free text
Every answer is a typed Choice, Score, Noul (yes/no) or Multi, mapped only onto the labels you declared and validated before it reaches you. Questions →
Any model
Any OpenRouter or OpenAI-compatible model, free or paid, with your own key. Curva reads probabilities from logprobs when the model has them, and asks for them otherwise.
Stable and consistent
Options are asked in both orders and averaged, which cancels position bias. An escape option means the model is never forced into a wrong pick. Trust →
Fast and cheap on repeats
Repeat decisions come from the cache in about 0 ms at $0. All questions for one state go in a single request.
More than one model
Blend models in a council, escalate only unsure answers in a cascade, or race models for the fastest valid answer. Multi-model →
Learns your decisions
With learn=True and your labels, Curva trains a small model per question and answers by itself at $0, only once it is as accurate as your model. Learned answers →
Yours to run
API keys, an audit log that never stores your data, privacy: strict, Prometheus metrics and a small Docker image. Self-hosting →
v1 contract, for any language.Looking for Crowkis? Its documentation lives at crowkis.com/docs.