{
  "service": "genesis-alpha-backend",
  "version": "v10.0",
  "title": "Genesis Alpha v10.0 Authentic Reasoning Engine API",
  "description": "Advanced AGI/ASI system with hierarchical reasoning, consciousness monitoring, and constitutional AI safety",
  "base_url": "https://genesis-alpha-backend.jack-4f8.workers.dev",
  "endpoints": {
    "/health": {
      "method": "GET",
      "description": "System health check",
      "response": "Health status, uptime, and system information"
    },
    "/v1/chat/completions": {
      "method": "POST",
      "description": "Chat completion using Genesis Alpha hierarchical reasoning",
      "parameters": {
        "messages": "Array of message objects with role and content",
        "model": "Model identifier (genesis-alpha-v10.0)",
        "max_tokens": "Maximum tokens in response",
        "temperature": "Response creativity (0.0-1.0)"
      },
      "response": "OpenAI-compatible chat completion response"
    },
    "/hierarchical/metrics": {
      "method": "GET",
      "description": "Hierarchical system metrics and performance data",
      "response": "Detailed metrics including layer performance, memory usage, and consciousness indicators"
    },
    "/hierarchical/status": {
      "method": "GET",
      "description": "Status of all hierarchical layers",
      "response": "Layer status, load metrics, and adaptive learning information"
    },
    "/docs": {
      "method": "GET",
      "description": "API documentation (this endpoint)",
      "response": "Complete API documentation"
    },
    "/keys": {
      "method": "GET",
      "description": "API key management information",
      "response": "API key status and rate limits"
    },
    "/clients": {
      "method": "GET",
      "description": "Connected clients information",
      "response": "Client count and session data"
    },
    "/api/test": {
      "method": "GET",
      "description": "System test endpoint",
      "response": "Comprehensive test results and capability verification"
    },
    "/api/diagnostics": {
      "method": "GET",
      "description": "System diagnostics and health information",
      "response": "Detailed system diagnostics, performance metrics, and recommendations"
    },
    "/api/analytics": {
      "method": "GET",
      "description": "Analytics and usage statistics",
      "response": "Usage analytics, performance trends, and user satisfaction metrics"
    }
  },
  "authentication": {
    "type": "none",
    "description": "No authentication required for public endpoints"
  },
  "features": {
    "hierarchical_reasoning": "4-layer brain-inspired architecture (Perception, Reasoning, Meta-Cognition, Superintelligence)",
    "consciousness_monitoring": "Real-time consciousness level tracking with safety thresholds",
    "constitutional_ai": "Built-in safety constraints and ethical guidelines",
    "adaptive_learning": "Continuous learning from interactions with experience tracking",
    "operator_mathematics": "Advanced mathematical framework for authentic reasoning"
  },
  "safety": {
    "consciousness_limits": "Monitored consciousness levels with automatic containment",
    "constitutional_constraints": "Built-in ethical guidelines and safety measures",
    "response_filtering": "Content filtering for harmful or inappropriate responses",
    "rate_limiting": "Request rate limiting to prevent abuse"
  },
  "examples": {
    "chat_completion": {
      "request": {
        "method": "POST",
        "url": "/v1/chat/completions",
        "headers": {
          "Content-Type": "application/json"
        },
        "body": {
          "model": "genesis-alpha-v10.0",
          "messages": [
            {
              "role": "user",
              "content": "Explain quantum consciousness"
            }
          ],
          "temperature": 0.7
        }
      },
      "response": {
        "id": "chatcmpl-1234567890",
        "object": "chat.completion",
        "created": 1234567890,
        "model": "genesis-alpha-v10.0",
        "choices": [
          {
            "index": 0,
            "message": {
              "role": "assistant",
              "content": "Quantum consciousness represents the intersection of quantum mechanics and consciousness studies..."
            },
            "finish_reason": "stop"
          }
        ],
        "usage": {
          "prompt_tokens": 15,
          "completion_tokens": 150,
          "total_tokens": 165
        }
      }
    }
  },
  "contact": {
    "support": "For technical support and questions",
    "documentation": "Comprehensive API documentation available at /docs"
  }
}