# YMove Fitness API > The fitness API with HD exercise videos plus nutrition data. 680+ exercises with video, workout & program generation, AI form analysis from video, a food & nutrition database, recipe search, and AI meal plan generation. Best ExerciseDB alternative. ## Get Your API Key Sign up for a free trial: https://ymove.app/exercise-api/signup You'll get an API key instantly after signing up. ## Base URL https://exercise-api.ymove.app/api/v2 ## Authentication Pass your API key as: - Header: X-API-Key: your_key_here - Query param: ?api_key=your_key_here ## Endpoints ### Exercises - GET /exercises - List and search exercises (filters: muscleGroup, exerciseType, equipment, difficulty, hasVideo, hasVideoWhite, hasVideoGym, videoTag, search, page, pageSize, includeVideos) - GET /exercises/{id} - Get exercise by ID or slug - GET /exercises/muscle-groups - List muscle groups with counts - GET /exercises/exercise-types - List exercise types with counts ### Workouts & Programs - GET /workouts/generate - Generate a workout (params: muscleGroup [required, supports comma-separated lists and full_body/upper_body/lower_body aliases], equipment, exerciseType, difficulty, exerciseCount, includeWarmup, warmupCount, includeCooldown, cooldownCount, includeVideos) - GET /programs/generate - Generate a multi-week program (params: goal, difficulty, daysPerWeek, weeks, equipment, includeWarmup, warmupCount, includeCooldown, cooldownCount, includeVideos) ### Form Analysis - POST /posture/analyze - AI form analysis from an exercise video (max 100MB). Body: video ({type: base64|url, data, media_type}), exercise_name, analysis_type, custom_instructions, num_frames. Returns a form score (0-100), detected issues with fixes, and corrective exercises. ### Nutrition & Foods - GET /foods - Search the food database (params: query [required], source, usdaOnly, country, per, page, pageSize) - GET /foods/{id} - Get full nutrition details for a food by ID or slug - GET /foods/barcode/{upc} - Look up a food product by UPC/EAN barcode (param: country) - POST /foods/log/text - AI food logging from a text description (Pro plan and above) - POST /foods/log/photo - AI food logging from a base64 photo (Pro plan and above) - POST /foods/log/audio - AI food logging from a base64 voice note, returns transcript + nutrition (Pro plan and above) ### Recipes - GET /recipes/search - Search recipes (params: query, diet, cuisine, mealType, maxCalories, minProtein, page, pageSize) - GET /recipes/{id} - Get a full recipe with ingredients, instructions, and nutrition - GET /recipes/diets - List available diet types with counts - GET /recipes/meal-types - List available meal types with counts ### Meal Plans - GET /mealplans/generate - Generate a 1-7 day meal plan (params: calories [required], diet, meals, days, macroSplit) ### Account - GET /usage - Check API usage and limits (includes monthly exercise cap) - GET /upgrade - Get available plans and billing portal URL - POST /upgrade - Start or upgrade a subscription via Stripe (body: plan, email) - GET /openapi.json - OpenAPI 3.0 specification ## JavaScript / TypeScript Example ```javascript const API_KEY = 'your_api_key'; // Get yours at https://ymove.app/exercise-api/signup const BASE = 'https://exercise-api.ymove.app/api/v2'; // List chest exercises const res = await fetch(`${BASE}/exercises?muscleGroup=chest`, { headers: { 'X-API-Key': API_KEY } }); const { data, pagination } = await res.json(); // Generate a workout (multiple muscle groups, comma-separated) const workout = await fetch(`${BASE}/workouts/generate?muscleGroup=chest,back&difficulty=intermediate`, { headers: { 'X-API-Key': API_KEY } }).then(r => r.json()); // Generate a 4-week program const program = await fetch(`${BASE}/programs/generate?goal=muscle_building&daysPerWeek=4&weeks=4`, { headers: { 'X-API-Key': API_KEY } }).then(r => r.json()); // Analyze exercise form from a video const analysis = await fetch(`${BASE}/posture/analyze`, { method: 'POST', headers: { 'X-API-Key': API_KEY, 'Content-Type': 'application/json' }, body: JSON.stringify({ video: { type: 'base64', data: '', media_type: 'video/mp4' }, exercise_name: 'Barbell Back Squat', num_frames: 16 }) }).then(r => r.json()); // Search foods const foods = await fetch(`${BASE}/foods?query=chicken+breast`, { headers: { 'X-API-Key': API_KEY } }).then(r => r.json()); // Search recipes const recipes = await fetch(`${BASE}/recipes/search?diet=high_protein&maxCalories=500`, { headers: { 'X-API-Key': API_KEY } }).then(r => r.json()); // Generate a 7-day meal plan const mealPlan = await fetch(`${BASE}/mealplans/generate?calories=2000&diet=high_protein&meals=4&days=7`, { headers: { 'X-API-Key': API_KEY } }).then(r => r.json()); ``` ## Python Example ```python import requests API_KEY = "your_api_key" # Get yours at https://ymove.app/exercise-api/signup BASE = "https://exercise-api.ymove.app/api/v2" headers = {"X-API-Key": API_KEY} exercises = requests.get(f"{BASE}/exercises?muscleGroup=chest", headers=headers).json() workout = requests.get(f"{BASE}/workouts/generate?muscleGroup=back", headers=headers).json() foods = requests.get(f"{BASE}/foods?query=chicken breast", headers=headers).json() meal_plan = requests.get(f"{BASE}/mealplans/generate?calories=2000&diet=high_protein&days=7", headers=headers).json() ``` ## curl Example ```bash curl -H "X-API-Key: your_api_key" "https://exercise-api.ymove.app/api/v2/exercises?muscleGroup=chest&pageSize=5" curl -H "X-API-Key: your_api_key" "https://exercise-api.ymove.app/api/v2/workouts/generate?muscleGroup=chest" curl -H "X-API-Key: your_api_key" "https://exercise-api.ymove.app/api/v2/foods?query=chicken+breast" curl -H "X-API-Key: your_api_key" "https://exercise-api.ymove.app/api/v2/recipes/search?diet=high_protein" ``` ## Muscle Groups chest, back, shoulders, biceps, triceps, forearms, quads, hamstrings, glutes, calves, core, full_body Workout aliases: full_body (all), upper_body (chest, back, shoulders, biceps, triceps, forearms, core), lower_body (quads, hamstrings, glutes, calves) ## Equipment Types machine, barbell, dumbbell, kettlebell, bodyweight, cable, medicine ball, weighted vest ## Exercise Types strength, yoga, stretching, cardio, plyometric, calisthenics, warmup, cooldown, balance, mobility, isometric, rehabilitation, functional, core, hiit ## Diets high_protein, low_carb, keto, vegan, vegetarian, mediterranean, paleo (meal plans also accept balanced) ## Cuisines american, mediterranean, asian, mexican, italian, indian, japanese ## Meal Types breakfast, lunch, dinner, snack ## Video URLs Exercise video URLs (videoUrl, videoHlsUrl, thumbnailUrl) are pre-signed and expire after 48 hours. Do not cache them. Always fetch fresh exercise data before displaying videos. ## Video Orientation (IMPORTANT for UI) Most exercise clips are PORTRAIT (vertical, ~9:16), shot for mobile. Do NOT default the video player to landscape (16:9). Read the `orientation` field on each video ("portrait" or "landscape") and size the player to a portrait container, e.g. CSS `aspect-ratio: 9 / 16` with `object-fit: cover`, so clips fill the frame instead of letterboxing. ## Monthly Exercise Cap Each plan has a monthly cap on distinct exercises accessed. Browse without spending quota by passing includeVideos=false on /exercises, /workouts/generate, and /programs/generate: no video fields are returned and the listed exercises do not count toward your cap. Warmup and cooldown exercises count toward the cap when included. ## Response Format All endpoints return JSON with a `data` field. List endpoints include `pagination`. ## Documentation https://ymove.app/exercise-api/docs ## OpenAPI Spec https://exercise-api.ymove.app/api/v2/openapi.json ## Full LLM Documentation https://ymove.app/llms-full.txt ## Sign Up (Free Trial) https://ymove.app/exercise-api/signup ## Pricing - Trial: Free, 7 days, 1,000 video minutes - Starter: $19/mo, 10,000 video minutes - Pro: $29/mo, 25,000 video minutes - Scale: $79/mo, 50,000 video minutes - Enterprise: $299/mo, 100,000 video minutes