{
  "openapi": "3.1.0",
  "info": {
    "title": "CyberRXN API",
    "description": "Read-only access to the CyberRXN reaction knowledge base.\n\nAuthenticate with `Authorization: Bearer <token>`, where the token is an API key\n(`crx_live_…`, `crx_test_…`) or an OAuth access token. Every knowledge-base request is one\nmetered call. Live overage spends prepaid credits; sandbox keys have a separate free quota.\nSuccessful responses carry `X-CyberRXN-Usage: <used>/<included>` for the current\ncalendar month (UTC) and every response carries `X-Request-Id`. Errors are RFC 9457\n`application/problem+json`, with stable `code`, `retryable`, and `request_id` fields.\nWhen present, `retry_after_seconds` is the minimum delay before retrying. Credit or workspace\npolicy errors require an account change rather than automatic retries. MCP tool failures set\n`isError: true` and include the same problem in `structuredContent.error`; authentication\nand transport failures keep their HTTP status. Eleven read-only knowledge/chemistry actions are\navailable over MCP at `https://mcp.cyberrxn.com/mcp`. Hosted discovery exposes seventeen tools in total,\nincluding non-billable reports, contributions, status and central guide reads, plus stable read/write\ndispatchers whose target action retains its own billing. Reports and contributions remain subject\nto designated human review before modifying effective scientific evidence. Original evidence is\nimmutable; a changed record digest requires renewed review. The hosted Markdown guide and live\naction catalog remove the need to install client-side skill files.\n",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://api.cyberrxn.com",
      "description": "Production"
    }
  ],
  "paths": {
    "/v1/stats": {
      "get": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Corpus size and coverage",
        "operationId": "stats",
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Stats"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/reactions/search": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Search observations by structures and condition filters",
        "operationId": "search_reactions",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchReactionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationPage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/reactions/lookup": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Observations of the same canonical transformation",
        "operationId": "lookup_reaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LookupReactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LookupResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/observations/{observation_id}": {
      "get": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "One observation with provenance and checks",
        "operationId": "get_observation",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "title": "Observation Id"
            }
          },
          {
            "name": "include_raw",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Include Raw"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationDetail"
                }
              }
            },
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "408": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Timeout"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/observations/{observation_id}/graph": {
      "get": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Reaction, compound and condition nodes of one observation",
        "operationId": "graph",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "title": "Observation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Graph"
                }
              }
            },
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Payment Required"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "408": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Timeout"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/products/similar": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Reactions with structurally similar products",
        "operationId": "similar_products",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SimilarProductsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimilarProductsResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/molecules/reactions": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Observations where a molecule takes part",
        "operationId": "molecule_reactions",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MoleculeReactionsRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationPage"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/chemistry/validate": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Validate reaction records and complete atom conservation",
        "operationId": "validate_reaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ValidateReactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionValidationResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/chemistry/balance": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Balance supplied species or explicitly request optional SynRBL",
        "operationId": "balance_reaction",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BalanceReactionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionBalanceResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/chemistry/convert": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Readable chemical formulas, equations and optional InChI",
        "operationId": "convert_smiles",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConvertSmilesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SmilesConversionResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/chemistry/convert-representation": {
      "post": {
        "tags": [
          "Knowledge base"
        ],
        "summary": "Convert explicit molecular and reaction formats",
        "operationId": "convert_representation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConvertRepresentationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "headers": {
              "X-CyberRXN-Usage": {
                "description": "Calls used / included this calendar month (UTC), e.g. 1234/20000",
                "schema": {
                  "type": "string"
                }
              },
              "X-Request-Id": {
                "description": "Request identifier for support",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Environment": {
                "description": "live or test; sandbox counters are separate",
                "schema": {
                  "type": "string"
                }
              },
              "X-CyberRXN-Cost-MicroUSD": {
                "description": "Prepaid charge for this call in millionths of USD",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Limit": {
                "description": "Effective workspace Better Auth 60-second request limit",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Remaining requests in the current Better Auth minute counter",
                "schema": {
                  "type": "string"
                }
              },
              "X-RateLimit-Reset": {
                "description": "Unix seconds when the native Better Auth minute counter resets after inactivity",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RepresentationConversionResult"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "402": {
            "description": "Payment Required",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "408": {
            "description": "Request Timeout",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/me": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Signed-in user and account",
        "description": "Web-app session only. The account is the token's organization (Better Auth's active one).",
        "operationId": "get_me",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Me"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Calls in a billing period",
        "description": "Needs usage:read; readable with a web-app session, an API key or an OAuth token, for that credential's account. Member names and e-mails are included only for web-app sessions.",
        "operationId": "get_usage",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^\\d{4}-(0[1-9]|1[0-2])$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "YYYY-MM; defaults to the current month",
              "title": "Period"
            },
            "description": "YYYY-MM; defaults to the current month"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Usage"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          }
        }
      }
    },
    "/v1/limits": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Workspace spending policies",
        "description": "Signed-in session with limits:read or usage:read. All matching policies apply cumulatively.",
        "operationId": "get_spend_limits",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendLimitList"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Set or remove a scoped spending policy",
        "description": "Owners and admins with limits:manage only. Null means no cap; all null removes the policy. monthly_calls=0 blocks matching calls. A zero money cap blocks paid calls. Monthly periods use UTC.",
        "operationId": "set_spend_limit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SpendLimit"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SpendLimitList"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/key-limits": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "API key quotas and current usage windows",
        "description": "First-party session with apiKey:read or limits:read. Calendar days start at 00:00 UTC, weeks on Monday, months on their first day. Reserved calls count until success or refund; errors and non-billable operations do not consume a quota.",
        "operationId": "get_key_limits",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "key_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256
                },
                {
                  "type": "null"
                }
              ],
              "title": "Key Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyLimitList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          }
        }
      },
      "put": {
        "tags": [
          "Account"
        ],
        "summary": "Set or remove a key quota for a calendar or custom period",
        "description": "Owners/admins manage all keys; developers with apiKey:update can manage their own keys' self-imposed quotas, but cannot override an administrator's policy. All periods and workspace policies apply cumulatively. Calls=0 blocks calls; budget=0 blocks paid calls. Both caps=null removes this period only. Custom [starts_at,ends_at) blocks calls outside its active range; optional reset_interval_seconds creates anchored subwindows. No reset job or monetary grant is involved.",
        "operationId": "set_key_limit",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/KeyLimitInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KeyLimitList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          }
        }
      }
    },
    "/v1/rate-limit": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "Workspace request rate and latest increase request",
        "description": "Web session with usage:read or limits:read. Rolling windows cover REST, MCP and sandbox.",
        "operationId": "get_rate_limit",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/rate-limit-requests": {
      "post": {
        "tags": [
          "Account"
        ],
        "summary": "Ask an operator to approve a higher request rate",
        "description": "Owner/admin with limits:manage. One pending request per workspace; one submission per hour. Submitting a request does not change limits. Only an operator review can approve the override.",
        "operationId": "request_rate_limit_increase",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RateLimitIncrease"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitRequest"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/connections": {
      "get": {
        "tags": [
          "Account"
        ],
        "summary": "OAuth clients (ChatGPT, Claude, …) connected to this account",
        "description": "Web-app session only. Your own connections; with connection:manage, everyone's in the account.",
        "operationId": "list_connections",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionList"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/connections/{connection_id}": {
      "delete": {
        "tags": [
          "Account"
        ],
        "summary": "Disconnect an OAuth client",
        "description": "Immediately blocks current access tokens, revokes Better Auth refresh grants, and removes consent. Reconnecting requires fresh explicit consent.",
        "operationId": "revoke_connection",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "connection_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Connection Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Successful Response"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          }
        }
      }
    },
    "/v1/reports": {
      "post": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Report a source-backed observation issue",
        "description": "Non-billable; needs a verified workspace member with kb:query. The gateway captures an immutable original snapshot, stable source reference, dataset revision and record digest. Use the same idempotency key for the same finding. Reusing a key for different input is a 409. Include only the observation discrepancy and source evidence, never private user queries or secrets. A pending report does not modify any scientific data. Limited to 20 submissions per user/hour and 200 per workspace/hour; this is separate from billing and knowledge query limits.",
        "operationId": "report_observation_issue",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportSubmission"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationReport"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "List reports visible to this workspace or staff reviewer",
        "description": "Workspace-scoped by default. reviewer=true is restricted to verified designated CyberRXN staff and opens the cross-workspace review queue. Owners/admins are not staff reviewers.",
        "operationId": "list_observation_reports",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "pending",
                    "accepted",
                    "rejected",
                    "needs_information",
                    "needs_revalidation"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 10000,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "reviewer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Reviewer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationReportList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/reports/{report_id}": {
      "get": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Read one report and its review state",
        "description": "Workspace-scoped by default. reviewer=true requires designated verified staff and also returns original_record and append-only events. Ordinary reports omit the raw evidence snapshot.",
        "operationId": "get_observation_report",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          },
          {
            "name": "reviewer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Reviewer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationReport"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/reports/{report_id}/review": {
      "post": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Review a report and optionally approve a typed overlay",
        "description": "Verified web sessions whose user ID is explicitly configured in FEEDBACK_REVIEWERS only; workspace owner/admin roles, API keys and external OAuth clients cannot approve corrections. Acceptance rechecks the current trusted record digest and identity, requires a typed condition patch, and appends immutable history. A changed record returns 409 and needs_revalidation. Rejection and requests for more information do not alter the source record. Review requests are idempotent.",
        "operationId": "review_observation_report",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "report_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Report Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportReview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObservationReport"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/contributions": {
      "post": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Submit a source-backed reaction for human validation",
        "description": "Non-billable submission by a verified member with kb:query. Source attribution, shareable rights, a source quotation and idempotency key are required. The gateway runs free strict chemistry and novelty checks; machine validation does not establish source authenticity or experimental success. Eligible novel submissions may receive one bonus query call, and independently approved contributions ten additional calls. Rewards are not money. Content/source/reaction deduplication and daily reward limits prevent repeated grants. Pending or invalid chemistry never becomes a shared accepted fact. No user query, private context or secrets should be included. Limited separately to 10/user/hour and 100/workspace/hour. Source URLs are recorded for human review, never fetched automatically.",
        "operationId": "submit_reaction_contribution",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContributionSubmission"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionContribution"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      },
      "get": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "List this workspace's contributions",
        "description": "Workspace-scoped by default. reviewer=true opens the global queue only for designated verified CyberRXN staff. Accepted records are shared through authenticated knowledge queries.",
        "operationId": "list_reaction_contributions",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "pending",
                    "needs_review",
                    "accepted",
                    "rejected",
                    "duplicate"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "title": "Status"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "default": 20,
              "title": "Limit"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 10000,
              "minimum": 0,
              "default": 0,
              "title": "Offset"
            }
          },
          {
            "name": "reviewer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Reviewer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionContributionList"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/contributions/{contribution_id}": {
      "get": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Read one contribution and its validation/reward state",
        "description": "Workspace-scoped; designated staff may use reviewer=true to inspect original submission evidence and append-only review events. Pending submissions remain private to their workspace and staff.",
        "operationId": "get_reaction_contribution",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "contribution_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Contribution Id"
            }
          },
          {
            "name": "reviewer",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false,
              "title": "Reviewer"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionContribution"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/contributions/{contribution_id}/review": {
      "post": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Independently review a contribution for the shared corpus",
        "description": "Designated verified web-session staff only. Acceptance requires fresh valid strict chemistry, unchanged canonical reaction identity and explicit source_verified, license_verified and quality_approved. The domain publishes the accepted observation and grants any eligible validation bonus atomically and idempotently. Ordinary owners/admins, API keys and external MCP clients cannot approve contributions.",
        "operationId": "review_reaction_contribution",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "contribution_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Contribution Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContributionReview"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionContribution"
                }
              }
            }
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Not Found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Conflict"
          },
          "413": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Request Entity Too Large"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Unprocessable Entity"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "description": "Too Many Requests"
          },
          "502": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Bad Gateway"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            },
            "description": "Service Unavailable"
          }
        }
      }
    },
    "/v1/curation/export": {
      "get": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Export durable reviewed corrections and accepted contributions",
        "description": "Designated verified staff web sessions only. Returns a versioned manifest of corrections, accepted contribution evidence and current dataset provenance for corpus merges/retraining. The trusted review and reward ledgers remain authoritative; importing JSON must never bypass review or grant rewards. The endpoint rejects oversized manifests with 503 rather than silently truncating: at most 1000 entries per exported collection, 2 MiB source/event payload before expansion, and 8 MiB serialized output. Use a complete database backup when the bounded manifest is exceeded. Responses are private/no-store.",
        "operationId": "export_curation",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "additionalProperties": true,
                  "type": "object",
                  "title": "Response Export Curation"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/v1/skills/reaction-evidence": {
      "get": {
        "tags": [
          "Corpus feedback"
        ],
        "summary": "Read the current chemistry guide and live action schemas",
        "description": "Non-billable authenticated read. Returns canonical Markdown, version/digest and the bounded live action catalog used by stable read/write MCP dispatchers. If engine discovery is unavailable, the guide and hosted actions remain available with an explicit catalog_error; absence is not hidden. MCP also exposes the guide at cyberrxn://skills/reaction-evidence and through get_reaction_skill. Public Markdown is available without authentication at /skills/reaction-evidence.md. Clients may cache their connected tool definitions; the centrally updated guide/catalog plus stable dispatchers avoid requiring new client tool schemas for supported future actions.",
        "operationId": "get_reaction_skill",
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReactionSkillGuide"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "headers": {
              "WWW-Authenticate": {
                "description": "Bearer challenge with the OAuth protected-resource metadata URL",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "409": {
            "description": "Conflict",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "413": {
            "description": "Request Entity Too Large",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable Entity",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "headers": {
              "Retry-After": {
                "description": "Seconds to wait before retrying",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "502": {
            "description": "Bad Gateway",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "503": {
            "description": "Service Unavailable",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Account": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id",
            "description": "The Better Auth organization ID (a personal account in dev mode)."
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "plan": {
            "$ref": "#/components/schemas/PlanInfo"
          },
          "has_payment_method": {
            "type": "boolean",
            "title": "Has Payment Method"
          },
          "credit_balance_microusd": {
            "type": "integer",
            "title": "Credit Balance Microusd",
            "description": "Prepaid USD balance in millionths of a dollar."
          },
          "trial_eligible": {
            "type": "boolean",
            "title": "Trial Eligible",
            "description": "Whether this workspace owns its creator's free allowance."
          },
          "rate_limit_per_minute": {
            "type": "integer",
            "title": "Rate Limit Per Minute",
            "description": "Effective Better Auth 60-second request maximum, including any operator override."
          },
          "rate_limit_rpm_override": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rate Limit Rpm Override"
          },
          "members": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Members",
            "description": "Members of the organization; null if unknown."
          },
          "permissions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Permissions",
            "description": "What the caller may do in this account, e.g. kb:query."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "plan",
          "has_payment_method",
          "credit_balance_microusd",
          "trial_eligible",
          "rate_limit_per_minute",
          "rate_limit_rpm_override",
          "members",
          "permissions",
          "created_at"
        ],
        "title": "Account",
        "description": "A billing account: in production a Better Auth organization (personal or team)."
      },
      "AgentsCondition": {
        "properties": {
          "smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Smiles"
          },
          "solvent_label": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Solvent Label"
          },
          "catalysts": {
            "type": "null",
            "title": "Catalysts"
          },
          "roles_resolved": {
            "type": "boolean",
            "title": "Roles Resolved"
          },
          "status": {
            "type": "string",
            "enum": [
              "reported",
              "predicted",
              "unknown"
            ],
            "title": "Status"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "smiles",
          "solvent_label",
          "roles_resolved",
          "status"
        ],
        "title": "AgentsCondition"
      },
      "AtomConservation": {
        "properties": {
          "checked": {
            "type": "boolean",
            "title": "Checked"
          },
          "balanced": {
            "type": "boolean",
            "title": "Balanced"
          },
          "heavy_atoms_balanced": {
            "type": "boolean",
            "title": "Heavy Atoms Balanced"
          },
          "hydrogen_balanced": {
            "type": "boolean",
            "title": "Hydrogen Balanced"
          },
          "charge_balanced": {
            "type": "boolean",
            "title": "Charge Balanced"
          },
          "reactants": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Reactants"
          },
          "products": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Products"
          },
          "delta": {
            "additionalProperties": {
              "type": "integer"
            },
            "type": "object",
            "title": "Delta"
          },
          "delta_convention": {
            "type": "string",
            "const": "products_minus_reactants",
            "title": "Delta Convention"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "checked",
          "balanced",
          "heavy_atoms_balanced",
          "hydrogen_balanced",
          "charge_balanced",
          "reactants",
          "products",
          "delta",
          "delta_convention"
        ],
        "title": "AtomConservation"
      },
      "BalanceReactionRequest": {
        "properties": {
          "reaction_smiles": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Reaction Smiles"
          },
          "method": {
            "type": "string",
            "enum": [
              "coefficients",
              "synrbl"
            ],
            "title": "Method",
            "default": "coefficients"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "reaction_smiles"
        ],
        "title": "BalanceReactionRequest"
      },
      "Balancing": {
        "properties": {
          "solved": {
            "type": "boolean",
            "title": "Solved"
          },
          "method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Method"
          },
          "confidence": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confidence"
          },
          "confidence_calibrated": {
            "type": "boolean",
            "title": "Confidence Calibrated"
          },
          "equation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Equation"
          },
          "equation_evidence": {
            "type": "string",
            "title": "Equation Evidence"
          },
          "has_imputed_components": {
            "type": "boolean",
            "title": "Has Imputed Components"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "solved",
          "method",
          "confidence",
          "confidence_calibrated",
          "equation",
          "equation_evidence",
          "has_imputed_components"
        ],
        "title": "Balancing"
      },
      "CallLog": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "tool": {
            "type": "string",
            "title": "Tool"
          },
          "channel": {
            "type": "string",
            "enum": [
              "rest",
              "mcp"
            ],
            "title": "Channel"
          },
          "environment": {
            "type": "string",
            "enum": [
              "live",
              "test"
            ],
            "title": "Environment"
          },
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "credential_id": {
            "type": "string",
            "title": "Credential Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "reserved",
              "success",
              "error"
            ],
            "title": "Status"
          },
          "cost_microusd": {
            "type": "integer",
            "title": "Cost Microusd"
          },
          "latency_ms": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latency Ms"
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Error"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "created_at",
          "tool",
          "channel",
          "environment",
          "user_id",
          "credential_id",
          "status",
          "cost_microusd",
          "latency_ms",
          "error"
        ],
        "title": "CallLog"
      },
      "ChannelUsage": {
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "rest",
              "mcp"
            ],
            "title": "Channel"
          },
          "calls": {
            "type": "integer",
            "title": "Calls"
          }
        },
        "type": "object",
        "required": [
          "channel",
          "calls"
        ],
        "title": "ChannelUsage"
      },
      "ChemistryConditions": {
        "properties": {
          "temperature_c_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature C Min"
          },
          "temperature_c_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature C Max"
          },
          "ph": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ph"
          },
          "time_hours": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Time Hours"
          },
          "pressure_bar": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Pressure Bar"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ChemistryConditions"
      },
      "ChemistryIssue": {
        "properties": {
          "rule_id": {
            "type": "string",
            "title": "Rule Id"
          },
          "field": {
            "type": "string",
            "title": "Field"
          },
          "message": {
            "type": "string",
            "title": "Message"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "rule_id",
          "field",
          "message"
        ],
        "title": "ChemistryIssue"
      },
      "Conditions": {
        "properties": {
          "temperature": {
            "$ref": "#/components/schemas/TemperatureCondition"
          },
          "pressure": {
            "$ref": "#/components/schemas/PressureCondition"
          },
          "agents": {
            "$ref": "#/components/schemas/AgentsCondition"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "temperature",
          "pressure",
          "agents"
        ],
        "title": "Conditions"
      },
      "Connection": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "client_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Name",
            "description": "Known for the dev authorization server; with Better Auth, the web app shows the name from its consent list."
          },
          "client_uri": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Uri"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes"
          },
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "last_used_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Last Used At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "client_id",
          "client_name",
          "client_uri",
          "scopes",
          "user_id",
          "created_at",
          "last_used_at"
        ],
        "title": "Connection"
      },
      "ConnectionList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Connection"
            },
            "type": "array",
            "title": "Items"
          }
        },
        "type": "object",
        "required": [
          "items"
        ],
        "title": "ConnectionList"
      },
      "ConnectionUsage": {
        "properties": {
          "connection_id": {
            "type": "string",
            "title": "Connection Id"
          },
          "client_id": {
            "type": "string",
            "title": "Client Id"
          },
          "client_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client Name"
          },
          "calls": {
            "type": "integer",
            "title": "Calls"
          }
        },
        "type": "object",
        "required": [
          "connection_id",
          "client_id",
          "client_name",
          "calls"
        ],
        "title": "ConnectionUsage"
      },
      "ContributionConditions": {
        "properties": {
          "temperature_c": {
            "anyOf": [
              {
                "type": "number",
                "minimum": -273.15
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature C"
          },
          "pressure_bar": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Pressure Bar"
          },
          "agents_smiles": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Agents Smiles"
          },
          "solvent_label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Solvent Label"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "ContributionConditions"
      },
      "ContributionReview": {
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected",
              "needs_review"
            ],
            "title": "Decision"
          },
          "rationale": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 10,
            "title": "Rationale"
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "title": "Idempotency Key"
          },
          "source_verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source Verified"
          },
          "license_verified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "License Verified"
          },
          "quality_approved": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Quality Approved"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "decision",
          "rationale",
          "idempotency_key"
        ],
        "title": "ContributionReview"
      },
      "ContributionRewards": {
        "properties": {
          "receipt_calls": {
            "type": "integer",
            "minimum": 0,
            "title": "Receipt Calls",
            "description": "Granted bonus query calls for an eligible novel submission; not money."
          },
          "accepted_calls": {
            "type": "integer",
            "minimum": 0,
            "title": "Accepted Calls",
            "description": "Additional bonus query calls after independent human approval."
          },
          "total_calls": {
            "type": "integer",
            "minimum": 0,
            "title": "Total Calls"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "receipt_calls",
          "accepted_calls",
          "total_calls"
        ],
        "title": "ContributionRewards"
      },
      "ContributionSource": {
        "properties": {
          "url": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 8,
            "title": "Url",
            "description": "Public HTTPS source URL without embedded credentials."
          },
          "record_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Record Id"
          },
          "quote": {
            "type": "string",
            "maxLength": 4000,
            "minLength": 20,
            "title": "Quote"
          },
          "license": {
            "type": "string",
            "enum": [
              "CC0-1.0",
              "CC-BY-4.0",
              "public-domain",
              "permission-granted"
            ],
            "title": "License"
          },
          "license_url": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "minLength": 8
              },
              {
                "type": "null"
              }
            ],
            "title": "License Url"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "url",
          "record_id",
          "quote",
          "license"
        ],
        "title": "ContributionSource"
      },
      "ContributionSubmission": {
        "properties": {
          "reaction_smiles": {
            "type": "string",
            "maxLength": 100000,
            "minLength": 3,
            "title": "Reaction Smiles"
          },
          "source": {
            "$ref": "#/components/schemas/ContributionSource"
          },
          "conditions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContributionConditions"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 2000,
                "minLength": 10
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "title": "Idempotency Key"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "reaction_smiles",
          "source",
          "idempotency_key"
        ],
        "title": "ContributionSubmission"
      },
      "ContributionValidation": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid"
          },
          "result": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReactionValidationResult"
              },
              {
                "additionalProperties": true,
                "type": "object"
              }
            ],
            "title": "Result",
            "description": "Full verdict and processing provenance, or an explicit unavailable diagnostic/compact list payload."
          },
          "canonical_reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Reaction Smiles"
          },
          "corpus_novel": {
            "type": "boolean",
            "title": "Corpus Novel"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "valid",
          "result",
          "canonical_reaction_smiles",
          "corpus_novel"
        ],
        "title": "ContributionValidation"
      },
      "ConvertRepresentationRequest": {
        "properties": {
          "data": {
            "type": "string",
            "maxLength": 20000,
            "minLength": 1,
            "title": "Data"
          },
          "input_format": {
            "type": "string",
            "enum": [
              "smiles",
              "inchi",
              "mol",
              "sdf",
              "reaction_smiles",
              "rxn"
            ],
            "title": "Input Format"
          },
          "output_format": {
            "type": "string",
            "enum": [
              "smiles",
              "inchi",
              "inchikey",
              "mol",
              "mol_v3000",
              "sdf",
              "reaction_smiles",
              "rxn",
              "rxn_v3000",
              "formula",
              "unicode_formula"
            ],
            "title": "Output Format"
          },
          "allow_lossy": {
            "type": "boolean",
            "title": "Allow Lossy",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "data",
          "input_format",
          "output_format"
        ],
        "title": "ConvertRepresentationRequest"
      },
      "ConvertSmilesRequest": {
        "properties": {
          "smiles": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Smiles"
          },
          "include_inchi": {
            "type": "boolean",
            "title": "Include Inchi",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "smiles"
        ],
        "title": "ConvertSmilesRequest"
      },
      "ConvertedCompound": {
        "properties": {
          "smiles": {
            "type": "string",
            "title": "Smiles"
          },
          "coefficient": {
            "type": "integer",
            "minimum": 1,
            "title": "Coefficient"
          },
          "formula": {
            "type": "string",
            "title": "Formula"
          },
          "unicode_formula": {
            "type": "string",
            "title": "Unicode Formula"
          },
          "formal_charge": {
            "type": "integer",
            "title": "Formal Charge"
          },
          "inchi": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inchi"
          },
          "inchi_key": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inchi Key"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "smiles",
          "coefficient",
          "formula",
          "unicode_formula",
          "formal_charge",
          "inchi",
          "inchi_key"
        ],
        "title": "ConvertedCompound"
      },
      "ConvertedRepresentationRecord": {
        "properties": {
          "index": {
            "type": "integer",
            "title": "Index"
          },
          "role": {
            "type": "string",
            "enum": [
              "molecule",
              "reactant",
              "agent",
              "product"
            ],
            "title": "Role"
          },
          "output": {
            "type": "string",
            "title": "Output"
          },
          "output_format": {
            "type": "string",
            "enum": [
              "smiles",
              "inchi",
              "inchikey",
              "mol",
              "mol_v3000",
              "sdf",
              "reaction_smiles",
              "rxn",
              "rxn_v3000",
              "formula",
              "unicode_formula"
            ],
            "title": "Output Format"
          },
          "canonical_smiles": {
            "type": "string",
            "title": "Canonical Smiles"
          },
          "formula": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Formula"
          },
          "unicode_formula": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Unicode Formula"
          },
          "formal_charge": {
            "type": "integer",
            "title": "Formal Charge"
          },
          "atom_count": {
            "type": "integer",
            "title": "Atom Count"
          },
          "has_wildcards": {
            "type": "boolean",
            "title": "Has Wildcards"
          },
          "properties": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Properties"
          },
          "preservation": {
            "$ref": "#/components/schemas/RepresentationPreservation"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "index",
          "role",
          "output",
          "output_format",
          "canonical_smiles",
          "formula",
          "unicode_formula",
          "formal_charge",
          "atom_count",
          "has_wildcards",
          "properties",
          "preservation",
          "warnings"
        ],
        "title": "ConvertedRepresentationRecord"
      },
      "CorrectionPatch": {
        "properties": {
          "set": {
            "$ref": "#/components/schemas/CorrectionSet"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "set"
        ],
        "title": "CorrectionPatch"
      },
      "CorrectionSet": {
        "properties": {
          "conditions.temperature.value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions.Temperature.Value"
          },
          "conditions.temperature.min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions.Temperature.Min"
          },
          "conditions.temperature.max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions.Temperature.Max"
          },
          "conditions.temperature.status": {
            "type": "string",
            "enum": [
              "extracted",
              "predicted",
              "unknown"
            ],
            "title": "Conditions.Temperature.Status"
          },
          "conditions.pressure.value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions.Pressure.Value"
          },
          "conditions.pressure.kind": {
            "type": "string",
            "maxLength": 80,
            "title": "Conditions.Pressure.Kind"
          },
          "conditions.pressure.status": {
            "type": "string",
            "enum": [
              "extracted",
              "predicted",
              "unknown"
            ],
            "title": "Conditions.Pressure.Status"
          },
          "conditions.agents.smiles": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100000
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions.Agents.Smiles"
          },
          "conditions.agents.solvent_label": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Conditions.Agents.Solvent Label"
          },
          "conditions.agents.status": {
            "type": "string",
            "enum": [
              "reported",
              "predicted",
              "unknown"
            ],
            "title": "Conditions.Agents.Status"
          },
          "conditions.agents.roles_resolved": {
            "type": "boolean",
            "title": "Conditions.Agents.Roles Resolved"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "maxProperties": 16,
        "minProperties": 1,
        "title": "CorrectionSet",
        "description": "Explicit reviewed condition overrides. All other source and raw fields are immutable."
      },
      "CorrectionVersion": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "version": {
            "type": "integer",
            "title": "Version"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "id",
          "version"
        ],
        "title": "CorrectionVersion"
      },
      "DayUsage": {
        "properties": {
          "date": {
            "type": "string",
            "format": "date",
            "title": "Date"
          },
          "calls": {
            "type": "integer",
            "title": "Calls"
          }
        },
        "type": "object",
        "required": [
          "date",
          "calls"
        ],
        "title": "DayUsage"
      },
      "Evidence": {
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "patent_extraction",
              "model_prediction",
              "imported_record",
              "community_contribution"
            ],
            "title": "Kind"
          },
          "source_id": {
            "type": "string",
            "title": "Source Id"
          },
          "record_id": {
            "type": "string",
            "title": "Record Id"
          },
          "uid": {
            "title": "Uid"
          },
          "patent": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Patent"
          },
          "year": {
            "title": "Year"
          },
          "paragraph": {
            "title": "Paragraph"
          },
          "expert_confirmed": {
            "type": "boolean",
            "title": "Expert Confirmed"
          },
          "prediction": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prediction"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "kind",
          "source_id",
          "record_id",
          "expert_confirmed"
        ],
        "title": "Evidence"
      },
      "Graph": {
        "properties": {
          "observation_id": {
            "type": "string",
            "title": "Observation Id"
          },
          "nodes": {
            "items": {
              "$ref": "#/components/schemas/GraphNode"
            },
            "type": "array",
            "title": "Nodes"
          },
          "edges": {
            "items": {
              "$ref": "#/components/schemas/GraphEdge"
            },
            "type": "array",
            "title": "Edges"
          },
          "algorithmic_balance": {
            "$ref": "#/components/schemas/ImputedComponents"
          },
          "truncated": {
            "type": "boolean",
            "title": "Truncated"
          },
          "omitted_participations": {
            "type": "integer",
            "title": "Omitted Participations"
          },
          "node_limit": {
            "type": "integer",
            "title": "Node Limit"
          },
          "product_is_role_projection": {
            "type": "boolean",
            "title": "Product Is Role Projection"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "observation_id",
          "nodes",
          "edges",
          "algorithmic_balance",
          "truncated",
          "omitted_participations",
          "node_limit",
          "product_is_role_projection"
        ],
        "title": "Graph"
      },
      "GraphEdge": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source"
          },
          "target": {
            "type": "string",
            "title": "Target"
          },
          "type": {
            "type": "string",
            "title": "Type"
          },
          "role": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "coefficient": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coefficient"
          },
          "coefficient_basis": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Coefficient Basis"
          },
          "observation_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observation Id"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "source",
          "target",
          "type"
        ],
        "title": "GraphEdge"
      },
      "GraphNode": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "type": {
            "type": "string",
            "enum": [
              "Reaction",
              "Condition",
              "Compound"
            ],
            "title": "Type"
          },
          "smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Smiles"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "id",
          "type"
        ],
        "title": "GraphNode"
      },
      "ImputedComponents": {
        "properties": {
          "reactants": {
            "title": "Reactants"
          },
          "products": {
            "title": "Products"
          },
          "evidence_kind": {
            "type": "string",
            "title": "Evidence Kind"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "evidence_kind"
        ],
        "title": "ImputedComponents"
      },
      "KeyLimitInput": {
        "properties": {
          "key_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Key Id"
          },
          "period": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "custom"
            ],
            "title": "Period"
          },
          "calls": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Calls"
          },
          "budget_microusd": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Microusd"
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Custom active start, inclusive UTC ISO instant ending Z."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Custom active end, exclusive UTC ISO instant ending Z. Calls remain blocked after this instant until the policy is removed."
          },
          "reset_interval_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 31622400,
                "minimum": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Reset Interval Seconds",
            "description": "Custom bucket length anchored to starts_at; null means one fixed window. Calendar periods reject custom dates/intervals."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "key_id",
          "period",
          "calls",
          "budget_microusd"
        ],
        "title": "KeyLimitInput"
      },
      "KeyLimitList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/KeyLimitStatus"
            },
            "type": "array",
            "title": "Items"
          },
          "timezone": {
            "type": "string",
            "const": "UTC",
            "title": "Timezone"
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency"
          },
          "microusd_per_usd": {
            "type": "integer",
            "const": 1000000,
            "title": "Microusd Per Usd"
          }
        },
        "type": "object",
        "required": [
          "items",
          "timezone",
          "currency",
          "microusd_per_usd"
        ],
        "title": "KeyLimitList"
      },
      "KeyLimitStatus": {
        "properties": {
          "key_id": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Key Id"
          },
          "period": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly",
              "custom"
            ],
            "title": "Period"
          },
          "calls": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Calls"
          },
          "budget_microusd": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Budget Microusd"
          },
          "starts_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Starts At",
            "description": "Custom active start, inclusive UTC ISO instant ending Z."
          },
          "ends_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ends At",
            "description": "Custom active end, exclusive UTC ISO instant ending Z. Calls remain blocked after this instant until the policy is removed."
          },
          "reset_interval_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 31622400,
                "minimum": 60
              },
              {
                "type": "null"
              }
            ],
            "title": "Reset Interval Seconds",
            "description": "Custom bucket length anchored to starts_at; null means one fixed window. Calendar periods reject custom dates/intervals."
          },
          "window_start": {
            "type": "string",
            "title": "Window Start"
          },
          "window_end": {
            "type": "string",
            "title": "Window End"
          },
          "active": {
            "type": "boolean",
            "title": "Active"
          },
          "resets_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resets At"
          },
          "used_calls": {
            "type": "integer",
            "title": "Used Calls"
          },
          "used_budget_microusd": {
            "type": "integer",
            "title": "Used Budget Microusd"
          },
          "remaining_calls": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Calls"
          },
          "remaining_budget_microusd": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Remaining Budget Microusd"
          },
          "updated_by": {
            "type": "string",
            "title": "Updated By"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "can_manage": {
            "type": "boolean",
            "title": "Can Manage"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "key_id",
          "period",
          "calls",
          "budget_microusd",
          "window_start",
          "window_end",
          "active",
          "resets_at",
          "used_calls",
          "used_budget_microusd",
          "remaining_calls",
          "remaining_budget_microusd",
          "updated_by",
          "updated_at",
          "can_manage"
        ],
        "title": "KeyLimitStatus"
      },
      "KeyUsage": {
        "properties": {
          "key_id": {
            "type": "string",
            "title": "Key Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Null once the key has been deleted."
          },
          "prefix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Prefix",
            "description": "First characters of the key; null once it has been deleted."
          },
          "revoked": {
            "type": "boolean",
            "title": "Revoked",
            "description": "Deleted, disabled or expired."
          },
          "calls": {
            "type": "integer",
            "title": "Calls"
          }
        },
        "type": "object",
        "required": [
          "key_id",
          "name",
          "prefix",
          "revoked",
          "calls"
        ],
        "title": "KeyUsage"
      },
      "LookupReactionRequest": {
        "properties": {
          "reaction_smiles": {
            "type": "string",
            "maxLength": 30000,
            "minLength": 1,
            "title": "Reaction Smiles",
            "description": "Reaction SMILES; agents are not part of the identity."
          },
          "limit": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "description": "Maximum records, from 1 to 100.",
            "default": 10
          },
          "offset": {
            "type": "integer",
            "maximum": 1000000,
            "minimum": 0,
            "title": "Offset",
            "description": "Zero-based pagination offset.",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "reaction_smiles"
        ],
        "title": "LookupReactionRequest"
      },
      "LookupResult": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Observation"
            },
            "type": "array",
            "title": "Items"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "next_offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Offset"
          },
          "match": {
            "type": "string",
            "const": "exact_original_transformation",
            "title": "Match"
          },
          "agents_used_in_identity": {
            "type": "boolean",
            "title": "Agents Used In Identity"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "items",
          "limit",
          "offset",
          "has_more",
          "next_offset",
          "match",
          "agents_used_in_identity"
        ],
        "title": "LookupResult"
      },
      "Me": {
        "properties": {
          "user": {
            "$ref": "#/components/schemas/User"
          },
          "account": {
            "$ref": "#/components/schemas/Account",
            "description": "The account the token acts on: the active organization."
          }
        },
        "type": "object",
        "required": [
          "user",
          "account"
        ],
        "title": "Me"
      },
      "MoleculeReactionsRequest": {
        "properties": {
          "smiles": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Smiles",
            "description": "One molecule (no dots)."
          },
          "role": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "reactant",
                  "product",
                  "agent"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Role"
          },
          "limit": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "description": "Maximum records, from 1 to 100.",
            "default": 10
          },
          "offset": {
            "type": "integer",
            "maximum": 1000000,
            "minimum": 0,
            "title": "Offset",
            "description": "Zero-based pagination offset.",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "smiles"
        ],
        "title": "MoleculeReactionsRequest"
      },
      "Observation": {
        "properties": {
          "dataset_revision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Revision",
            "description": "Immutable corpus snapshot revision."
          },
          "record_digest": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Record Digest",
            "description": "SHA-256 of source-record and normalized scientific semantics; stable across corpus appends."
          },
          "observation_id": {
            "type": "string",
            "title": "Observation Id"
          },
          "reaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reaction Id"
          },
          "reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reaction Smiles"
          },
          "conditions": {
            "$ref": "#/components/schemas/Conditions"
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          },
          "validation": {
            "$ref": "#/components/schemas/Validation"
          },
          "balancing": {
            "$ref": "#/components/schemas/Balancing"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "observation_id",
          "reaction_id",
          "reaction_smiles",
          "conditions",
          "evidence",
          "validation",
          "balancing"
        ],
        "title": "Observation"
      },
      "ObservationDetail": {
        "properties": {
          "dataset_revision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Revision",
            "description": "Immutable corpus snapshot revision."
          },
          "record_digest": {
            "anyOf": [
              {
                "type": "string",
                "pattern": "^[a-f0-9]{64}$"
              },
              {
                "type": "null"
              }
            ],
            "title": "Record Digest",
            "description": "SHA-256 of source-record and normalized scientific semantics; stable across corpus appends."
          },
          "observation_id": {
            "type": "string",
            "title": "Observation Id"
          },
          "reaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reaction Id"
          },
          "reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reaction Smiles"
          },
          "conditions": {
            "$ref": "#/components/schemas/Conditions"
          },
          "evidence": {
            "$ref": "#/components/schemas/Evidence"
          },
          "validation": {
            "$ref": "#/components/schemas/Validation"
          },
          "balancing": {
            "$ref": "#/components/schemas/Balancing"
          },
          "original_reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Original Reaction Smiles"
          },
          "rebalanced_reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Rebalanced Reaction Smiles"
          },
          "imputed_components": {
            "$ref": "#/components/schemas/ImputedComponents"
          },
          "source": {
            "$ref": "#/components/schemas/Source"
          },
          "paragraph_text": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Paragraph Text"
          },
          "raw_metadata": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Raw Metadata",
            "description": "Only with include_raw=true."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "observation_id",
          "reaction_id",
          "reaction_smiles",
          "conditions",
          "evidence",
          "validation",
          "balancing",
          "original_reaction_smiles",
          "rebalanced_reaction_smiles",
          "imputed_components",
          "source",
          "paragraph_text"
        ],
        "title": "ObservationDetail"
      },
      "ObservationPage": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Observation"
            },
            "type": "array",
            "title": "Items"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          },
          "has_more": {
            "type": "boolean",
            "title": "Has More"
          },
          "next_offset": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Offset"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "items",
          "limit",
          "offset",
          "has_more",
          "next_offset"
        ],
        "title": "ObservationPage"
      },
      "ObservationReport": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "observation_id": {
            "type": "string",
            "title": "Observation Id"
          },
          "category": {
            "type": "string",
            "enum": [
              "field_conflict",
              "stage_misattribution",
              "missing_source",
              "structure_mismatch",
              "other"
            ],
            "title": "Category"
          },
          "summary": {
            "type": "string",
            "title": "Summary"
          },
          "evidence_quote": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Quote"
          },
          "proposed_patch": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CorrectionPatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "accepted",
              "rejected",
              "needs_information",
              "needs_revalidation"
            ],
            "title": "State"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "reference": {
            "$ref": "#/components/schemas/ReportReference"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewedDecision"
              },
              {
                "type": "null"
              }
            ]
          },
          "correction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CorrectionVersion"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "id",
          "observation_id",
          "category",
          "summary",
          "state",
          "created_at",
          "updated_at",
          "reference"
        ],
        "title": "ObservationReport"
      },
      "ObservationReportList": {
        "properties": {
          "reports": {
            "items": {
              "$ref": "#/components/schemas/ObservationReport"
            },
            "type": "array",
            "title": "Reports"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "reports",
          "total",
          "limit",
          "offset"
        ],
        "title": "ObservationReportList"
      },
      "PlanInfo": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "name": {
            "type": "string",
            "title": "Name"
          },
          "price_monthly_usd": {
            "type": "number",
            "title": "Price Monthly Usd"
          },
          "included_calls": {
            "type": "integer",
            "title": "Included Calls"
          },
          "overage_usd_per_1000": {
            "type": "number",
            "title": "Overage Usd Per 1000"
          },
          "members_included": {
            "type": "integer",
            "title": "Members Included"
          },
          "extra_member_usd": {
            "type": "number",
            "title": "Extra Member Usd"
          },
          "requires_payment_method_for_overage": {
            "type": "boolean",
            "title": "Requires Payment Method For Overage"
          },
          "rate_limit_per_minute": {
            "type": "integer",
            "title": "Rate Limit Per Minute"
          }
        },
        "type": "object",
        "required": [
          "id",
          "name",
          "price_monthly_usd",
          "included_calls",
          "overage_usd_per_1000",
          "members_included",
          "extra_member_usd",
          "requires_payment_method_for_overage",
          "rate_limit_per_minute"
        ],
        "title": "PlanInfo"
      },
      "PressureCondition": {
        "properties": {
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "unit": {
            "type": "string",
            "const": "bar",
            "title": "Unit"
          },
          "kind": {
            "type": "string",
            "title": "Kind"
          },
          "status": {
            "type": "string",
            "enum": [
              "extracted",
              "predicted",
              "unknown"
            ],
            "title": "Status"
          },
          "raw": {
            "title": "Raw"
          },
          "predicted_bin": {
            "title": "Predicted Bin"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "value",
          "unit",
          "kind",
          "status"
        ],
        "title": "PressureCondition"
      },
      "ProblemDetails": {
        "properties": {
          "type": {
            "type": "string",
            "title": "Type"
          },
          "title": {
            "type": "string",
            "title": "Title"
          },
          "status": {
            "type": "integer",
            "title": "Status"
          },
          "detail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detail"
          },
          "code": {
            "type": "string",
            "enum": [
              "bad_request",
              "unauthorized",
              "credits_exhausted",
              "sandbox_quota_exhausted",
              "permission_denied",
              "not_found",
              "method_not_allowed",
              "request_timeout",
              "conflict",
              "content_too_large",
              "validation_error",
              "invalid_smiles",
              "request_rate_limited",
              "workspace_limit_reached",
              "key_limit_reached",
              "internal_error",
              "upstream_invalid_response",
              "service_unavailable",
              "upstream_unavailable",
              "payment_processing",
              "billing_unavailable",
              "similarity_index_unavailable",
              "knowledge_base_unavailable",
              "tool_not_found"
            ],
            "title": "Code",
            "description": "Stable machine-readable error code; use it instead of parsing English messages."
          },
          "retryable": {
            "type": "boolean",
            "title": "Retryable",
            "description": "Whether retrying this request without changing its inputs can succeed."
          },
          "request_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Request Id",
            "description": "Support identifier, also returned in X-Request-Id."
          },
          "retry_after_seconds": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Retry After Seconds",
            "description": "Minimum retry delay when provided."
          },
          "billing_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Billing Url",
            "description": "Credit management URL for quota errors."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "type",
          "title",
          "status",
          "code",
          "retryable"
        ],
        "title": "ProblemDetails",
        "description": "RFC 9457 problem details (``application/problem+json``)."
      },
      "RateLimitIncrease": {
        "properties": {
          "requested_rpm": {
            "type": "integer",
            "maximum": 1000000,
            "minimum": 1,
            "title": "Requested Rpm",
            "description": "Must exceed the current effective rate."
          },
          "reason": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 10,
            "title": "Reason"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "requested_rpm",
          "reason"
        ],
        "title": "RateLimitIncrease"
      },
      "RateLimitInfo": {
        "properties": {
          "limiter": {
            "type": "string",
            "const": "better-auth",
            "title": "Limiter"
          },
          "window_behavior": {
            "type": "string",
            "const": "inactivity",
            "title": "Window Behavior"
          },
          "plan_rpm": {
            "type": "integer",
            "title": "Plan Rpm"
          },
          "effective_rpm": {
            "type": "integer",
            "title": "Effective Rpm"
          },
          "override_rpm": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Override Rpm"
          },
          "window_seconds": {
            "type": "integer",
            "const": 60,
            "title": "Window Seconds"
          },
          "burst_limit": {
            "type": "integer",
            "title": "Burst Limit"
          },
          "burst_window_seconds": {
            "type": "integer",
            "const": 10,
            "title": "Burst Window Seconds"
          },
          "latest_request": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/RateLimitRequest"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "limiter",
          "window_behavior",
          "plan_rpm",
          "effective_rpm",
          "override_rpm",
          "window_seconds",
          "burst_limit",
          "burst_window_seconds",
          "latest_request"
        ],
        "title": "RateLimitInfo"
      },
      "RateLimitRequest": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "requested_rpm": {
            "type": "integer",
            "title": "Requested Rpm"
          },
          "reason": {
            "type": "string",
            "title": "Reason"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "rejected"
            ],
            "title": "Status"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          },
          "reviewed_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reviewed At"
          },
          "review_note": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Review Note"
          }
        },
        "type": "object",
        "required": [
          "id",
          "requested_rpm",
          "reason",
          "status",
          "created_at",
          "reviewed_at",
          "review_note"
        ],
        "title": "RateLimitRequest"
      },
      "ReactionActionDefinition": {
        "properties": {
          "name": {
            "type": "string",
            "title": "Name"
          },
          "description": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "inputSchema": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Inputschema"
          },
          "annotations": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Annotations"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "name"
        ],
        "title": "ReactionActionDefinition"
      },
      "ReactionBalanceResult": {
        "properties": {
          "method": {
            "type": "string",
            "enum": [
              "coefficients",
              "synrbl"
            ],
            "title": "Method"
          },
          "status": {
            "type": "string",
            "enum": [
              "invalid",
              "already_balanced",
              "balanced",
              "unsolved",
              "ambiguous",
              "limit_exceeded"
            ],
            "title": "Status"
          },
          "solved": {
            "type": "boolean",
            "title": "Solved"
          },
          "original_reaction_smiles": {
            "type": "string",
            "title": "Original Reaction Smiles"
          },
          "balanced_reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Balanced Reaction Smiles"
          },
          "reactant_coefficients": {
            "items": {
              "$ref": "#/components/schemas/ReactionCoefficient"
            },
            "type": "array",
            "title": "Reactant Coefficients"
          },
          "product_coefficients": {
            "items": {
              "$ref": "#/components/schemas/ReactionCoefficient"
            },
            "type": "array",
            "title": "Product Coefficients"
          },
          "imputed_species": {
            "type": "boolean",
            "title": "Imputed Species"
          },
          "imputed_reactants": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imputed Reactants"
          },
          "imputed_products": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Imputed Products"
          },
          "model_diagnostics": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Diagnostics"
          },
          "validation": {
            "$ref": "#/components/schemas/ReactionValidationResult"
          },
          "limitations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Limitations"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "method",
          "status",
          "solved",
          "original_reaction_smiles",
          "balanced_reaction_smiles",
          "reactant_coefficients",
          "product_coefficients",
          "imputed_species",
          "validation",
          "limitations"
        ],
        "title": "ReactionBalanceResult"
      },
      "ReactionCoefficient": {
        "properties": {
          "smiles": {
            "type": "string",
            "title": "Smiles"
          },
          "coefficient": {
            "type": "integer",
            "minimum": 1,
            "title": "Coefficient"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "smiles",
          "coefficient"
        ],
        "title": "ReactionCoefficient"
      },
      "ReactionContribution": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "observation_id": {
            "type": "string",
            "title": "Observation Id"
          },
          "reaction_smiles": {
            "type": "string",
            "title": "Reaction Smiles"
          },
          "canonical_reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Reaction Smiles"
          },
          "source": {
            "$ref": "#/components/schemas/ContributionSource"
          },
          "conditions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ContributionConditions"
              },
              {
                "type": "null"
              }
            ]
          },
          "summary": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Summary"
          },
          "state": {
            "type": "string",
            "enum": [
              "pending",
              "needs_review",
              "accepted",
              "rejected",
              "duplicate"
            ],
            "title": "State"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "validation": {
            "$ref": "#/components/schemas/ContributionValidation"
          },
          "rewards": {
            "$ref": "#/components/schemas/ContributionRewards"
          },
          "review": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ReviewedDecision"
              },
              {
                "type": "null"
              }
            ]
          },
          "duplicate_of": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Duplicate Of"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "id",
          "observation_id",
          "reaction_smiles",
          "canonical_reaction_smiles",
          "source",
          "state",
          "created_at",
          "updated_at",
          "validation",
          "rewards"
        ],
        "title": "ReactionContribution"
      },
      "ReactionContributionList": {
        "properties": {
          "contributions": {
            "items": {
              "$ref": "#/components/schemas/ReactionContribution"
            },
            "type": "array",
            "title": "Contributions"
          },
          "total": {
            "type": "integer",
            "title": "Total"
          },
          "limit": {
            "type": "integer",
            "title": "Limit"
          },
          "offset": {
            "type": "integer",
            "title": "Offset"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "contributions",
          "total",
          "limit",
          "offset"
        ],
        "title": "ReactionContributionList"
      },
      "ReactionSkillGuide": {
        "properties": {
          "version": {
            "type": "string",
            "title": "Version"
          },
          "digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "title": "Digest"
          },
          "uri": {
            "type": "string",
            "const": "cyberrxn://skills/reaction-evidence",
            "title": "Uri"
          },
          "markdown": {
            "type": "string",
            "title": "Markdown"
          },
          "action_catalog": {
            "items": {
              "$ref": "#/components/schemas/ReactionActionDefinition"
            },
            "type": "array",
            "title": "Action Catalog"
          },
          "catalog_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "title": "Catalog Digest"
          },
          "engine_catalog_available": {
            "type": "boolean",
            "title": "Engine Catalog Available"
          },
          "catalog_error": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ProblemDetails"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "version",
          "digest",
          "uri",
          "markdown",
          "action_catalog",
          "catalog_digest",
          "engine_catalog_available"
        ],
        "title": "ReactionSkillGuide"
      },
      "ReactionValidationResult": {
        "properties": {
          "valid": {
            "type": "boolean",
            "title": "Valid"
          },
          "mode": {
            "type": "string",
            "enum": [
              "strict",
              "training"
            ],
            "title": "Mode"
          },
          "reaction_smiles": {
            "type": "string",
            "title": "Reaction Smiles"
          },
          "canonical_reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Reaction Smiles"
          },
          "identity_transformation": {
            "type": "boolean",
            "title": "Identity Transformation"
          },
          "include_agents_in_balance": {
            "type": "boolean",
            "title": "Include Agents In Balance"
          },
          "validator": {
            "$ref": "#/components/schemas/ValidatorVerdict"
          },
          "atom_balance": {
            "$ref": "#/components/schemas/AtomConservation"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ChemistryIssue"
            },
            "type": "array",
            "title": "Errors"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/ChemistryIssue"
            },
            "type": "array",
            "title": "Warnings"
          },
          "limitations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Limitations"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "valid",
          "mode",
          "reaction_smiles",
          "canonical_reaction_smiles",
          "identity_transformation",
          "include_agents_in_balance",
          "validator",
          "atom_balance",
          "errors",
          "warnings",
          "limitations"
        ],
        "title": "ReactionValidationResult"
      },
      "ReportReference": {
        "properties": {
          "observation_id": {
            "type": "string",
            "title": "Observation Id"
          },
          "source_id": {
            "type": "string",
            "title": "Source Id"
          },
          "record_id": {
            "type": "string",
            "title": "Record Id"
          },
          "uid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Uid"
          },
          "reaction_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reaction Id"
          },
          "dataset_revision": {
            "type": "string",
            "title": "Dataset Revision"
          },
          "base_record_digest": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$",
            "title": "Base Record Digest"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "observation_id",
          "source_id",
          "record_id",
          "dataset_revision",
          "base_record_digest"
        ],
        "title": "ReportReference"
      },
      "ReportReview": {
        "properties": {
          "decision": {
            "type": "string",
            "enum": [
              "accepted",
              "rejected",
              "needs_information"
            ],
            "title": "Decision"
          },
          "rationale": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 10,
            "title": "Rationale"
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "title": "Idempotency Key"
          },
          "patch": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CorrectionPatch"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "decision",
          "rationale",
          "idempotency_key"
        ],
        "title": "ReportReview"
      },
      "ReportSubmission": {
        "properties": {
          "observation_id": {
            "type": "string",
            "maxLength": 200,
            "minLength": 1,
            "title": "Observation Id"
          },
          "category": {
            "type": "string",
            "enum": [
              "field_conflict",
              "stage_misattribution",
              "missing_source",
              "structure_mismatch",
              "other"
            ],
            "title": "Category"
          },
          "summary": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 10,
            "title": "Summary",
            "description": "Only the observed record issue; no user query or private context."
          },
          "evidence_quote": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Evidence Quote"
          },
          "proposed_patch": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/CorrectionPatch"
              },
              {
                "type": "null"
              }
            ]
          },
          "idempotency_key": {
            "type": "string",
            "maxLength": 128,
            "minLength": 8,
            "pattern": "^[A-Za-z0-9_.:-]+$",
            "title": "Idempotency Key"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "observation_id",
          "category",
          "summary",
          "idempotency_key"
        ],
        "title": "ReportSubmission"
      },
      "RepresentationConversionResult": {
        "properties": {
          "input_format": {
            "type": "string",
            "enum": [
              "smiles",
              "inchi",
              "mol",
              "sdf",
              "reaction_smiles",
              "rxn"
            ],
            "title": "Input Format"
          },
          "output_format": {
            "type": "string",
            "enum": [
              "smiles",
              "inchi",
              "inchikey",
              "mol",
              "mol_v3000",
              "sdf",
              "reaction_smiles",
              "rxn",
              "rxn_v3000",
              "formula",
              "unicode_formula"
            ],
            "title": "Output Format"
          },
          "kind": {
            "type": "string",
            "enum": [
              "molecule",
              "molecule_collection",
              "reaction"
            ],
            "title": "Kind"
          },
          "record_count": {
            "type": "integer",
            "title": "Record Count"
          },
          "output": {
            "type": "string",
            "title": "Output"
          },
          "records": {
            "items": {
              "$ref": "#/components/schemas/ConvertedRepresentationRecord"
            },
            "type": "array",
            "title": "Records"
          },
          "canonical_reaction_smiles": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Canonical Reaction Smiles"
          },
          "lossy": {
            "type": "boolean",
            "title": "Lossy"
          },
          "warnings": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Warnings"
          },
          "limitations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Limitations"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "input_format",
          "output_format",
          "kind",
          "record_count",
          "output",
          "records",
          "canonical_reaction_smiles",
          "lossy",
          "warnings",
          "limitations"
        ],
        "title": "RepresentationConversionResult"
      },
      "RepresentationPreservation": {
        "properties": {
          "molecular_graph": {
            "type": "boolean",
            "title": "Molecular Graph"
          },
          "stereochemistry": {
            "type": "boolean",
            "title": "Stereochemistry"
          },
          "isotopes": {
            "type": "boolean",
            "title": "Isotopes"
          },
          "formal_charge": {
            "type": "boolean",
            "title": "Formal Charge"
          },
          "atom_mapping": {
            "type": "boolean",
            "title": "Atom Mapping"
          },
          "properties": {
            "type": "boolean",
            "title": "Properties"
          },
          "coordinates": {
            "type": "boolean",
            "title": "Coordinates"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "molecular_graph",
          "stereochemistry",
          "isotopes",
          "formal_charge",
          "atom_mapping",
          "properties",
          "coordinates"
        ],
        "title": "RepresentationPreservation"
      },
      "ReviewedDecision": {
        "properties": {
          "decision": {
            "type": "string",
            "title": "Decision"
          },
          "rationale": {
            "type": "string",
            "title": "Rationale"
          },
          "reviewed_by": {
            "type": "string",
            "title": "Reviewed By"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "decision",
          "rationale",
          "reviewed_by",
          "created_at"
        ],
        "title": "ReviewedDecision"
      },
      "SearchReactionsRequest": {
        "properties": {
          "reactants": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Reactants",
            "description": "Complete dot-separated reactant side (SMILES)."
          },
          "products": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Products",
            "description": "Complete dot-separated product side (SMILES)."
          },
          "temperature_min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Min",
            "description": "°C; matches overlapping intervals."
          },
          "temperature_max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Temperature Max",
            "description": "°C; matches overlapping intervals."
          },
          "pressure_min": {
            "anyOf": [
              {
                "type": "number",
                "description": "Pressure in bar; negative bounds require an explicit gauge pressure_kind."
              },
              {
                "type": "null"
              }
            ],
            "title": "Pressure Min"
          },
          "pressure_max": {
            "anyOf": [
              {
                "type": "number",
                "description": "Pressure in bar; negative bounds require an explicit gauge pressure_kind."
              },
              {
                "type": "null"
              }
            ],
            "title": "Pressure Max"
          },
          "pressure_kind": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 100,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Pressure Kind",
            "description": "Source pressure label, e.g. absolute or gauge."
          },
          "agent": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 10000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Agent",
            "description": "Agent SMILES; every molecule must be present."
          },
          "solvent": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1000,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Solvent",
            "description": "Exact source solvent label."
          },
          "min_balance_confidence": {
            "anyOf": [
              {
                "type": "number",
                "maximum": 1,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Min Balance Confidence",
            "description": "Upstream, uncalibrated SynRBL score."
          },
          "validated_only": {
            "type": "boolean",
            "title": "Validated Only",
            "description": "Only observations with a positive upstream verdict.",
            "default": true
          },
          "limit": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "description": "Maximum records, from 1 to 100.",
            "default": 10
          },
          "offset": {
            "type": "integer",
            "maximum": 1000000,
            "minimum": 0,
            "title": "Offset",
            "description": "Zero-based pagination offset.",
            "default": 0
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "SearchReactionsRequest"
      },
      "SimilarProduct": {
        "properties": {
          "products": {
            "type": "string",
            "title": "Products"
          },
          "similarity": {
            "type": "number",
            "title": "Similarity"
          },
          "examples": {
            "items": {
              "$ref": "#/components/schemas/Observation"
            },
            "type": "array",
            "title": "Examples",
            "description": "Up to three observations for this product set."
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "products",
          "similarity",
          "examples"
        ],
        "title": "SimilarProduct"
      },
      "SimilarProductsRequest": {
        "properties": {
          "smiles": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Smiles",
            "description": "Product set (SMILES) to compare by Morgan/Tanimoto similarity."
          },
          "threshold": {
            "type": "number",
            "maximum": 1,
            "minimum": 0.05,
            "title": "Threshold",
            "default": 0.5
          },
          "limit": {
            "type": "integer",
            "maximum": 100,
            "minimum": 1,
            "title": "Limit",
            "description": "Maximum records, from 1 to 100.",
            "default": 10
          },
          "validated_only": {
            "type": "boolean",
            "title": "Validated Only",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "smiles"
        ],
        "title": "SimilarProductsRequest"
      },
      "SimilarProductsResult": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SimilarProduct"
            },
            "type": "array",
            "title": "Items"
          },
          "metric": {
            "type": "string",
            "const": "Tanimoto",
            "title": "Metric"
          },
          "fingerprint": {
            "type": "string",
            "title": "Fingerprint"
          },
          "threshold": {
            "type": "number",
            "title": "Threshold"
          },
          "scanned_candidates": {
            "type": "integer",
            "title": "Scanned Candidates"
          },
          "search_is_exact_over_fingerprints": {
            "type": "boolean",
            "title": "Search Is Exact Over Fingerprints"
          },
          "is_reaction_prediction": {
            "type": "boolean",
            "title": "Is Reaction Prediction"
          },
          "limitation": {
            "type": "string",
            "title": "Limitation"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "items",
          "metric",
          "fingerprint",
          "threshold",
          "scanned_candidates",
          "search_is_exact_over_fingerprints",
          "is_reaction_prediction",
          "limitation"
        ],
        "title": "SimilarProductsResult"
      },
      "SmilesConversionResult": {
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "molecule",
              "reaction"
            ],
            "title": "Kind"
          },
          "original_smiles": {
            "type": "string",
            "title": "Original Smiles"
          },
          "canonical_smiles": {
            "type": "string",
            "title": "Canonical Smiles"
          },
          "ascii": {
            "type": "string",
            "title": "Ascii"
          },
          "unicode": {
            "type": "string",
            "title": "Unicode"
          },
          "molecules": {
            "items": {
              "$ref": "#/components/schemas/ConvertedCompound"
            },
            "type": "array",
            "title": "Molecules"
          },
          "reactants": {
            "items": {
              "$ref": "#/components/schemas/ConvertedCompound"
            },
            "type": "array",
            "title": "Reactants"
          },
          "agents": {
            "items": {
              "$ref": "#/components/schemas/ConvertedCompound"
            },
            "type": "array",
            "title": "Agents"
          },
          "products": {
            "items": {
              "$ref": "#/components/schemas/ConvertedCompound"
            },
            "type": "array",
            "title": "Products"
          },
          "atom_balance": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AtomConservation"
              },
              {
                "type": "null"
              }
            ]
          },
          "lossy_formula_display": {
            "type": "boolean",
            "const": true,
            "title": "Lossy Formula Display"
          },
          "limitations": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Limitations"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "kind",
          "original_smiles",
          "canonical_smiles",
          "ascii",
          "unicode",
          "molecules",
          "reactants",
          "agents",
          "products",
          "atom_balance",
          "lossy_formula_display",
          "limitations"
        ],
        "title": "SmilesConversionResult"
      },
      "Source": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "path": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Path",
            "description": "Source report file name when present; public-URL community sources have no ingest path."
          },
          "sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sha256"
          },
          "row_count": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Row Count"
          },
          "metadata": {
            "additionalProperties": true,
            "type": "object",
            "title": "Metadata"
          },
          "url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Url"
          },
          "license": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "License"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "id",
          "metadata"
        ],
        "title": "Source"
      },
      "SpendLimit": {
        "properties": {
          "scope": {
            "type": "string",
            "enum": [
              "workspace",
              "member",
              "key",
              "client"
            ],
            "title": "Scope"
          },
          "subject_id": {
            "type": "string",
            "title": "Subject Id",
            "description": "Empty for workspace; otherwise user ID, key ID or OAuth client ID."
          },
          "monthly_calls": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Calls"
          },
          "monthly_budget_microusd": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Monthly Budget Microusd"
          },
          "max_call_microusd": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9007199254740991,
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Max Call Microusd"
          }
        },
        "type": "object",
        "required": [
          "scope",
          "subject_id",
          "monthly_calls",
          "monthly_budget_microusd",
          "max_call_microusd"
        ],
        "title": "SpendLimit"
      },
      "SpendLimitList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/SpendLimit"
            },
            "type": "array",
            "title": "Items"
          },
          "currency": {
            "type": "string",
            "const": "USD",
            "title": "Currency"
          },
          "microusd_per_usd": {
            "type": "integer",
            "const": 1000000,
            "title": "Microusd Per Usd"
          }
        },
        "type": "object",
        "required": [
          "items",
          "currency",
          "microusd_per_usd"
        ],
        "title": "SpendLimitList"
      },
      "Stats": {
        "properties": {
          "dataset_revision": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Dataset Revision"
          },
          "observations": {
            "type": "integer",
            "title": "Observations"
          },
          "reactions": {
            "type": "integer",
            "title": "Reactions"
          },
          "quarantined": {
            "type": "integer",
            "title": "Quarantined"
          },
          "upstream_valid": {
            "type": "integer",
            "title": "Upstream Valid"
          },
          "with_temperature": {
            "type": "integer",
            "title": "With Temperature"
          },
          "with_pressure": {
            "type": "integer",
            "title": "With Pressure"
          },
          "with_agents": {
            "type": "integer",
            "title": "With Agents"
          },
          "with_all_three": {
            "type": "integer",
            "title": "With All Three"
          },
          "schema_version": {
            "type": "integer",
            "title": "Schema Version"
          },
          "units": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Units"
          },
          "expert_confirmed": {
            "type": "integer",
            "title": "Expert Confirmed"
          },
          "similarity_is_prediction": {
            "type": "boolean",
            "title": "Similarity Is Prediction"
          },
          "ingest_states": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Ingest States"
          },
          "data_complete": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Complete"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "observations",
          "reactions",
          "quarantined",
          "upstream_valid",
          "with_temperature",
          "with_pressure",
          "with_agents",
          "with_all_three",
          "schema_version",
          "units",
          "expert_confirmed",
          "similarity_is_prediction",
          "ingest_states",
          "data_complete"
        ],
        "title": "Stats"
      },
      "TemperatureCondition": {
        "properties": {
          "value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Value"
          },
          "min": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Min"
          },
          "max": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Max"
          },
          "unit": {
            "type": "string",
            "const": "C",
            "title": "Unit"
          },
          "status": {
            "type": "string",
            "enum": [
              "extracted",
              "predicted",
              "unknown"
            ],
            "title": "Status"
          },
          "raw": {
            "title": "Raw"
          },
          "source_method": {
            "title": "Source Method"
          },
          "stages_raw": {
            "title": "Stages Raw"
          },
          "predicted_bin": {
            "title": "Predicted Bin"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "value",
          "min",
          "max",
          "unit",
          "status"
        ],
        "title": "TemperatureCondition"
      },
      "ToolUsage": {
        "properties": {
          "tool": {
            "type": "string",
            "title": "Tool"
          },
          "calls": {
            "type": "integer",
            "title": "Calls"
          }
        },
        "type": "object",
        "required": [
          "tool",
          "calls"
        ],
        "title": "ToolUsage"
      },
      "Usage": {
        "properties": {
          "account_id": {
            "type": "string",
            "title": "Account Id"
          },
          "period": {
            "type": "string",
            "title": "Period",
            "description": "Calendar month in UTC, YYYY-MM."
          },
          "period_start": {
            "type": "string",
            "format": "date",
            "title": "Period Start"
          },
          "period_end": {
            "type": "string",
            "format": "date",
            "title": "Period End",
            "description": "Exclusive."
          },
          "plan": {
            "type": "string",
            "title": "Plan"
          },
          "included_calls": {
            "type": "integer",
            "title": "Included Calls"
          },
          "used_calls": {
            "type": "integer",
            "title": "Used Calls",
            "description": "Successful or reserved live calls; sandbox calls are separate."
          },
          "test_calls": {
            "type": "integer",
            "title": "Test Calls"
          },
          "test_included_calls": {
            "type": "integer",
            "title": "Test Included Calls"
          },
          "billed_microusd": {
            "type": "integer",
            "title": "Billed Microusd",
            "description": "Actual net prepaid spend, USD millionths, including in-flight reservations."
          },
          "credit_balance_microusd": {
            "type": "integer",
            "title": "Credit Balance Microusd"
          },
          "trial_eligible": {
            "type": "boolean",
            "title": "Trial Eligible"
          },
          "recent_calls": {
            "items": {
              "$ref": "#/components/schemas/CallLog"
            },
            "type": "array",
            "title": "Recent Calls",
            "description": "Last 50 live and sandbox attempts; no request bodies or secrets."
          },
          "overage_calls": {
            "type": "integer",
            "title": "Overage Calls"
          },
          "overage_usd_per_1000": {
            "type": "number",
            "title": "Overage Usd Per 1000"
          },
          "estimated_overage_usd": {
            "type": "number",
            "title": "Estimated Overage Usd"
          },
          "hard_limit": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hard Limit",
            "description": "Live count funded by allowance and remaining credits; null for internal accounts."
          },
          "by_day": {
            "items": {
              "$ref": "#/components/schemas/DayUsage"
            },
            "type": "array",
            "title": "By Day"
          },
          "by_tool": {
            "items": {
              "$ref": "#/components/schemas/ToolUsage"
            },
            "type": "array",
            "title": "By Tool"
          },
          "by_channel": {
            "items": {
              "$ref": "#/components/schemas/ChannelUsage"
            },
            "type": "array",
            "title": "By Channel"
          },
          "by_user": {
            "items": {
              "$ref": "#/components/schemas/UserUsage"
            },
            "type": "array",
            "title": "By User"
          },
          "by_key": {
            "items": {
              "$ref": "#/components/schemas/KeyUsage"
            },
            "type": "array",
            "title": "By Key",
            "description": "Calls made with API keys."
          },
          "by_connection": {
            "items": {
              "$ref": "#/components/schemas/ConnectionUsage"
            },
            "type": "array",
            "title": "By Connection",
            "description": "Calls made through OAuth clients (ChatGPT, Claude…)."
          }
        },
        "type": "object",
        "required": [
          "account_id",
          "period",
          "period_start",
          "period_end",
          "plan",
          "included_calls",
          "used_calls",
          "test_calls",
          "test_included_calls",
          "billed_microusd",
          "credit_balance_microusd",
          "trial_eligible",
          "recent_calls",
          "overage_calls",
          "overage_usd_per_1000",
          "estimated_overage_usd",
          "hard_limit",
          "by_day",
          "by_tool",
          "by_channel",
          "by_user",
          "by_key",
          "by_connection"
        ],
        "title": "Usage"
      },
      "User": {
        "properties": {
          "id": {
            "type": "string",
            "title": "Id"
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
          }
        },
        "type": "object",
        "required": [
          "id",
          "email",
          "name",
          "created_at"
        ],
        "title": "User"
      },
      "UserUsage": {
        "properties": {
          "user_id": {
            "type": "string",
            "title": "User Id"
          },
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Null when read with an API key or OAuth token."
          },
          "email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Email",
            "description": "Null when read with an API key or OAuth token."
          },
          "calls": {
            "type": "integer",
            "title": "Calls"
          }
        },
        "type": "object",
        "required": [
          "user_id",
          "name",
          "email",
          "calls"
        ],
        "title": "UserUsage"
      },
      "ValidateReactionRequest": {
        "properties": {
          "reaction_smiles": {
            "type": "string",
            "maxLength": 10000,
            "minLength": 1,
            "title": "Reaction Smiles"
          },
          "mode": {
            "type": "string",
            "enum": [
              "strict",
              "training"
            ],
            "title": "Mode",
            "default": "strict"
          },
          "conditions": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ChemistryConditions"
              },
              {
                "type": "null"
              }
            ]
          },
          "patent": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 300,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Patent"
          },
          "year": {
            "anyOf": [
              {
                "type": "integer",
                "maximum": 9999,
                "minimum": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Year"
          },
          "include_agents_in_balance": {
            "type": "boolean",
            "title": "Include Agents In Balance",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "reaction_smiles"
        ],
        "title": "ValidateReactionRequest"
      },
      "Validation": {
        "properties": {
          "upstream_chemistry_valid": {
            "type": "boolean",
            "title": "Upstream Chemistry Valid"
          },
          "applies_to": {
            "type": "string",
            "title": "Applies To"
          },
          "conditions_validated": {
            "type": "boolean",
            "title": "Conditions Validated"
          },
          "query_structure_parseable": {
            "type": "boolean",
            "title": "Query Structure Parseable"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "upstream_chemistry_valid",
          "applies_to",
          "conditions_validated",
          "query_structure_parseable"
        ],
        "title": "Validation"
      },
      "ValidatorVerdict": {
        "properties": {
          "name": {
            "type": "string",
            "const": "reaction_validation",
            "title": "Name"
          },
          "version": {
            "type": "string",
            "title": "Version"
          },
          "valid": {
            "type": "boolean",
            "title": "Valid"
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/ChemistryIssue"
            },
            "type": "array",
            "title": "Errors"
          },
          "warnings": {
            "items": {
              "$ref": "#/components/schemas/ChemistryIssue"
            },
            "type": "array",
            "title": "Warnings"
          },
          "details": {
            "additionalProperties": true,
            "type": "object",
            "title": "Details"
          }
        },
        "additionalProperties": true,
        "type": "object",
        "required": [
          "name",
          "version",
          "valid",
          "errors",
          "warnings",
          "details"
        ],
        "title": "ValidatorVerdict"
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "description": "API key (crx_live_…, crx_test_…) or OAuth access token",
        "scheme": "bearer"
      }
    }
  }
}
