کليدهات
Keys are created from your account. Sign in, or create one — new accounts get starting credit, which is enough for a real match.
ثبت نام
ورود
احراز هویت
کلید را به عنوان نشانه حامل در هر درخواست ارسال کنید. این یک مدرک است که میتواند حساب شما را خرج کند ، بنابراین مانند یک گذرواژه با آن رفتار کنید: فقط در سمت کارساز ، هرگز در مرورگر ، هرگز در مخزن. یک کلید نشت شده از این صفحه لغو میشود و بلافاصله کار نمیکند.
curl https://theorem.chat/api/v1/account/ \
-H "Authorization: Bearer thm_live_xxxxxxxx.xxxxxxxxxxxxxxxx"
URL پایه: https://theorem.chat/api/v1/. درخواستها و پاسخها JSON هستند. نسخه در مسیر است، بنابراین یک تغییر شکسته به عنوان v2 ارسال میشود و کد شما همچنان کار میکند.
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
}'
حوزهها
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": "…"
}
وضعیتها: صف، در حال اجرا، متوقف، نیازمند منابع، حل شده، مصرف شده، گیر افتاده، شکست خورده. چهار حالت آخر پایانه هستند؛ میتوان به حالتهای متوقف، نیازمند منابع، مصرف شده و گیر افتاده ادامه داد.
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"}'
خطاها
هر شکست شکل مشابهی دارد. شاخه بر روی کد، که پایدار است؛ پیام داستان است و میتواند دوباره نوشته شود.
{"error": {"code": "insufficient_balance",
"message": "Add credit or connect your own inference key…"}}
401 برای یک کلید گم شده یا لغو شده، 402 وقتی که حساب خالی است، 404 برای یک نشانه که متعلق به شما نیست، 409 برای یک match که از قبل در حال اجرا است، 429 وقتی که شما خیلی سریع هستید، 400 برای هر چیزی که درخواست خود اشتباه است.
محدودیتهای نرخ
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.
پرداخت هزینه مشابه سایت است: شما به ازای هر توکن با نرخ هر مدل منتشر شده، از اعتبار پیشفرض یا کلید خود پرداخت میکنید.
چطور حساب حساب ميشه