Purpose

This page explains the API Specification in plain language. It documents seven endpoints: what each endpoint is for, what the frontend sends, what the backend returns, which inputs are valid, which errors can happen, and small examples.

Current Implementation Status

The repository currently registers only one real route(GET/health → As done according to Day-3):

from fastapi import APIRouter
from datetime import datetime
from app.core.config import get_settings

router = APIRouter()    

@router.get("/health", tags=["Health"])
async def health_check():
    """
    Health check endpoint to verify if the API is running.
    Returns the current server time and application name.
    """
    settings = get_settings()
    return {
        "status": "healthy",
        "app": settings.app_name,
        "version": settings.app_version,
        "timestamp": datetime.utcnow().isoformat(),
        "mode":"mock" if settings.use_mock_tutor else "live"
    }

The other route files have a boilerplate but aren’t defined:

This specification describes the intended endpoints so the API can be implemented against a clear target.

Base URL

Local development base URL:

<http://127.0.0.1:8000>

Shared Concepts

Session

A session is one tutoring conversation between a student and the math tutor.

Example session id: