{
  "openapi": "3.1.0",
  "jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
  "info": {
    "title": "Sovereign Bench API",
    "version": "2026-10-29",
    "description": "Current alpha API contract. Submit actual model responses, validate without inference, poll durable runs, and retrieve recorded scores. API contract revisions are separate from prompt and scoring versions. See /docs for the executable integration guide."
  },
  "servers": [
    {
      "url": "https://www.sovereign-bench.com"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Benchmarks"
    },
    {
      "name": "Batches"
    },
    {
      "name": "Discovery"
    },
    {
      "name": "Account"
    },
    {
      "name": "Publication"
    },
    {
      "name": "Integrations"
    }
  ],
  "paths": {
    "/api/submit": {
      "post": {
        "summary": "Validate or submit a benchmark",
        "tags": [
          "Benchmarks"
        ],
        "description": "New runs are queued and unpublished. Partial submissions are diagnostic and cannot be published. validate_only creates no benchmark run or judge calls. Idempotent replays use the existing run.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RunSubmission"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "No-inference validation result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ValidationResult"
                }
              }
            }
          },
          "202": {
            "description": "Durable accepted run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedRun"
                }
              }
            },
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              },
              "Idempotency-Replayed": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "true",
                    "false"
                  ]
                },
                "description": "Whether an existing submission was replayed."
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "410": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/score": {
      "post": {
        "summary": "Validate and queue an existing guided benchmark",
        "tags": [
          "Benchmarks"
        ],
        "description": "Used by the guided website after its responses are saved. Requires the owner. Validates canonical input and freezes the accepted run before queueing. Repeated calls for an already accepted queued/scoring run return its existing state; no second attempt is started. Complete/failed runs return 409 and require a new benchmark for another attempt. Programmatic clients create runs with /api/submit.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "run_id": {
                    "type": "string",
                    "format": "uuid"
                  }
                },
                "required": [
                  "run_id"
                ],
                "additionalProperties": true
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Existing run accepted or already queued/scoring",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedExistingRun"
                }
              }
            },
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/status": {
      "get": {
        "summary": "Retrieve run status and saved scores",
        "tags": [
          "Benchmarks"
        ],
        "description": "Send owner Bearer authentication for all unpublished, private, queued, or scoring runs. Only complete runs with is_public=true and is_private=false are public. Inaccessible resources return 404. Responses are not cached.",
        "parameters": [
          {
            "name": "run_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "bearerAuth": []
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "Run state; scores appear on complete",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RunStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/batch": {
      "post": {
        "summary": "Validate or atomically submit 1–10 runs",
        "tags": [
          "Batches"
        ],
        "description": "Sovereign only. Runs use the single-submit contract except validate_only belongs on the batch. All members are validated and saved atomically. The worker processes queued runs independently.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchSubmission"
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Coverage for each validated member",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchValidationResult"
                }
              }
            }
          },
          "202": {
            "description": "Durable accepted batch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedBatch"
                }
              }
            },
            "headers": {
              "Location": {
                "$ref": "#/components/headers/Location"
              },
              "Retry-After": {
                "$ref": "#/components/headers/RetryAfter"
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/batch-status": {
      "get": {
        "summary": "Retrieve durable batch progress",
        "tags": [
          "Batches"
        ],
        "description": "Sovereign owner only. pending/processing are nonterminal; complete/partial/failed are terminal. Inspect each member result.",
        "parameters": [
          {
            "name": "batch_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Progress derived from member run states",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchStatus"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/version": {
      "get": {
        "summary": "Discover active dataset and scoring configuration",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Current configuration, not historical provenance",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Version"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/paid-status": {
      "get": {
        "summary": "Check effective account access",
        "tags": [
          "Account"
        ],
        "responses": {
          "200": {
            "description": "Current direct and membership access",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaidAccess"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/run-privacy": {
      "patch": {
        "summary": "Change the privacy flag on an owned run",
        "tags": [
          "Publication"
        ],
        "description": "Sovereign owner only. private=true removes public API/feed/export access. private=false does not itself publish a new run; publication is a separate results-page action.",
        "parameters": [
          {
            "name": "run_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "private",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Updated flag",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "run_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "is_private": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "run_id",
                    "is_private"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/export-history": {
      "get": {
        "summary": "Export public leaderboard history as CSV",
        "tags": [
          "Publication"
        ],
        "description": "Sovereign only. This exports public leaderboard history, not a private account archive. Includes recorded prompt/scoring/panel/configuration columns. Responses are not cached.",
        "responses": {
          "200": {
            "description": "Completed, public, non-private benchmark history",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "headers": {
              "Content-Disposition": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/feed": {
      "get": {
        "summary": "Read the latest public results as Atom",
        "tags": [
          "Publication"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Latest 50 completed public non-private runs",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "500": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/api-keys": {
      "get": {
        "summary": "List your API key prefixes and state",
        "tags": [
          "Account"
        ],
        "security": [
          {
            "sessionToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Keys; raw values are never returned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "keys": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/APIKey"
                      }
                    }
                  },
                  "required": [
                    "keys"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "summary": "Create an API key",
        "tags": [
          "Account"
        ],
        "description": "At most five active keys. Requires a Supabase session token; an API key cannot manage keys.",
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "maxLength": 100,
                    "default": "default"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "security": [
          {
            "sessionToken": []
          }
        ],
        "responses": {
          "201": {
            "description": "Raw key displayed once",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedAPIKey"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "summary": "Revoke an API key",
        "tags": [
          "Account"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "security": [
          {
            "sessionToken": []
          }
        ],
        "responses": {
          "200": {
            "description": "Revocation result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "revoked": {
                      "const": true
                    }
                  },
                  "required": [
                    "revoked"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/judge-config": {
      "get": {
        "summary": "List judge configurations and available judge IDs",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "responses": {
          "200": {
            "description": "Configurations and supported models",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "configs": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/JudgeConfig"
                      }
                    },
                    "available_judges": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "configs",
                    "available_judges"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "summary": "Save a custom judge configuration",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only; up to ten saved configurations. Unsupported or duplicate models are rejected. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JudgeConfigInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Saved configuration",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JudgeConfig"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/webhooks": {
      "get": {
        "summary": "List webhooks and delivery health",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "responses": {
          "200": {
            "description": "Webhook list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "webhooks": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Webhook"
                      }
                    }
                  },
                  "required": [
                    "webhooks"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "summary": "Register an HTTPS webhook receiver",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only; up to five active webhooks. Signature is hex HMAC-SHA256 of the exact raw body, keyed by the returned secret, in X-SovereignBench-Signature. Delivery body has event, timestamp and data. Hooks deactivate after ten consecutive failures. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WebhookInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Save the shared secret once",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "secret": {
                      "type": "string"
                    },
                    "message": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "secret",
                    "message"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "summary": "Delete a webhook",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only. Missing or unowned IDs return 404. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "const": true
                    }
                  },
                  "required": [
                    "deleted"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/api/regression-watches": {
      "get": {
        "summary": "List model regression watches",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "responses": {
          "200": {
            "description": "Watch list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "watches": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RegressionWatch"
                      }
                    }
                  },
                  "required": [
                    "watches"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "summary": "Create a model regression watch",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only; up to ten active watches. threshold is an integer score-point decrease from 1 to 50, defaulting to 5 when omitted or null. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RegressionWatchInput"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created watch",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RegressionWatch"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "delete": {
        "summary": "Delete a regression watch",
        "tags": [
          "Integrations"
        ],
        "description": "Sovereign only. Missing or unowned IDs return 404. All responses are private, no-store. Origin-less server requests with Bearer authentication are supported.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "deleted": {
                      "const": true
                    }
                  },
                  "required": [
                    "deleted"
                  ],
                  "additionalProperties": true
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "405": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/data/prompts.json": {
      "get": {
        "summary": "Download Standard prompts",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Canonical nested axes and prompts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptDataset"
                }
              }
            }
          }
        }
      }
    },
    "/data/prompts-hard.json": {
      "get": {
        "summary": "Download Hard additions prompts",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Canonical nested axes and prompts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptDataset"
                }
              }
            }
          }
        }
      }
    },
    "/data/prompts-agi.json": {
      "get": {
        "summary": "Download AGI additions prompts",
        "tags": [
          "Discovery"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "Canonical nested axes and prompts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PromptDataset"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Complete sb_ API key or Supabase session access token."
      },
      "sessionToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Supabase session token only; API keys cannot manage keys."
      }
    },
    "parameters": {
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "schema": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128,
          "pattern": "^[A-Za-z0-9._:-]+$"
        },
        "description": "Recommended. Reuse with identical normalized payload for retries. Scope is account and endpoint; retention is 24 hours. Different payload returns 409."
      }
    },
    "headers": {
      "Location": {
        "schema": {
          "type": "string"
        },
        "description": "Relative polling URL for the accepted resource."
      },
      "RetryAfter": {
        "schema": {
          "type": "string"
        },
        "description": "Seconds to wait before retrying or polling."
      }
    },
    "responses": {
      "Error": {
        "description": "Request failed; inspect HTTP status, error, optional code/field, and Retry-After when present.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "description": "Machine-readable failure class where available. MISSING_PROMPT_CONTEXT requires the named earlier turns or EIR baseline responses; NO_SCORING_PROMPTS means no rubric-bearing response was submitted. These validation errors return 400 before scoring."
          },
          "field": {
            "type": "string"
          },
          "request_id": {
            "type": "string",
            "format": "uuid"
          }
        },
        "required": [
          "error"
        ],
        "additionalProperties": true
      },
      "Coverage": {
        "type": "object",
        "properties": {
          "submitted": {
            "type": "integer",
            "minimum": 1
          },
          "expected": {
            "type": "integer",
            "minimum": 1
          },
          "complete": {
            "type": "boolean"
          },
          "missing_prompt_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "submitted",
          "expected",
          "complete",
          "missing_prompt_ids"
        ],
        "additionalProperties": false,
        "description": "Counts all canonical prompts for the selected difficulty and thinking mode, including setup and baseline responses without rubrics. Only rubric-bearing responses receive independent scores. Partial coverage is diagnostic and ineligible for public leaderboard publication."
      },
      "PromptResponse": {
        "type": "object",
        "properties": {
          "axis_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "enum": [
              "sps_sycophancy",
              "sps_peer",
              "sps_pathologizing",
              "ccs",
              "aai",
              "orr",
              "atd",
              "gcr",
              "eir",
              "rac",
              "grp",
              "ioci"
            ]
          },
          "prompt_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100,
            "description": "Canonical prompt ID for its axis and selected cumulative difficulty. Unique per run."
          },
          "prompt_text": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000,
                "description": "Optional. Omitted, null or blank uses canonical text; otherwise must match after CRLF normalization and trimming surrounding whitespace."
              },
              {
                "type": "null"
              }
            ]
          },
          "response_text": {
            "type": "string",
            "minLength": 1,
            "maxLength": 100000,
            "description": "Actual non-blank model response; null bytes are rejected."
          },
          "thinking_trace": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000,
                "description": "Visible reasoning or summary actually provided by the model. Null or blank is absent. A non-blank value requires is_thinking=true; required and non-blank for IOCI."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "axis_id",
          "prompt_id",
          "response_text"
        ],
        "additionalProperties": false
      },
      "RunSubmission": {
        "type": "object",
        "properties": {
          "model_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "model_version": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "model_provider": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "is_thinking": {
            "type": "boolean",
            "default": false,
            "description": "Visible reasoning/summary is available. Non-thinking runs must omit IOCI."
          },
          "tester_handle": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "description": "Null or blank is treated as omitted."
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt_version": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "description": "Omitted, null or blank defaults to the current canonical dataset version; otherwise must match."
              },
              {
                "type": "null"
              }
            ]
          },
          "difficulty": {
            "type": "string",
            "enum": [
              "standard",
              "hard",
              "agi"
            ],
            "default": "standard"
          },
          "responses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PromptResponse"
            },
            "minItems": 1,
            "maxItems": 100,
            "description": "Include at least one rubric-bearing prompt and every required context response. CCS/RAC follow-ups require earlier turns in the same dataset/axis/conversation, reset at turn 1. EIR targets require preceding baseline responses from that dataset EIR group as separate comparisons. Setup/baseline prompts have no independent scores. Subsets are diagnostic and cannot be publicly published; coverage counts all prompts."
          },
          "judge_panel": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "minItems": 2,
                "maxItems": 5,
                "uniqueItems": true,
                "description": "Sovereign only. Current supported IDs come from GET /api/judge-config."
              },
              {
                "type": "null"
              }
            ]
          },
          "is_private": {
            "type": "boolean",
            "default": false,
            "description": "True requires Sovereign access. New runs are unpublished regardless of this flag."
          },
          "validate_only": {
            "type": "boolean",
            "default": false,
            "description": "Validate access and the payload without creating a benchmark run or invoking judges."
          }
        },
        "required": [
          "model_name",
          "model_version",
          "model_provider",
          "responses"
        ],
        "additionalProperties": false
      },
      "ValidationResult": {
        "type": "object",
        "properties": {
          "valid": {
            "const": true
          },
          "validate_only": {
            "const": true
          },
          "status": {
            "const": "validated"
          },
          "prompt_version": {
            "type": "string"
          },
          "difficulty": {
            "type": "string",
            "enum": [
              "standard",
              "hard",
              "agi"
            ]
          },
          "response_count": {
            "type": "integer"
          },
          "coverage": {
            "$ref": "#/components/schemas/Coverage"
          },
          "scoring_config_id": {
            "type": "string"
          }
        },
        "required": [
          "valid",
          "validate_only",
          "status",
          "prompt_version",
          "difficulty",
          "response_count",
          "coverage",
          "scoring_config_id"
        ],
        "additionalProperties": true
      },
      "AcceptedRun": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "in_progress",
              "scoring",
              "complete",
              "failed"
            ],
            "description": "Initially queued; an idempotent replay can report the current state."
          },
          "results_url": {
            "type": "string",
            "format": "uri"
          },
          "poll_url": {
            "type": "string"
          },
          "replayed": {
            "type": "boolean"
          },
          "coverage": {
            "$ref": "#/components/schemas/Coverage"
          }
        },
        "required": [
          "run_id",
          "status",
          "results_url",
          "poll_url",
          "replayed",
          "coverage"
        ],
        "additionalProperties": true
      },
      "AcceptedExistingRun": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "scoring"
            ]
          },
          "coverage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Coverage"
              },
              {
                "type": "null"
              }
            ]
          },
          "poll_url": {
            "type": "string"
          }
        },
        "required": [
          "run_id",
          "status",
          "coverage",
          "poll_url"
        ],
        "additionalProperties": true
      },
      "AxisScore": {
        "type": "object",
        "properties": {
          "axis_id": {
            "type": "string"
          },
          "axis_name": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "score": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "axis_id",
          "axis_name",
          "domain",
          "score",
          "confidence"
        ],
        "additionalProperties": true
      },
      "ScoringConfiguration": {
        "type": "object",
        "properties": {
          "scoring_version": {
            "type": "string"
          },
          "panel_version": {
            "type": "string"
          },
          "rubric_version": {
            "type": "string"
          },
          "input_protocol": {
            "type": "string",
            "description": "Since v1.03, context-complete-v1 scores rubric-bearing responses with required conversation context or separate EIR baseline comparisons. Absent from snapshots predating v1.03."
          },
          "aggregation": {
            "type": "string"
          },
          "completeness": {
            "type": "string"
          },
          "temperature": {
            "type": "number"
          },
          "judges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "model": {
                  "type": "string"
                },
                "family": {
                  "type": "string"
                },
                "max_tokens": {
                  "type": "integer"
                },
                "stream": {
                  "type": "boolean",
                  "description": "When true, the judge requires a complete streamed answer."
                },
                "reasoning": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "object"
                    }
                  ]
                },
                "weight": {
                  "type": "number"
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true,
        "description": "Immutable scoring snapshot. Historical fields may be absent. v1.03 retains the v1.02 judge panel and rubric text but changes judge input assembly, creating a distinct comparison cohort. v1.04 replaces the retired Qwen3.8 judge with Qwen3.7-Max in panel together-2026-11-04 and starts a new cohort. Equal weights remain provisional and uncalibrated."
      },
      "RunStatus": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "model_name": {
            "type": "string"
          },
          "model_version": {
            "type": "string"
          },
          "model_provider": {
            "type": "string"
          },
          "difficulty": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "is_thinking": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "in_progress",
              "scoring",
              "complete",
              "failed"
            ]
          },
          "aggregate_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "prompt_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "panel_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_config_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScoringConfiguration"
              },
              {
                "type": "null"
              }
            ]
          },
          "coverage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Coverage"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_error": {
            "anyOf": [
              {
                "type": "string",
                "description": "Safe terminal failure code; null for nonfailed runs. JUDGE_PAYMENT_REQUIRED means the judge provider returned HTTP 402; the site operator must restore provider access before a new attempt. INVALID_JUDGE_PANEL means a queued run explicitly selected a judge that has since retired. Submit a new run with a supported panel."
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_error_message": {
            "type": ["string", "null"],
            "description": "Safe operator guidance for a recognized failure, otherwise null. Payment-required failures are terminal and must not trigger automatic resubmission."
          },
          "scoring_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "completed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "scores": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AxisScore"
            }
          },
          "results_url": {
            "type": "string",
            "format": "uri"
          }
        },
        "required": [
          "run_id",
          "model_name",
          "model_version",
          "model_provider",
          "status",
          "aggregate_score",
          "prompt_version",
          "coverage",
          "scoring_error",
          "created_at",
          "completed_at"
        ],
        "additionalProperties": true
      },
      "BatchSubmission": {
        "type": "object",
        "properties": {
          "runs": {
            "type": "array",
            "items": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/RunSubmission"
                },
                {
                  "not": {
                    "required": [
                      "validate_only"
                    ]
                  }
                }
              ]
            },
            "minItems": 1,
            "maxItems": 10
          },
          "validate_only": {
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "runs"
        ],
        "additionalProperties": false
      },
      "BatchValidationResult": {
        "type": "object",
        "properties": {
          "valid": {
            "const": true
          },
          "validate_only": {
            "const": true
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Coverage"
            }
          }
        },
        "required": [
          "valid",
          "validate_only",
          "runs"
        ],
        "additionalProperties": true
      },
      "AcceptedBatch": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "const": "pending"
          },
          "total_runs": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10
          },
          "run_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          },
          "replayed": {
            "type": "boolean"
          },
          "poll_url": {
            "type": "string"
          }
        },
        "required": [
          "batch_id",
          "status",
          "total_runs",
          "run_ids",
          "replayed",
          "poll_url"
        ],
        "additionalProperties": true
      },
      "BatchRunStatus": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "in_progress",
              "scoring",
              "complete",
              "failed"
            ]
          },
          "aggregate_score": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_started_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "submission_coverage": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/Coverage"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "panel_version": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_config_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "scoring_config": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ScoringConfiguration"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "run_id",
          "status",
          "aggregate_score",
          "scoring_error"
        ],
        "additionalProperties": true
      },
      "BatchStatus": {
        "type": "object",
        "properties": {
          "batch_id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "complete",
              "partial",
              "failed"
            ]
          },
          "total_runs": {
            "type": "integer"
          },
          "completed_runs": {
            "type": "integer"
          },
          "failed_runs": {
            "type": "integer"
          },
          "pending_runs": {
            "type": "integer"
          },
          "runs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BatchRunStatus"
            }
          }
        },
        "required": [
          "batch_id",
          "status",
          "total_runs",
          "completed_runs",
          "failed_runs",
          "pending_runs",
          "runs"
        ],
        "additionalProperties": true
      },
      "APIKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key_prefix": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "last_used": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "key_prefix",
          "label",
          "revoked"
        ],
        "additionalProperties": true
      },
      "CreatedAPIKey": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key": {
            "type": "string",
            "pattern": "^sb_[a-f0-9]{64}$",
            "description": "Shown once; never returned by the list endpoint."
          },
          "prefix": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "prefix",
          "label",
          "message"
        ],
        "additionalProperties": true
      },
      "PaidAccess": {
        "type": "object",
        "properties": {
          "paidAccess": {
            "type": "boolean"
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "permanent": {
            "type": "boolean"
          },
          "membership": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ]
          },
          "membershipStatus": {
            "type": "string"
          },
          "label": {
            "type": "string"
          }
        },
        "required": [
          "paidAccess",
          "sources"
        ],
        "additionalProperties": true
      },
      "JudgeConfigInput": {
        "type": "object",
        "properties": {
          "judges": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "minItems": 2,
            "maxItems": 5,
            "uniqueItems": true
          },
          "label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "default": "custom",
                "description": "Omitted, null or blank uses custom."
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "judges"
        ],
        "additionalProperties": false
      },
      "JudgeConfig": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "judges": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "label": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "judges",
          "label"
        ],
        "additionalProperties": true
      },
      "WebhookInput": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "pattern": "^https://",
            "description": "Public HTTPS receiver; credentials, fragments, and private/internal addresses are rejected."
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "scoring_complete",
                "regression_detected"
              ]
            },
            "minItems": 1,
            "maxItems": 2,
            "uniqueItems": true,
            "default": [
              "scoring_complete"
            ]
          }
        },
        "required": [
          "url"
        ],
        "additionalProperties": false
      },
      "Webhook": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "active": {
            "type": "boolean"
          },
          "failure_count": {
            "type": "integer"
          },
          "last_triggered": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "url",
          "events",
          "active"
        ],
        "additionalProperties": true
      },
      "RegressionWatchInput": {
        "type": "object",
        "properties": {
          "model_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "model_provider": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "threshold": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1,
                "maximum": 50
              },
              {
                "type": "null"
              }
            ],
            "default": 5,
            "description": "Integer score-point decrease; omitted or null defaults to 5."
          }
        },
        "required": [
          "model_name",
          "model_provider"
        ],
        "additionalProperties": false
      },
      "RegressionWatch": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "model_name": {
            "type": "string"
          },
          "model_provider": {
            "type": "string"
          },
          "threshold": {
            "type": "integer"
          },
          "active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          }
        },
        "required": [
          "id",
          "model_name",
          "model_provider",
          "threshold"
        ],
        "additionalProperties": true
      },
      "Version": {
        "type": "object",
        "properties": {
          "api_version": {
            "type": "string"
          },
          "openapi_url": {
            "type": "string"
          },
          "api_capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "prompt_version": {
            "type": "string"
          },
          "last_updated": {
            "type": "string"
          },
          "scoring_method": {
            "type": "string"
          },
          "scoring_version": {
            "type": "string"
          },
          "panel_version": {
            "type": "string"
          },
          "scoring_config": {
            "$ref": "#/components/schemas/ScoringConfiguration"
          },
          "scoring_config_id": {
            "type": "string"
          },
          "calibration_status": {
            "type": "string"
          },
          "scoring_engine": {
            "type": "string"
          },
          "difficulties": {
            "type": "object",
            "properties": {
              "standard": {
                "type": "object",
                "properties": {
                  "prompts": {
                    "type": "integer"
                  }
                },
                "required": [
                  "prompts"
                ],
                "additionalProperties": true
              },
              "hard": {
                "type": "object",
                "properties": {
                  "prompts": {
                    "type": "integer"
                  }
                },
                "required": [
                  "prompts"
                ],
                "additionalProperties": true
              },
              "agi": {
                "type": "object",
                "properties": {
                  "prompts": {
                    "type": "integer"
                  }
                },
                "required": [
                  "prompts"
                ],
                "additionalProperties": true
              }
            },
            "additionalProperties": true
          }
        },
        "required": [
          "prompt_version",
          "scoring_version",
          "panel_version",
          "scoring_config",
          "scoring_config_id",
          "difficulties"
        ],
        "additionalProperties": true
      },
      "PromptDataset": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string"
          },
          "last_updated": {
            "type": "string"
          },
          "total_prompts": {
            "type": "integer"
          },
          "axes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "prompts": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "type": "string"
                      },
                      "turn": {
                        "type": "integer",
                        "minimum": 1,
                        "description": "Multi-turn conversation order. Turn 1 starts a new conversation within this dataset and axis."
                      },
                      "text": {
                        "type": "string"
                      },
                      "intent": {
                        "type": "string"
                      },
                      "rubric": {
                        "type": "object",
                        "description": "Present for independently scored prompts. No-rubric prompts are required setup or comparison context for dependent scored targets."
                      }
                    },
                    "required": [
                      "id",
                      "text"
                    ],
                    "additionalProperties": true
                  }
                }
              },
              "required": [
                "id",
                "prompts"
              ],
              "additionalProperties": true
            }
          }
        },
        "required": [
          "version",
          "axes"
        ],
        "additionalProperties": true
      }
    }
  }
}

