Skip to content

Batch files with curva map

curva map answers the same questions for every state in a JSONL file. It streams the file, stays within your rate limits, and can be stopped and resumed at any point.

tickets.jsonl: one JSON state per line (blank lines are skipped).

{"ticket": "I was charged twice for order A-104"}
{"ticket": "The app crashes on launch"}

questions.json: a JSON object of questions, exactly as in a /v1/decide request.

{
"team": {"type": "choice", "instructions": "Which team?",
"options": {"billing": "payments, refunds", "technical": "bugs"}},
"refund": {"type": "noul", "instructions": "The customer asks for a refund"}
}
Terminal window
export OPENROUTER_API_KEY=sk-or-v1-...
curva map tickets.jsonl -q questions.json -o answers.jsonl

Each output line has the input line number, the model that answered and the typed answers:

{"line": 1, "model": "…", "answers": {"team": {"choice": "billing", "probabilities": {…}, "confidence": 0.99}, "refund": {"noul": 0.02}}}

If the run stops (a daily quota, a network error, Ctrl-C), rerun the same command. It continues after the last line written, so nothing is scored or paid for twice. Repeated states within a run come from the cache.

Terminal window
curva map tickets.jsonl -q questions.json -o answers.jsonl \
--model model-a,model-b # a fallback chain
# or: --council a,b | --cascade a,b --escalate-below 0.8 | --race a,b
# plus: --mode auto|logprobs|verbal, --no-debias (half the calls)

The full list is in the CLI reference. To cap spending on a free tier, set CURVA_DAILY_LIMIT to the number of model calls allowed per day.

© 2026 Tarkova Private Limited.