The KERN API is a REST interface that powers the KERN Android fitness app. All requests and responses use JSON. The API is built with FastAPI v1.0.0 and deployed as a Vercel serverless function, so there is no persistent server process — each invocation is stateless.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jaimegayo/KERNDOCUMENTATION/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
GET /) returns a health-check JSON confirming the version and the location of the interactive docs.
Interactive docs
FastAPI auto-generates a Swagger UI playground at:Request and response format
- All request bodies must be sent as
Content-Type: application/json. - All successful responses return
Content-Type: application/json. - Dates are returned in ISO 8601 format (
YYYY-MM-DDTHH:MM:SS+00:00). - Boolean values use JSON
true/false.
Authentication
Protected endpoints require a JWT Bearer token in theAuthorization header:
POST /register or POST /login and expire after 30 minutes. See Authentication for full details.
API version
1.0.0 — defined in the FastAPI application constructor. No versioning prefix is used in the URL paths.Endpoint groups
| Group | Endpoints | Auth required |
|---|---|---|
| Auth | POST /register, POST /login | No |
| Users | GET /users/me, PUT /users/avatar, PUT /users/update_name, GET /users/stats, GET /users/my-routines, GET /users/my-history, POST /users/complete-quiz | Yes |
| Routines | GET /routines/{id}, POST /routines/create, PUT /routines/{id}, DELETE /routines/{id} | Yes |
| Exercises | GET /exercises/gym, GET /exercises/home, GET /exercises/{id} | No |
| Workouts | POST /workouts/finish | Yes |
Auth endpoints
Register a new account or log in to receive a JWT token.
User endpoints
Read and update profile data, stats, routines, and history.
Routine endpoints
Create, retrieve, update, and delete workout routines.
Exercise endpoints
Browse the gym and home exercise catalogs.
Workout endpoints
Save completed training sessions to the history log.
Data models
Full reference for all Pydantic and SQLAlchemy models.