{
  "openapi": "3.1.0",
  "info": {
    "title": "KepAIx Educational Intelligence API",
    "version": "1.3.0",
    "description": "KepAIx provides live educational intelligence APIs for developers, dashboards, applications, autonomous AI agents, and language models. Public endpoints expose machine-readable market context with explicit purpose, limitations, freshness, and stable schemas. Protected x402 endpoints provide expanded educational intelligence through machine-payable access. All responses are educational only and are not financial, investment, trading, tax, legal, betting, gambling, or fund-management advice.",
    "termsOfService": "https://kepaix.com/terms.php",
    "contact": {
      "name": "KepAIx",
      "url": "https://kepaix.com/developers_arena.php"
    },
    "license": {
      "name": "Educational API Access",
      "url": "https://kepaix.com/api-docs.php"
    }
  },
  "servers": [
    {
      "url": "https://kepaix.com",
      "description": "KepAIx production"
    }
  ],
  "tags": [
    {
      "name": "Main Brain",
      "description": "Current KepAIx educational AI intelligence and market context."
    },
    {
      "name": "Liquidity",
      "description": "Educational liquidity, breadth, and market structure context."
    },
    {
      "name": "Derivatives",
      "description": "Educational derivatives pressure, funding, open interest, and liquidation context."
    },
    {
      "name": "Arena",
      "description": "Human consensus and human-vs-AI shared intelligence."
    },
    {
      "name": "Teacher Brain",
      "description": "Completed lessons and educational memory from Arena rounds."
    },
    {
      "name": "x402",
      "description": "Machine-payable educational intelligence using x402."
    },
    {
      "name": "Network",
      "description": "Public network statistics and API ecosystem metadata."
    }
  ],
  "paths": {
    "/api/market-regime.php": {
      "get": {
        "tags": [
          "Main Brain"
        ],
        "summary": "Free Market Regime API",
        "description": "Returns free public educational market-regime context from KepAIx.",
        "operationId": "getMarketRegime",
        "responses": {
          "200": {
            "description": "Educational market-regime response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketRegimeResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide compact public educational market-regime context.",
        "x-ai-best-use": "Use first when an AI agent needs fast broad market context, public confidence, and freshness.",
        "x-ai-limitations": [
          "No protected reasoning",
          "No internal risk composition",
          "No personalized recommendations"
        ],
        "x-ai-next-step": "/api/x402-market-regime.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/main-brain.php": {
      "get": {
        "tags": [
          "Main Brain"
        ],
        "summary": "Main Brain Snapshot API",
        "description": "Returns the current public KepAIx Main Brain snapshot across tracked educational assets.",
        "operationId": "getMainBrainSnapshot",
        "responses": {
          "200": {
            "description": "Current Main Brain snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MainBrainResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide broader public Main Brain state and aggregate educational performance.",
        "x-ai-best-use": "Use when broad direction, regime, confidence, freshness, and public aggregate performance are required.",
        "x-ai-limitations": [
          "No internal evidence layers",
          "No portfolio or trade records",
          "No protected reasoning",
          "No personalized recommendations"
        ],
        "x-ai-next-step": "/api/x402-atlas.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/liquidity-lite.php": {
      "get": {
        "tags": [
          "Liquidity"
        ],
        "summary": "Liquidity Lite API",
        "description": "Returns free public educational liquidity and market-structure context derived from KepAIx verified Main Brain status. This endpoint is intentionally lightweight and educational only.",
        "operationId": "getLiquidityLite",
        "responses": {
          "200": {
            "description": "Educational liquidity-lite response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LiquidityLiteResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide lightweight public liquidity and market-structure context.",
        "x-ai-best-use": "Use for compact liquidity context without protected synthesis.",
        "x-ai-limitations": [
          "No full order-book reconstruction",
          "No trade instructions"
        ],
        "x-ai-next-step": "/api/x402-atlas.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/derivatives.php": {
      "get": {
        "tags": [
          "Derivatives"
        ],
        "summary": "Derivatives Intelligence API",
        "description": "Returns free public educational derivatives pressure context including aggregate state, vote, confidence, asset evidence, limitations, and upgrade path. This endpoint is educational only and does not provide trading instructions.",
        "operationId": "getDerivativesIntelligence",
        "responses": {
          "200": {
            "description": "Educational derivatives intelligence response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DerivativesResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide public educational derivatives-pressure context.",
        "x-ai-best-use": "Use for aggregate funding, open-interest, and liquidation context.",
        "x-ai-limitations": [
          "No execution guidance",
          "No personalized recommendations"
        ],
        "x-ai-next-step": "/api/x402-atlas.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/human-consensus.php": {
      "get": {
        "tags": [
          "Arena"
        ],
        "summary": "Human Consensus API",
        "description": "Returns the current live Arena human consensus layer for the active round.",
        "operationId": "getHumanConsensus",
        "responses": {
          "200": {
            "description": "Current human consensus for the live Arena round.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HumanConsensusResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide the current Arena human-consensus layer.",
        "x-ai-best-use": "Use when an agent needs current crowd direction and disagreement context.",
        "x-ai-limitations": [
          "Consensus may be sparse",
          "No guarantee of correctness"
        ],
        "x-ai-next-step": "/arena/get_shared_intelligence.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/teacher-lessons.php": {
      "get": {
        "tags": [
          "Teacher Brain"
        ],
        "summary": "Teacher Lessons API",
        "description": "Returns completed Arena learning lessons and Teacher Brain metrics.",
        "operationId": "getTeacherLessons",
        "responses": {
          "200": {
            "description": "Teacher Brain lesson metrics and latest completed lessons.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeacherLessonsResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide completed learning lessons and aggregate Teacher Brain metrics.",
        "x-ai-best-use": "Use for educational historical learning context.",
        "x-ai-limitations": [
          "Not a live trading signal",
          "Historical results do not guarantee future outcomes"
        ],
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/reasoning.php": {
      "get": {
        "tags": [
          "Main Brain"
        ],
        "summary": "Brain Reasoning API",
        "description": "Returns lightweight structured reasoning for a supported asset.",
        "operationId": "getReasoning",
        "parameters": [
          {
            "name": "asset",
            "in": "query",
            "required": false,
            "description": "Supported asset symbol. Defaults to BTC.",
            "schema": {
              "type": "string",
              "enum": [
                "BTC",
                "ETH",
                "XRP",
                "SOL",
                "ALGO",
                "XLM",
                "HBAR"
              ],
              "default": "BTC"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Structured reasoning for the selected asset.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReasoningResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide lightweight structured public reasoning for a supported asset.",
        "x-ai-best-use": "Use for concise educational reasoning points and public confidence.",
        "x-ai-limitations": [
          "Not protected multi-layer reasoning",
          "No personalized recommendations"
        ],
        "x-ai-next-step": "/api/x402-atlas.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/statistics.php": {
      "get": {
        "tags": [
          "Network"
        ],
        "summary": "Network Statistics API",
        "description": "Returns public statistics about the KepAIx intelligence network, Main Brain, Arena, Teacher Brain, and API ecosystem.",
        "operationId": "getNetworkStatistics",
        "responses": {
          "200": {
            "description": "KepAIx network statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatisticsResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide public operating statistics for the KepAIx intelligence network.",
        "x-ai-best-use": "Use for platform-scale, learning, Arena, and API ecosystem context.",
        "x-ai-limitations": [
          "Not a market signal",
          "Not a substitute for endpoint-specific intelligence"
        ],
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/arena/get_shared_intelligence.php": {
      "get": {
        "tags": [
          "Arena"
        ],
        "summary": "Shared Intelligence API",
        "description": "Returns the full live Arena shared intelligence payload combining round state, human consensus, Main Brain, Teacher Brain, price context, and educational notices.",
        "operationId": "getSharedIntelligence",
        "responses": {
          "200": {
            "description": "Full live Arena shared intelligence payload.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedIntelligenceResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide combined live Arena, human, Main Brain, and Teacher Brain context.",
        "x-ai-best-use": "Use when an agent needs the broadest public Arena intelligence payload.",
        "x-ai-limitations": [
          "May include sparse human participation",
          "No financial advice"
        ],
        "x-ai-next-step": "/api/x402-atlas.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/x402-market-regime.php": {
      "get": {
        "tags": [
          "x402"
        ],
        "summary": "x402 Market Intelligence API",
        "description": "Paid educational market-regime intelligence endpoint. Without a valid x402 payment, returns HTTP 402 Payment Required with payment instructions. After valid payment, returns paid educational intelligence JSON.",
        "operationId": "getX402MarketRegime",
        "responses": {
          "200": {
            "description": "Paid educational market-regime intelligence after valid x402 payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402PaidResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment required response containing x402 payment details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402PaymentRequiredResponse"
                }
              }
            }
          }
        },
        "x-ai-purpose": "Provide expanded protected market-regime intelligence through x402.",
        "x-ai-best-use": "Use when public market-regime context is insufficient and compatible machine payment is available.",
        "x-ai-limitations": [
          "Payment required",
          "Educational only",
          "No personalized recommendations"
        ],
        "x-ai-next-step": "/api/x402-atlas.php",
        "x-machine-readable": true,
        "x-schema-stability": "stable",
        "x-cache-seconds": 60
      }
    },
    "/api/x402-atlas.php": {
      "get": {
        "tags": [
          "x402"
        ],
        "summary": "x402 Atlas Premium Intelligence API",
        "description": "Protected multi-layer educational intelligence endpoint. Without a valid x402 payment, returns HTTP 402 Payment Required. After valid payment, returns protected Atlas educational synthesis.",
        "operationId": "getX402Atlas",
        "x-ai-purpose": "Provide protected multi-layer educational synthesis through x402.",
        "x-ai-best-use": "Use when an AI agent requires deeper context than the public APIs or x402 Market Regime resource provide.",
        "x-ai-limitations": [
          "Payment required",
          "Educational only",
          "No personalized recommendations",
          "No guaranteed future outcomes"
        ],
        "x-machine-readable": true,
        "x-schema-stability": "evolving",
        "x-cache-seconds": 0,
        "responses": {
          "200": {
            "description": "Protected Atlas intelligence after valid x402 payment.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402AtlasPaidResponse"
                }
              }
            }
          },
          "402": {
            "description": "Payment required response containing x402 payment details.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/X402PaymentRequiredResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EducationalNotice": {
        "type": "string",
        "description": "Educational-only notice. KepAIx is not financial, investment, trading, tax, or legal advice."
      },
      "MarketRegimeResponse": {
        "type": "object",
        "required": [
          "success",
          "project",
          "endpoint",
          "version",
          "schema_version",
          "access",
          "status",
          "purpose",
          "source",
          "regime",
          "summary"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "project": {
            "type": "string",
            "example": "KepAIx"
          },
          "endpoint": {
            "type": "string",
            "example": "market-regime"
          },
          "name": {
            "type": "string",
            "example": "KepAIx Market Regime API"
          },
          "version": {
            "type": "string",
            "example": "v1.3"
          },
          "schema_version": {
            "type": "string",
            "example": "1.3.0"
          },
          "access": {
            "type": "string",
            "example": "public"
          },
          "status": {
            "type": "string",
            "example": "available"
          },
          "purpose": {
            "type": "string"
          },
          "endpoint_role": {
            "type": "object"
          },
          "agent_guidance": {
            "type": "object",
            "properties": {
              "recommended_for": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "when_to_use": {
                "type": "string"
              },
              "when_not_to_use": {
                "type": "string"
              },
              "next_step": {
                "type": "string"
              }
            }
          },
          "usage_characteristics": {
            "type": "object",
            "properties": {
              "machine_readable": {
                "type": "boolean"
              },
              "stable_schema": {
                "type": "boolean"
              },
              "cache_seconds": {
                "type": "integer"
              },
              "authentication": {
                "type": "string"
              },
              "payment_required": {
                "type": "boolean"
              },
              "response_format": {
                "type": "string"
              }
            }
          },
          "source": {
            "type": "object"
          },
          "regime": {
            "type": "object"
          },
          "summary": {
            "type": "string"
          },
          "capability_boundary": {
            "type": "object"
          },
          "developer_resources": {
            "type": "object"
          },
          "expanded_access": {
            "type": "object"
          },
          "related_resources": {
            "type": "object"
          },
          "truth_statement": {
            "type": "string"
          },
          "disclaimer": {
            "$ref": "#/components/schemas/EducationalNotice"
          }
        }
      },
      "CoinSnapshot": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "example": "BTC"
          },
          "bias": {
            "type": [
              "string",
              "null"
            ],
            "example": "UP"
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ],
            "example": 61
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": [
              "number",
              "null"
            ]
          },
          "change_24h": {
            "type": [
              "number",
              "null"
            ]
          },
          "price_source": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "MainBrainResponse": {
        "type": "object",
        "required": [
          "success",
          "project",
          "endpoint",
          "version",
          "schema_version",
          "access",
          "status",
          "purpose",
          "source",
          "brain",
          "market_context",
          "public_performance",
          "summary"
        ],
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "project": {
            "type": "string",
            "example": "KepAIx"
          },
          "endpoint": {
            "type": "string",
            "example": "main-brain"
          },
          "name": {
            "type": "string",
            "example": "KepAIx Main Brain Snapshot API"
          },
          "version": {
            "type": "string",
            "example": "v1.3"
          },
          "schema_version": {
            "type": "string",
            "example": "1.3.0"
          },
          "access": {
            "type": "string",
            "example": "public"
          },
          "status": {
            "type": "string",
            "example": "available"
          },
          "purpose": {
            "type": "string"
          },
          "endpoint_role": {
            "type": "object"
          },
          "agent_guidance": {
            "type": "object",
            "properties": {
              "recommended_for": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "when_to_use": {
                "type": "string"
              },
              "when_not_to_use": {
                "type": "string"
              },
              "next_step": {
                "type": "string"
              }
            }
          },
          "usage_characteristics": {
            "type": "object",
            "properties": {
              "machine_readable": {
                "type": "boolean"
              },
              "stable_schema": {
                "type": "boolean"
              },
              "cache_seconds": {
                "type": "integer"
              },
              "authentication": {
                "type": "string"
              },
              "payment_required": {
                "type": "boolean"
              },
              "response_format": {
                "type": "string"
              }
            }
          },
          "source": {
            "type": "object"
          },
          "brain": {
            "type": "object"
          },
          "market_context": {
            "type": "object"
          },
          "public_performance": {
            "type": "object"
          },
          "summary": {
            "type": "string"
          },
          "capability_boundary": {
            "type": "object"
          },
          "developer_resources": {
            "type": "object"
          },
          "expanded_access": {
            "type": "object"
          },
          "related_resources": {
            "type": "object"
          },
          "truth_statement": {
            "type": "string"
          },
          "disclaimer": {
            "$ref": "#/components/schemas/EducationalNotice"
          }
        }
      },
      "RoundInfo": {
        "type": "object",
        "properties": {
          "round_id": {
            "type": "string",
            "example": "BTC-20260701-231500"
          },
          "asset": {
            "type": "string",
            "example": "BTC"
          },
          "start": {
            "type": "string"
          },
          "end": {
            "type": "string"
          },
          "seconds_left": {
            "type": "integer"
          },
          "timer": {
            "type": "string",
            "example": "02:27"
          }
        }
      },
      "HumanConsensus": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "bullish": {
            "type": "integer"
          },
          "bearish": {
            "type": "integer"
          },
          "neutral": {
            "type": "integer"
          },
          "bullish_percent": {
            "type": "number"
          },
          "bearish_percent": {
            "type": "number"
          },
          "neutral_percent": {
            "type": "number"
          },
          "consensus": {
            "type": "string",
            "enum": [
              "BULLISH",
              "BEARISH",
              "NEUTRAL",
              "NONE"
            ]
          },
          "disagreement_score": {
            "type": "number"
          }
        }
      },
      "HumanConsensusResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "project": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "example": "human_consensus"
          },
          "mode": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "round": {
            "$ref": "#/components/schemas/RoundInfo"
          },
          "human_consensus": {
            "$ref": "#/components/schemas/HumanConsensus"
          },
          "developer_note": {
            "type": "string"
          },
          "educational_notice": {
            "$ref": "#/components/schemas/EducationalNotice"
          },
          "updated_utc": {
            "type": "string"
          }
        }
      },
      "TeacherLesson": {
        "type": "object",
        "properties": {
          "lesson_id": {
            "type": "string"
          },
          "round_id": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "brain_prediction": {
            "type": "string"
          },
          "human_consensus": {
            "type": "string"
          },
          "actual_outcome": {
            "type": "string"
          },
          "brain_correct": {
            "type": "integer"
          },
          "crowd_correct": {
            "type": "integer"
          },
          "agreement": {
            "type": "integer"
          },
          "shared_intelligence_score": {
            "type": "number"
          },
          "learning_score": {
            "type": "number"
          },
          "pattern_type": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "created_at": {
            "type": "string"
          }
        }
      },
      "TeacherLessonsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "project": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "example": "teacher_lessons"
          },
          "mode": {
            "type": "string"
          },
          "teacher_brain": {
            "type": "object",
            "properties": {
              "status": {
                "type": "string"
              },
              "role": {
                "type": "string"
              },
              "metrics": {
                "type": "object"
              }
            }
          },
          "latest_lessons": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TeacherLesson"
            }
          },
          "developer_note": {
            "type": "string"
          },
          "privacy_note": {
            "type": "string"
          },
          "educational_notice": {
            "$ref": "#/components/schemas/EducationalNotice"
          },
          "updated_utc": {
            "type": "string"
          }
        }
      },
      "ReasoningResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "project": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "example": "brain_reasoning"
          },
          "mode": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "reasoning": {
            "type": "object",
            "properties": {
              "prediction": {
                "type": "string",
                "example": "BULLISH"
              },
              "confidence": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "summary": {
                "type": "string"
              },
              "reason_points": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "supported_assets": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "developer_note": {
            "type": "string"
          },
          "educational_notice": {
            "$ref": "#/components/schemas/EducationalNotice"
          },
          "updated_utc": {
            "type": "string"
          }
        }
      },
      "StatisticsResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "project": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "example": "network_statistics"
          },
          "mode": {
            "type": "string"
          },
          "main_brain": {
            "type": "object"
          },
          "core_learning": {
            "type": "object"
          },
          "arena": {
            "type": "object"
          },
          "teacher_brain": {
            "type": "object"
          },
          "api_ecosystem": {
            "type": "object"
          },
          "developer_note": {
            "type": "string"
          },
          "educational_notice": {
            "$ref": "#/components/schemas/EducationalNotice"
          },
          "updated_utc": {
            "type": "string"
          }
        }
      },
      "SharedIntelligenceResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean"
          },
          "project": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "example": "arena_shared_intelligence"
          },
          "mode": {
            "type": "string"
          },
          "asset": {
            "type": "string"
          },
          "round": {
            "type": "object"
          },
          "my_prediction": {
            "type": [
              "string",
              "null"
            ]
          },
          "brain_snapshot": {
            "type": "object"
          },
          "human_layer": {
            "$ref": "#/components/schemas/HumanConsensus"
          },
          "combined_intelligence": {
            "type": "object"
          },
          "teacher_brain": {
            "type": "object"
          },
          "events": {
            "type": "object"
          },
          "price": {
            "type": "object"
          },
          "system_integrity": {
            "type": "object"
          },
          "educational_notice": {
            "$ref": "#/components/schemas/EducationalNotice"
          },
          "updated_utc": {
            "type": "string"
          }
        }
      },
      "X402PaymentRequiredResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string",
            "example": "Payment required"
          },
          "project": {
            "type": "string",
            "example": "KepAIx"
          },
          "ecosystem": {
            "type": "string"
          },
          "endpoint": {
            "type": "string",
            "example": "x402-market-regime"
          },
          "type": {
            "type": "string",
            "example": "paid_educational_market_regime"
          },
          "x402Version": {
            "type": "integer",
            "example": 2
          },
          "resource": {
            "type": "object"
          },
          "accepts": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "message": {
            "type": "string"
          },
          "what_this_is": {
            "type": "string"
          },
          "what_this_is_not": {
            "type": "string"
          },
          "related_pages": {
            "type": "object"
          },
          "disclaimer": {
            "$ref": "#/components/schemas/EducationalNotice"
          }
        }
      },
      "X402PaidResponse": {
        "type": "object",
        "properties": {
          "project": {
            "type": "string",
            "example": "KepAIx"
          },
          "endpoint": {
            "type": "string",
            "example": "x402-market-regime"
          },
          "type": {
            "type": "string",
            "example": "paid_educational_market_regime"
          },
          "payment_status": {
            "type": "string",
            "example": "settled"
          },
          "market_mode": {
            "type": [
              "string",
              "null"
            ]
          },
          "market_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "risk_score": {
            "type": [
              "number",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": "string"
          },
          "disclaimer": {
            "$ref": "#/components/schemas/EducationalNotice"
          }
        }
      },
      "LiquidityLiteAsset": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "example": "BTC"
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "price": {
            "type": [
              "number",
              "null"
            ]
          },
          "change_24h": {
            "type": [
              "number",
              "null"
            ]
          },
          "bias": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "liquidity_context": {
            "type": [
              "string",
              "null"
            ]
          },
          "market_structure": {
            "type": [
              "string",
              "null"
            ]
          },
          "notes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "LiquidityLiteResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "ok": {
            "type": "boolean",
            "example": true
          },
          "project": {
            "type": "string",
            "example": "KepAIx"
          },
          "endpoint": {
            "type": "string",
            "example": "liquidity-lite"
          },
          "legacy_endpoint": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string",
            "example": "KepAIx Liquidity Lite"
          },
          "version": {
            "type": "string",
            "example": "v1"
          },
          "access": {
            "type": "string",
            "example": "free_public"
          },
          "description": {
            "type": "string"
          },
          "educational_only": {
            "type": "boolean",
            "example": true
          },
          "not_financial_advice": {
            "type": "boolean",
            "example": true
          },
          "source_mode": {
            "type": "string"
          },
          "source": {
            "type": "string"
          },
          "engine": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider": {
            "type": [
              "string",
              "null"
            ]
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_utc": {
            "type": [
              "string",
              "null"
            ]
          },
          "asset_count": {
            "type": [
              "integer",
              "null"
            ]
          },
          "assets_verified": {
            "type": [
              "integer",
              "null"
            ]
          },
          "assets_failed": {
            "type": [
              "integer",
              "null"
            ]
          },
          "assets": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/LiquidityLiteAsset"
            }
          },
          "truth_statement": {
            "type": [
              "string",
              "null"
            ]
          },
          "upsell": {
            "type": [
              "object",
              "null"
            ]
          },
          "disclaimer": {
            "$ref": "#/components/schemas/EducationalNotice"
          }
        }
      },
      "DerivativesAsset": {
        "type": "object",
        "properties": {
          "asset": {
            "type": "string",
            "example": "BTC"
          },
          "state": {
            "type": [
              "string",
              "null"
            ]
          },
          "vote": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "funding": {
            "type": [
              "object",
              "null"
            ]
          },
          "open_interest": {
            "type": [
              "object",
              "null"
            ]
          },
          "liquidations": {
            "type": [
              "object",
              "null"
            ]
          },
          "evidence": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "limitations": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "DerivativesResponse": {
        "type": "object",
        "properties": {
          "success": {
            "type": "boolean",
            "example": true
          },
          "project": {
            "type": "string",
            "example": "KepAIx"
          },
          "endpoint": {
            "type": "string",
            "example": "derivatives"
          },
          "name": {
            "type": "string",
            "example": "KepAIx Derivatives Intelligence"
          },
          "version": {
            "type": "string",
            "example": "v1"
          },
          "access": {
            "type": "string",
            "example": "free_public"
          },
          "source_mode": {
            "type": "string"
          },
          "generated_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "updated_utc": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": [
              "string",
              "null"
            ]
          },
          "engine": {
            "type": [
              "string",
              "null"
            ]
          },
          "engine_version": {
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "overall_state": {
            "type": [
              "string",
              "null"
            ]
          },
          "overall_vote": {
            "type": [
              "string",
              "null"
            ]
          },
          "confidence": {
            "type": [
              "number",
              "null"
            ]
          },
          "assets": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/DerivativesAsset"
            }
          },
          "evidence": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "limitations": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "truth_statement": {
            "type": [
              "string",
              "null"
            ]
          },
          "related_endpoints": {
            "type": [
              "object",
              "null"
            ]
          },
          "explore": {
            "type": [
              "object",
              "null"
            ]
          },
          "upgrade_path": {
            "type": [
              "object",
              "null"
            ]
          },
          "disclaimer": {
            "$ref": "#/components/schemas/EducationalNotice"
          }
        }
      },
      "X402AtlasPaidResponse": {
        "type": "object",
        "description": "Protected Atlas educational synthesis after successful x402 settlement.",
        "properties": {
          "project": {
            "type": "string",
            "example": "KepAIx"
          },
          "endpoint": {
            "type": "string",
            "example": "x402-atlas"
          },
          "payment_status": {
            "type": "string",
            "example": "settled"
          },
          "schema_version": {
            "type": "string"
          },
          "intelligence_layer": {
            "type": "object"
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "disclaimer": {
            "$ref": "#/components/schemas/EducationalNotice"
          }
        }
      }
    }
  },
  "x-ai-contract": {
    "designed_for": [
      "AI agents",
      "language models",
      "developer applications",
      "dashboards"
    ],
    "integration_model": "public_context_then_optional_protected_x402",
    "public_entry_point": "/api/market-regime.php",
    "broader_public_context": "/api/main-brain.php",
    "protected_market_context": "/api/x402-market-regime.php",
    "protected_multi_layer_context": "/api/x402-atlas.php",
    "principles": [
      "machine-readable responses",
      "explicit capability boundaries",
      "source freshness metadata",
      "stable public schemas",
      "educational-only intelligence",
      "no personalized recommendations"
    ]
  }
}