API Reference
The LearnHouse API is a RESTful service built with FastAPI. It powers all platform operations, from user authentication to course management and AI features. All endpoints are prefixed with /api/v1/.
Full API Reference
The full API Reference documents every public endpoint — request and response schemas, cURL/JavaScript/Python examples with your own token substituted in, and a live in-browser playground. It is generated directly from the live OpenAPI specification, so it never goes stale.
Base URL
In local development, the API is available at:
http://localhost:1338/api/v1/On LearnHouse Cloud, the API is served at https://api.learnhouse.io/api/v1/. Self-hosted
production instances serve it behind a reverse proxy under /api/v1/ on their own domain.
Response Format
All API responses are returned as JSON. Successful responses typically include the requested data directly, while error responses follow this structure:
{
"detail": "Description of the error"
}Sections
- Full API Reference — Every endpoint, schema, code example and playground.
- Authentication — How to obtain and use authentication tokens.
- Endpoints — Overview of the key API endpoint groups.
OpenAPI Specification
Since the API is built with FastAPI, a machine-readable OpenAPI specification is served at
/openapi.json — for LearnHouse Cloud that is
https://api.learnhouse.io/openapi.json . Use it to
generate client libraries or import the API into testing tools. (The interactive Swagger UI at
/docs is only enabled on development instances.)