Skip to main content

Getting Started

The Cognitive Learning Engine provides a RESTful API for integrating cognitive intelligence into your EdTech platform.

Base URL

https://api.prepst.com

Authentication

All API requests require an API key in the header:
X-API-Key: your-api-key-here
Get your API key by contacting support or signing up for an account.

Response Format

All API responses follow this structure:
{
  "success": true,
  "data": { },
  "message": "Operation successful"
}

Error Responses

{
  "success": false,
  "error": {
    "code": "INVALID_REQUEST",
    "message": "Invalid user_id provided"
  }
}

Rate Limits

API rate limits: 100 requests per minute per API key

Core Endpoints

SDK Support

pip install cognition-engine-sdk

Quick Start Example

from cognition_engine import CognitionEngine

# Initialize
engine = CognitionEngine(
    supabase_url="your-supabase-url",
    supabase_key="your-supabase-key"
)

# Track learning event
result = await engine.track_answer(
    user_id="student_123",
    skill_id="algebra_001",
    is_correct=True,
    time_spent_seconds=45,
    confidence_score=4
)

# Get predictions
predictions = await engine.get_predictions("student_123")
print(f"Predicted score: {predictions['predicted_total_in_30_days']}")

Support