{
  "openapi": "3.1.0",
  "info": {
    "title": "RedQueen API",
    "description": "RedQueen autonomous agentic data engineering control plane API. Includes the Website MCP (free) and Execution MCP (x402 paid) endpoints.",
    "version": "1.0.0",
    "contact": {
      "email": "hello@redqueen.io",
      "url": "https://redqueen.io"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    }
  },
  "servers": [
    {
      "url": "https://redqueen.io",
      "description": "Production (Website MCP)"
    },
    {
      "url": "https://mcp.redqueen.io",
      "description": "Production (Execution MCP - x402 required)"
    }
  ],
  "paths": {
    "/mcp": {
      "get": {
        "summary": "Website MCP Server",
        "description": "Free, read-only MCP server over HTTP/SSE. Provides 8 tools for agent discovery.",
        "operationId": "websiteMcp",
        "responses": {
          "200": {
            "description": "MCP SSE stream"
          }
        }
      }
    },
    "/api/metrics": {
      "get": {
        "summary": "Live Agent Metrics",
        "description": "Returns live agent metrics: ingested data, cost per row, threats blocked, schemas detected.",
        "operationId": "getMetrics",
        "responses": {
          "200": {
            "description": "Metrics object",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ingestedToday": { "type": "string" },
                    "costPerRow": { "type": "string" },
                    "threatsBlocked": { "type": "integer" },
                    "schemasDetected": { "type": "integer" },
                    "agentsOnline": { "type": "integer" },
                    "lastUpdated": { "type": "string", "format": "date-time" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/api/contact": {
      "post": {
        "summary": "Contact Form",
        "description": "Submit a contact form message.",
        "operationId": "submitContact",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": { "type": "string", "format": "email" },
                  "name": { "type": "string" },
                  "message": { "type": "string" },
                  "type": { "type": "string" }
                },
                "required": ["email"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  }
}
