NotebookSync API Documentation Version: Sprint 2 / Current Backend Overview NotebookSync is an AI-powered notebook generation backend. It accepts notebook requests, generates datasets and notebook plans using AI, formats the notebook, and returns a Jupyter Notebook (.ipynb). Base URL http://127.0.0.1:8001 Authentication Authorization: Bearer (when Keycloak authentication is enabled). POST /backend/generate-notebook Purpose: Generate a notebook using title, difficulty, dataset and notebook type. Sample Request: {"title":"Titanic Survival Prediction","difficulty":"Medium","dataset_id":"65423","notebook_type":"AIML"} Sample Response: {"status":"success","filename":"Titanic.ipynb","download_url":"/backend/download/Titanic.ipynb"} GET /backend/datasets Returns paginated datasets for the dataset dropdown. Backend Flow 1. Receive request. 2. Validate request. 3. Initialize LLM. 4. Generate/Retrieve dataset. 5. Generate notebook plan. 6. Generate assessment units. 7. Map AI output. 8. Build AuthoringSpec. 9. Format notebook. 10. Export .ipynb. 11. Return response. HTTP Code Meaning 200 400 401 Success Bad Request Unauthorized 404 500 Not Found Internal Server Error Architecture Summary React Frontend fi FastAPI Router fi NotebookGenerationService fi LLM fi Dataset Generation fi Notebook Plan fi Assessment Generation fi Mapper Layer fi AuthoringSpec fi NotebookFormatter fi Jupyter Notebook