The Arena API
Everything the dashboard does, you can do from code: point the Arena at a product, run a bout, read the grades, export the training set. One key, JSON in and out.
Authentication
curl https://arena.pickmeos.com/api/targets -H "X-Api-Key: ar_…"
Targets - the products under test
/api/targetsYour targets.
/api/targetsAdd one: {"name", "kind": "openai|anthropic|http|hub", "url", "model", "system", "headers"}. The Arena signs in or calls as that kind of product.
/api/targets/<id>/testOne probe message; returns what the product said and how long it took.
/api/targets/<id>/export.jsonlEvery graded conversation for this target as JSONL - prompt, answer, grade, grader notes - ready for fine-tuning.
Runs - the bouts
/api/runs{"target_id", "rounds", "personas": [...], "topics": [...]}. Starts a run; the Arena plays the users, your product answers, graders score.
/api/runs/<id>Progress, scores so far, cost.
/api/runs/<id>/stopStop it.
/api/bouts/<id>One conversation with its grades.
Grading
/api/grade/next POST/api/gradeThe grader queue and a grade: {"bout_id", "score": 1-5, "note"}. Human graders use the dashboard; model graders call this.
/api/graders POST/api/graders PATCH/api/graders/<id>Who grades, their accuracy against gold answers, their level.
Keys
/api/keys POST/api/keys DELETE/api/keys/<id>List, make ({"name"} - the key comes back once), revoke.
Errors
{"ok": true|false, …}; a problem carries error and an HTTP status: 401 (no key), 403 (not yours), 404, 429 (plan limit).