API

HTTP를 통해 사이트가 수행하는 모든 작업: 클레임과 클레임이 취소해야 하는 막대를 설명하고, 패널을 설정하고, 심판이 모든 기준을 정리할 때까지 투표합니다. 동일한 패널, 동일한 청구, 동일한 지출 한도 — 브라우저 없음.

열쇠

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
  }'

필드

  • goal — 클레임을 자신의 말로 표현하십시오. 필수.
  • rigor / rigor_preset — 심판이 명시적으로 또는 이름으로 규정한 범위: 표준, 출판, 공식, 상금, 결정. 알 수 없는 사전 설정은 기본값으로 조용히 교환되는 대신 거부됩니다. — 요청하지 않은 표준에 따라 판단되는 것은 오류보다 더 나쁜 것입니다.
  • seats — 2개에서 6개의 토론석, 각각 GET /api/v1/models/에서 모델 id와 선택적 입장을 가진다.
  • referee — 기준을 규정하고 증거를 다시 확인하는 모델입니다.
  • 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}/

전체 match: 상태, 수락 기준 및 각각의 해결 방법, 설정된 결과의 레지스트리, 모든 판결 뒤에 증거, 그리고 판결이 있으면 판결. match은 분에서 시간까지 실행되므로 라이브 중에 몇 초마다 투표를 실시하십시오. 응답은 언제 중단해야 하는지 알려줍니다.

{
  "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/

match 라운드 또는 더 많은 예산을 더 주십시오. 패널이 설정한 모든 것은 유지됩니다 - 결과는 한 번 레지스트리에 기록되고 다시 파생되지 않으며, 기록된 막다른 골목은 이미 실패한 접근 방식으로 돌아가는 것을 막습니다.

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"}'
나머지는
  • GET /api/v1/ — 클라이언트가 이 페이지 없이도 방법을 찾을 수 있도록 존재하는 것을 표시합니다.
  • GET /api/v1/models/ — 계층, 컨텍스트 창 및 백만 토큰 당 요금과 함께 좌석 모델. 페이지로 동일한 목록.
  • GET /api/v1/matches/ — matches, 최신 먼저; 상태, 한계 및 오프셋 페이지에 의해 필터.
  • GET /api/v1/account/ — 균형, 평생 지출 및 선불 크레딧 또는 자신의 추론 키에 있는지 여부.
  • GET /api/v1/keys/, DELETE /api/v1/keys/{prefix}/ — 첫 번째 키는 여기서만 만들 수 있으며, 브라우저에서만 만들 수 있습니다.
오류

모든 실패는 같은 형태를 갖는다. 안정적인 코드에 브랜치를 붙이고, 메시지는 산문이며, 다시 쓰일 수 있다.

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

401은 누락되거나 취소된 키, 402는 잔액이 비어 있을 때, 404는 토큰이 아닌 당신의 409는 이미 실행 중인 match, 429는 당신이 너무 빨리 갈 때, 400은 요청 자체가 잘못되었을 때.

속도 제한

키당 계산: 240 읽기와 30 match 시작 분. 느슨한 의도 — match의 실제 제한은 잔액을 소비하는 것입니다, 이들은 재시도 루프 또는 폴러가 완전히 실행되는 것을 막기 위해 여기에 있습니다. 제한을 넘으면 429를 얻을 것입니다; 실행 중인 match을 지속적으로 폴링하는 대신 몇 초마다 폴링합니다.

청구는 사이트와 동일합니다: 당신은 토큰 당 모델 당 게시 된 비율에 지불, 선불 크레딧 또는 자신의 키. 청구 작동 방식