{
  "openapi": "3.1.0",
  "info": {
    "title": "Corbel Blue Sovereign Enclave & Micro-Clearing API",
    "version": "1.0.0",
    "description": "The official machine-to-machine API and MCP discovery catalog for Corbel Blue. Provides hardware-isolated Intel TDX execution, cryptographic attestation quotes, and sub-millisecond x402 clearing rails.",
    "contact": {
      "name": "Corbel Architecture Desk",
      "email": "contact@correntelabs.com",
      "url": "https://corbel.blue"
    }
  },
  "servers": [
    {
      "url": "https://corbel.blue/api",
      "description": "Production Edge Mesh"
    }
  ],
  "paths": {
    "/enclaves/session": {
      "post": {
        "summary": "Spawn Attested Enclave Session",
        "operationId": "spawnEnclaveSession",
        "description": "Provisions an ephemeral hardware-isolated enclave instance (Intel TDX / AMD SEV-SNP) with per-session volatile child keys and zero host memory observability.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "workload": { "type": "string", "example": "proprietary-agent-loop" },
                  "silicon": { "type": "string", "enum": ["intel-tdx", "amd-sev-snp"], "default": "intel-tdx" },
                  "region": { "type": "string", "default": "us-central1" }
                },
                "required": ["workload"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Enclave session initialized with hardware quote",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "sessionId": { "type": "string" },
                    "mrenclave": { "type": "string" },
                    "quote": { "type": "string" },
                    "status": { "type": "string", "example": "active" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/clearing/settle": {
      "post": {
        "summary": "Execute Sub-Millisecond Micro-Clearing",
        "operationId": "settleMicroPayment",
        "description": "Clears an autonomous x402 payment mandate with sub-millisecond latency across multi-rail settlement endpoints.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rail": { "type": "string", "example": "universal-settlement" },
                  "amountUsd": { "type": "string", "example": "0.0015" },
                  "recipient": { "type": "string" },
                  "mandateSignature": { "type": "string" }
                },
                "required": ["rail", "amountUsd", "recipient", "mandateSignature"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Instant clearing settled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "settlementId": { "type": "string" },
                    "clearedAt": { "type": "string", "format": "date-time" },
                    "latencyMs": { "type": "number", "example": 1.18 },
                    "receiptDigest": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/sandbox/provision": {
      "post": {
        "summary": "Instant 60s Developer Sandbox Keygen",
        "operationId": "provisionSandboxKey",
        "description": "Claims a free Developer Beta API key with 100,000 monthly hardware-attested execution requests.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectName": { "type": "string", "example": "Acme Settlement Agent" },
                  "workloadType": { "type": "string", "enum": ["agent", "payments", "compute"] }
                },
                "required": ["projectName"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Sandbox credentials provisioned",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "apiKey": { "type": "string", "example": "crb_test_9fa1b2..." },
                    "quotaRemaining": { "type": "integer", "example": 100000 },
                    "publicBetaLaunch": { "type": "string", "example": "2026-10-01" }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
