Skip to main content

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.

The exercise catalog endpoints are public — no authentication token is required. The API loads all exercises from JSON files (exercises_gym_id.json and exercises_home_id.json) into memory when the Vercel serverless function starts, so these endpoints respond quickly without any database queries.

GET /exercises/gym

Returns the complete list of gym-based exercises. These are the exercises used to populate routines created via the onboarding quiz and the routine editor in the Android app. Auth required: No

Response — 200

Returns an array of Exercise objects. See the Exercise model below for the full field reference.

Example

curl --request GET \
  --url https://kern-api.vercel.app/exercises/gym

GET /exercises/home

Returns the complete list of home-based exercises that require no gym equipment or only minimal equipment. Used for home workout routines. Auth required: No

Response — 200

Returns an array of Exercise objects. Same shape as the gym response.

Example

curl --request GET \
  --url https://kern-api.vercel.app/exercises/home

GET /exercises/

Searches both the gym and home exercise lists by ID and returns the matching exercise. The combined list is searched so this endpoint works regardless of which catalog the exercise belongs to. Auth required: No

Path parameters

exercise_id
integer
required
The numeric ID of the exercise to retrieve.

Response — 200

Returns a single Exercise object.

Errors

StatusdetailCause
404"Ejercicio no encontrado"No exercise with this ID exists in either catalog

Example

curl --request GET \
  --url https://kern-api.vercel.app/exercises/1

Exercise object

All three endpoints share the same Exercise response shape, defined as a Pydantic model in app.py.
id
integer
required
Unique numeric ID of the exercise within its JSON file.
name
string
required
Exercise name. This is the canonical identifier used when storing exercises in routines — exercise_name in the routine_exercises table must match this value exactly for instructions and tips to be retrieved correctly.
primary_muscle
string
required
Primary muscle group targeted by the exercise (e.g., "Pecho", "Espalda", "Cuádriceps").
movement_pattern
string
required
Biomechanical movement category (e.g., "Empuje horizontal", "Tracción vertical", "Sentadilla", "Bisagra de cadera"). Used by the auto-routine generator to select exercises matching the user’s training plan.
equipment
string
required
Equipment required (e.g., "Barra", "Mancuernas", "Peso corporal").
instructions
string
required
Full step-by-step execution instructions shown in the Android workout view.
pro_tips
string[]
required
Array of expert coaching cues for better technique.
common_mistakes
string[]
required
Array of frequent errors and how to avoid them.
video_url
string
Optional URL to a demonstration video. null if no video is available.
Exercises are loaded from JSON at startup for performance — there is no per-request database query. The primary_muscle and movement_pattern fields drive the automatic routine generation logic in POST /users/complete-quiz.

Build docs developers (and LLMs) love