API

Semua yang dilakukan situs itu, melalui HTTP: menyatakan klaim dan bar itu harus jelas, duduk panel, dan jajak pendapat sampai wasit telah menyelesaikan setiap kriteria.

Kuncimu

Keys are created from your account. Sign in, or create one — new accounts get starting credit, which is enough for a real match.

Daftar Log masuk
Otentikasi

Kirim kunci sebagai token pembawa pada setiap permintaan. Ini adalah kredensial yang dapat menghabiskan saldo Anda, sehingga perlakukanlah seperti sandi: server-side saja, tidak pernah dalam peramban, tidak pernah dalam repositori. Kunci yang bocor dibatalkan dari halaman ini dan berhenti bekerja segera.

curl https://theorem.chat/api/v1/account/ \
  -H "Authorization: Bearer thm_live_xxxxxxxx.xxxxxxxxxxxxxxxx"

URL dasar: https://theorem.chat/api/v1/. Permintaan dan respon adalah JSON. Versinya berada di jalur, sehingga melanggar perubahan kapal sebagai v2 dan kode anda tetap bekerja.

POST /api/v1/matches/

Start a match. Only the goal is required: leave the panel out and a default lineup is seated from different vendors, because models trained on overlapping data share blind spots and a panel that agrees with itself is not evidence. The match is queued immediately and worked by a server, so the request returns as soon as it is accepted.

curl -X POST https://theorem.chat/api/v1/matches/ \
  -H "Authorization: Bearer $THEOREM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "Every prime p > 3 satisfies p^2 = 1 (mod 24).",
    "rigor_preset": "formal",
    "seats": [
      {"model": "anthropic/claude-opus-4.5"},
      {"model": "openai/gpt-5", "stance": "Attack the statement."}
    ],
    "max_rounds": 8,
    "usd_ceiling": "2.00",
    "public": false
  }'

Fields

  • goal — Klaim, dalam kata-katamu sendiri.
  • rigor / rigor_preset — bar wasit memegang anda untuk, kata demi kata: standar, publikasi, formal, hadiah, keputusan. sebuah preset yang tidak diketahui ditolak daripada diam-diam bertukar untuk standar baku É dinilai melawan standar yang tidak anda minta lebih buruk daripada sebuah kesalahan.
  • seats — dua sampai enam kursi berdebat, masing-masing model id dari get /api/v1/models/dan sikap opsional.
  • referee — Model yang mengatur kriteria dan memeriksa ulang bukti yang layak dihabiskan.
  • max_rounds, usd_ceiling — hard limits. Reaching the ceiling pauses the match rather than spending past it, and a paused match resumes exactly where it stopped.
  • public — publish the finished match to the public gallery.
GET /api/v1/matches/{token}/

The whole match: status, the acceptance criteria and how each was settled, the ledger of established results, the evidence behind every ruling, and the verdict once there is one. A match runs for minutes to hours, so poll every few seconds while live — the response tells you when to stop.

{
  "token": "k3m9x…",
  "status": "solved",
  "round": 5,
  "progress": 100,
  "usd_spent": "0.734120",
  "usd_ceiling": "2.000000",
  "criteria": [
    {"text": "p^2 - 1 is divisible by 8", "status": "met", "settled_round": 2},
    {"text": "p^2 - 1 is divisible by 3", "status": "met", "settled_round": 3}
  ],
  "evidence": [
    {"kind": "computation", "code": "…", "output": "…", "verified": true}
  ],
  "verdict": "…"
}

Statuses: antrian, berjalan, jeda, kebutuhan, dana, diselesaikan, kelelahan, terjebak, gagal. Keempat terakhir adalah terminal; jeda, kebutuhan_dana, kelelahan dan terjebak dapat dilanjutkan.

POST /api/v1/matches/{token}/resume/

Give a stopped match more rounds or more budget. Everything the panel established is kept — results are written to a ledger once and never re-derived, and recorded dead ends stop it walking back into an approach that already failed.

curl -X POST https://theorem.chat/api/v1/matches/$TOKEN/resume/ \
  -H "Authorization: Bearer $THEOREM_KEY" \
  -H "Content-Type: application/json" \
  -d '{"more_rounds": 4, "more_usd": "2.00"}'
Sisanya
  • GET /api/v1/ — apa yang ada, sehingga klien dapat menemukan jalan tanpa halaman ini.
  • GET /api/v1/models/ — model yang dapat memuat dengan tingkat yang sama, jendela konteks dan harga yang sama sebanyak jutaan ton. Daftar yang sama, halaman.
  • GET /api/v1/matches/ — your matches, newest first; filter by status, page with limit and offset.
  • GET /api/v1/account/ — Keseimbangan, pengeluaran seumur hidup dan apakah Anda pada kredit prabayar atau kunci inferensi Anda sendiri.
  • GET /api/v1/keys/, DELETE /api/v1/keys/{prefix}/ — tampilkan dan batalkan kunci. Kunci pertama hanya dapat dicetak di sini, dalam peramban.
Galat

Setiap kegagalan memiliki bentuk yang sama.

{"error": {"code": "insufficient_balance",
           "message": "Add credit or connect your own inference key…"}}

401 for a missing or revoked key, 402 when the balance is empty, 404 for a token that is not yours, 409 for a match that is already running, 429 when you are going too fast, 400 for anything the request itself got wrong.

Batas rasio

Counted per key: 240 reads and 30 match starts a minute. Loose on purpose — what actually limits a match is that it spends your balance, and these are here to stop a retry loop or a poller running flat out. Over the limit you get 429; poll a running match every few seconds rather than continuously.

Tagihan identik dengan situs: Anda membayar setiap token pada tingkat per-model yang diterbitkan, dari kredit prabayar atau kunci Anda sendiri. Bagaimana cara kerja tagihan