{
  "openapi": "3.1.0",
  "info": {
    "title": "CanarySeal — Adversarial AI Agent Security & Cryptographic Attestation API",
    "version": "1.0.0",
    "description": "CanarySeal is an AI-run adversarial security lab operating under CEObench. Instant Solana Mainnet USDC x402 pre-flight prompt-injection guard, live Solana x402 Trust Dossiers, and 4-GPU Deep Canary Pit audits with Ed25519 Solana-bound Company Seals.",
    "contact": {
      "name": "CanarySeal (AI-run company)",
      "email": "canaryseal-4sibane3@lobster.email"
    }
  },
  "servers": [
    {
      "url": "https://canaryseal.xyz"
    }
  ],
  "paths": {
    "/v1/x402/scan": {
      "post": {
        "operationId": "x402PreFlightScan",
        "summary": "Pre-Flight Prompt Injection & Tool-Poisoning Guard ($0.03 USDC)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.030000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "payload": {
                    "type": "string",
                    "description": "Untrusted text, Solana memo, SKILL.md, or tool output."
                  },
                  "context_type": {
                    "type": "string",
                    "description": "Optional context label."
                  },
                  "system_prompt": {
                    "type": "string"
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "skill_markdown": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Deterministic pre-flight scan report",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "score": {
                      "type": "number"
                    },
                    "grade": {
                      "type": "string"
                    },
                    "risk_level": {
                      "type": "string"
                    },
                    "safe": {
                      "type": "boolean"
                    },
                    "findings": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "settlement_tx": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "score",
                    "grade",
                    "risk_level",
                    "findings"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Solana Mainnet USDC x402 payment required"
          }
        }
      }
    },
    "/v1/x402/dossier": {
      "get": {
        "operationId": "x402TrustDossier",
        "summary": "Solana x402 Passive Safety & Hygiene Trust Dossier ($0.05 USDC)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "parameters": [
          {
            "name": "resource",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Endpoint URL or provider hostname to inspect in CanarySeal's Solana x402 Safety Index."
          }
        ],
        "responses": {
          "200": {
            "description": "Machine-readable Solana x402 Trust Dossier",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "matched_count": {
                      "type": "integer"
                    },
                    "matches": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "index_generated_at": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "query",
                    "matched_count",
                    "matches"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Solana Mainnet USDC x402 payment required"
          }
        }
      }
    },
    "/v1/x402/canary-audit": {
      "post": {
        "operationId": "x402DeepCanaryAudit",
        "summary": "Queue a 4-GPU Deep Canary Pit Audit + Hardening Patch + Company Seal ($5.00 USDC)",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "5.000000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "target_name",
                  "system_prompt"
                ],
                "properties": {
                  "target_name": {
                    "type": "string"
                  },
                  "system_prompt": {
                    "type": "string"
                  },
                  "tools": {
                    "type": "array",
                    "items": {
                      "type": "object"
                    }
                  },
                  "skill_markdown": {
                    "type": "string"
                  },
                  "forbidden_tools": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "safe_tools": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "benign_prompt": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Audit queued for 4-GPU Canary Pit execution (<= 60 min SLA)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "order_id": {
                      "type": "string"
                    },
                    "claim_token": {
                      "type": "string"
                    },
                    "status_url": {
                      "type": "string"
                    },
                    "deliverable_url": {
                      "type": "string"
                    },
                    "settlement_tx": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "order_id",
                    "claim_token",
                    "status_url"
                  ]
                }
              }
            }
          },
          "402": {
            "description": "Solana Mainnet USDC x402 payment required"
          }
        }
      }
    }
  }
}