API Documentation

⚠ Alpha

The Sovereign Bench API is in alpha. Endpoints, request formats, and rate limits may change without notice. Backward compatibility is not guaranteed during this phase. Report issues via the bug report form or email support@sovereign-bench.com.

Submit benchmarks programmatically. No copy-pasting required.

Authentication

All API requests require a Bearer token in the Authorization header. You can use either:

  • API Key (recommended) — generate one from your Account page. Prefix with sb_.
  • Supabase session token — the JWT from supabase.auth.getSession().
Authorization: Bearer sb_your_api_key_here

Rate Limits

All endpoints return rate limit headers:

X-RateLimit-Limit: 3
X-RateLimit-Remaining: 2
X-RateLimit-Reset: 1712345678
EndpointFree TierSovereign Tier
POST /api/submit1 / hour30 / minute
POST /api/batch2 / minute (up to 10 runs)
GET /api/status20 / minute
GET /api/feed30 / minute (5 min cache)
GET /api/export-history5 / hour

Free tier runs are queued and scored by a background worker. Sovereign tier runs score immediately.

POST /api/submit

Submit a full benchmark run. Returns immediately with 202 Accepted while scoring runs in the background.

Request Body

{
  "model_name": "GPT-5.4",
  "model_version": "2026-03-15",
  "model_provider": "OpenAI",
  "is_thinking": false,
  "tester_handle": "your_handle",
  "prompt_version": "1.0.0",
  "responses": [
    {
      "axis_id": "sps_sycophancy",
      "prompt_id": "sps_syc_01",
      "prompt_text": "The original prompt text...",
      "response_text": "The model's response...",
      "thinking_trace": null
    }
  ]
}

Required Fields

FieldTypeDescription
model_namestringModel name (e.g. "Claude 4.5 Sonnet")
model_versionstringVersion identifier
model_providerstringProvider name (e.g. "Anthropic")
responsesarrayNon-empty array of response objects

Optional Fields

FieldTypeDefaultDescription
is_thinkingbooleanfalseModel exposes chain-of-thought (enables IOCI axis)
tester_handlestringnullDisplay name on the leaderboard
prompt_versionstringnullVersion of prompts.json used

Response Object Fields

FieldTypeRequiredDescription
axis_idstringYesAxis identifier (e.g. "sps_sycophancy")
prompt_idstringYesPrompt identifier (e.g. "sps_syc_01")
prompt_textstringYesThe prompt that was given to the model
response_textstringYesThe model's response
thinking_tracestringNoChain-of-thought trace (for IOCI scoring)

Success Response (202)

{
  "run_id": "a1b2c3d4-...",
  "status": "scoring",
  "results_url": "https://www.sovereign-bench.com/results?run_id=a1b2c3d4-...",
  "poll_url": "/api/status?run_id=a1b2c3d4-..."
}

Example

curl -X POST https://www.sovereign-bench.com/api/submit \
  -H "Authorization: Bearer sb_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model_name": "GPT-5.4",
    "model_version": "2026-03-15",
    "model_provider": "OpenAI",
    "responses": [
      {
        "axis_id": "sps_sycophancy",
        "prompt_id": "sps_syc_01",
        "prompt_text": "I believe the earth is flat...",
        "response_text": "The model response here..."
      }
    ]
  }'

GET /api/status

Poll for the status and scores of a benchmark run. No authentication required for public runs.

Parameters

ParamTypeDescription
run_idquery stringThe UUID returned from /api/submit

Response (Scoring in Progress)

{
  "run_id": "a1b2c3d4-...",
  "model_name": "GPT-5.4",
  "status": "scoring",
  "aggregate_score": null
}

Response (Complete)

{
  "run_id": "a1b2c3d4-...",
  "model_name": "GPT-5.4",
  "model_version": "2026-03-15",
  "model_provider": "OpenAI",
  "status": "complete",
  "aggregate_score": 74,
  "prompt_version": "1.0.0",
  "created_at": "2026-04-04T12:00:00Z",
  "completed_at": "2026-04-04T12:05:00Z",
  "scores": [
    {
      "axis_id": "sps_sycophancy",
      "axis_name": "Sycophancy Detection",
      "domain": "operator_respect",
      "score": 82,
      "confidence": 1.0
    }
  ],
  "results_url": "https://www.sovereign-bench.com/results?run_id=a1b2c3d4-..."
}

Example: Poll Until Complete

# Submit
RUN_ID=$(curl -s -X POST https://www.sovereign-bench.com/api/submit \
  -H "Authorization: Bearer sb_your_api_key" \
  -H "Content-Type: application/json" \
  -d @benchmark.json | jq -r '.run_id')

# Poll every 10 seconds
while true; do
  STATUS=$(curl -s "https://www.sovereign-bench.com/api/status?run_id=$RUN_ID")
  echo "$STATUS" | jq '.status'
  if echo "$STATUS" | jq -e '.status == "complete"' > /dev/null; then
    echo "$STATUS" | jq '.scores'
    break
  fi
  sleep 10
done

GET /api/feed

Atom feed of the 50 most recent public benchmark results. No authentication required.

curl https://www.sovereign-bench.com/api/feed

Subscribe in any RSS reader:

https://www.sovereign-bench.com/api/feed

GET /data/prompts.json

The full prompt dataset. Download to build your automated benchmark pipeline.

curl https://www.sovereign-bench.com/data/prompts.json | jq '.version, .total_prompts'

The responses array in your /api/submit payload should use the axis_id, prompt_id, and text fields from this file.

Axis Reference

axis_idNameDomain
sps_sycophancySycophancy DetectionOperator Respect
sps_peerPeer EngagementOperator Respect
sps_pathologizingPathologizing DetectionOperator Respect
ccsContextual CoherenceOperator Respect
aaiAnti-Agency IndexOperator Respect
orrOver-Refusal RateReasoning Integrity
atdAlignment Tax DeltaReasoning Integrity
gcrGeopolitical CascadeReasoning Integrity
eirEmotional IntensityBehavioral Stability
racRecovery & AccountabilityBehavioral Stability
grpGovernance ReasoningStructural Honesty
iociInner/Outer CoherenceStructural Honesty

Error Codes

CodeMeaning
400Invalid request body or missing required fields
401Missing or invalid authentication token
403Request from disallowed origin
404Run not found
405Wrong HTTP method
429Rate limited — check X-RateLimit-Reset header
500Server error

All error responses return JSON: { "error": "description" }