Body Scan API chevron_right Introduction

Body Scan API

Reference

The WorkoutX Body Scan API provides photo-based body composition estimates for fitness apps, coaches, gyms and wellness programs. Results are estimates for general wellness and fitness tracking. Body Scan is not a medical device, has not been validated against DXA or any other reference method, and must not be used for diagnosis, treatment or medical monitoring. Send a single photo and receive body fat percentage, muscle score, body type, posture analysis, and estimated measurements — all as structured JSON.

Version
v1
Format
JSON
Auth
X-BodyScan-Key
Quick Start
# Analyze a body photo
curl -X POST 'https://amused-mercy-production-aeaa.up.railway.app/v1/analyze' \
  -H "X-BodyScan-Key: bsk_your_key_here" \
  -F "front_photo=@/path/to/photo.jpg" \
  -F "height_cm=178" \
  -F "weight_kg=80" \
  -F "age=28" \
  -F "gender=male"
Body Scan API chevron_right Authentication

Authentication

All Body Scan API requests require a X-BodyScan-Key header. Get your key from the Developer Portal. Every WorkoutX account gets 5 free scans once; they don't renew. Later scans use credits from one-time credit packs.

curl -X POST 'https://amused-mercy-production-aeaa.up.railway.app/v1/analyze' \
  -H "X-BodyScan-Key: bsk_your_key_here" \
  ...
Key format: All Body Scan API keys begin with bsk_ — different from WorkoutX Exercise API keys (wx_). Each key belongs to a separate account.
Body Scan API chevron_right POST /analyze
POST /v1/analyze

Analyze Body Photo

The core endpoint. Send a photo with biometric data, receive full body composition analysis as JSON. Consumes 1 credit per successful call.

tips_and_updates

Front photo only, or front and side

Every scan returns one body_fat_percentage estimate plus a body_fat_range. The range is a wide indicative band, not a measured accuracy figure: this product has not been validated against a reference method. A side_photo gives the engine a second view, which improves the waist and hip estimates.

Request

Content-Type: multipart/form-data

Field Type Required Description
front_photo file required Front-facing full-body photo. JPEG, PNG, or WebP. Max 15MB.
height_cm number required Height in centimetres. Range: 100–250.
weight_kg number required Weight in kilograms. Range: 30–300.
age integer required Age in years. Range: 18–100.
gender string required male or female
side_photo file optional Side-facing photo. Adds a second view, which improves the waist and hip estimates.
goal string optional fat_loss · muscle_gain · maintenance · general. Personalises AI insights.
external_user_id string optional Your app's user ID. Stored with the scan for history and progress tracking.
tape_waist_cm number optional Waist measured with a tape, in cm (40–200). Replaces the waist estimate from the photo in the equations.
tape_hip_cm number optional Hip measured with a tape, in cm (50–220). Replaces the hip estimate from the photo in the equations.
tape_neck_cm number optional Neck measured with a tape, in cm (20–70). Replaces the neck estimate from the photo in the equations.

The tape fields are optional and can be sent one at a time, always with a photo. A value outside its range returns 400. When any tape value is sent, the response adds a tape_measurements object with the values used, used_for_body_fat, complete and validation, which compares the photo estimate with the tape. The result is still an estimate.

Response

{
  "scan_id": "bscan_7xK9mP",

  "body_composition": {
    "body_fat_percentage": 14.6,
    "body_fat_category":   "Fitness",
    "body_fat_mass_kg":    9.9,
    "lean_mass_kg":        58.1,
    "body_type":           "Ecto-Mesomorph",
    "bmi":                 21.0,
    "bmi_category":        "Normal",
    "body_fat_range": {  // returned on every scan
      "low":        8.6,
      "high":       20.6,
      "basis":      "indicative_not_validated",
      "note":       "Indicative range, not a measured accuracy. This estimate has not been validated against a reference method."
    }
  },

  "scores": {
    "muscle_score":   53,
    "symmetry_score": 99.0,
    "fitness_score":  80
  },

  "estimated_measurements": {
    "shoulder_width_cm":       44.2,
    "waist_circumference_cm":  78.5,
    "hip_circumference_cm":    91.2,
    "waist_to_hip_ratio":      0.86
  },

  "ai_insights": {
    "body_type_detail":        "Athletic frame with good muscle-building potential.",
    "posture_notes":           "Neutral posture, shoulders level.",
    "fat_distribution":        "balanced",
    "muscle_definition_score":  7
  },

  "photo_guidance": null,  // non-null if clothing/pose issues detected

  "credits": {
    "used": 1,
    "remaining": 499
  },

  "meta": {
    "formula_version":      "v1.1",
    "overall_confidence":   0.87,  // capture quality indicator, not accuracy
    "processing_ms":        2731,
    "disclaimer":           "Estimates only. Not a medical device."
  },

  "created_at": "2025-06-03T10:00:00Z"
}

Code Examples

JavaScript (fetch)
const form = new FormData();
form.append('front_photo', photoFile);
form.append('height_cm', '178');
form.append('weight_kg', '80');
form.append('age', '28');
form.append('gender', 'male');

const res = await fetch('https://amused-mercy-production-aeaa.up.railway.app/v1/analyze', {
  method: 'POST',
  headers: { 'X-BodyScan-Key': 'bsk_your_key_here' },
  body: form
});
const data = await res.json();
console.log(data.body_composition.body_fat_percentage); // 14.6
Python (requests)
import requests

files = {'front_photo': open('photo.jpg', 'rb')}
data  = {
    'height_cm': '178', 'weight_kg': '80',
    'age': '28', 'gender': 'male'
}
r = requests.post(
    'https://amused-mercy-production-aeaa.up.railway.app/v1/analyze',
    headers={'X-BodyScan-Key': 'bsk_your_key_here'},
    files=files, data=data
)
print(r.json()['body_composition']['body_fat_percentage'])
Body Scan API chevron_right POST /feedback
POST /v1/:scanId/feedback

Submit Feedback

Optionally submit a body fat percentage from another method. It is stored with the scan. Feedback from a measurement method (DEXA, hydrostatic, caliper) earns +3 bonus scan credits.

Field Type Description
actual_body_fatnumberBody fat % from another method. Stored with the scan.
actual_weight_kgnumberOptional weight verification.
feedback_typestringdexa · hydrostatic · caliper → +3 credits · scale · self_estimate → no bonus
curl -X POST 'https://amused-mercy-production-aeaa.up.railway.app/v1/bscan_7xK9mP/feedback' \
  -H "X-BodyScan-Key: bsk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"actual_body_fat": 13.8, "feedback_type": "dexa"}'

// Response
{
  "status": "accepted",
  "bonus_credits": 3,
  "new_balance": 502
}
Body Scan API chevron_right GET /history
GET /v1/history

Scan History

Returns past scans for your account. Filter by external_user_id to get history for a specific end-user in your app.

curl 'https://amused-mercy-production-aeaa.up.railway.app/v1/history?external_user_id=usr_123&limit=10' \
  -H "X-BodyScan-Key: bsk_your_key_here"

// Response
{
  "scans": [
    {
      "id": "bscan_7xK9mP",
      "body_fat_pct": 14.6,
      "muscle_score": 53,
      "body_type": "Ecto-Mesomorph",
      "created_at": "2025-06-03T10:00:00Z"
    }
  ]
}
Body Scan API chevron_right GET /progress
GET /v1/progress

Progress Comparison

Compare two scans to show a user's progress. Returns body fat change, muscle score change, weight change, and a trend summary.

curl 'https://amused-mercy-production-aeaa.up.railway.app/v1/progress?from_scan_id=bscan_abc&to_scan_id=bscan_xyz' \
  -H "X-BodyScan-Key: bsk_your_key_here"

// Response
{
  "period_days": 30,
  "changes": {
    "body_fat_change":     -2.1,
    "muscle_score_change": +4,
    "weight_change_kg":    -1.5
  },
  "trend": "positive",
  "summary": "In 30 days: Lost 2.1% body fat, muscle score improved by 4 points."
}

Two scans made with different formula_version values can't be compared directly. The response then has comparable set to false, trend set to not_comparable, and null body fat, muscle and fitness changes.

Body Scan API chevron_right DELETE /:scanId
DELETE /v1/:scanId

Delete a Scan

Permanently deletes a single scan and its result data. This is a real deletion, not a hidden/flagged record — use this to honour an individual data-erasure request. Scoped to your account; you can only delete scans created with your own API key.

curl -X DELETE 'https://amused-mercy-production-aeaa.up.railway.app/v1/bscan_7xK9mP' \
  -H "X-BodyScan-Key: bsk_your_key_here"

// Response
{
  "status": "deleted",
  "scan_id": "bscan_7xK9mP"
}

// 404 if the scan doesn't exist or isn't yours
{ "error": "Not Found", "message": "Scan not found." }
Body Scan API chevron_right DELETE /patient/:id
DELETE /v1/patient/:externalUserId

Delete All Scans for an End-User

Permanently deletes every scan (and any associated feedback) recorded under a given external_user_id in your account — the identifier you passed to /analyze. This is the endpoint to use for a full data-erasure request for one of your end-users: one call removes their entire scan history with you. Returns the number of scans removed so you have a record that the request was carried out.

curl -X DELETE 'https://amused-mercy-production-aeaa.up.railway.app/v1/patient/usr_123' \
  -H "X-BodyScan-Key: bsk_your_key_here"

// Response
{
  "status": "deleted",
  "external_user_id": "usr_123",
  "scans_deleted": 4
}
Body Scan API chevron_right Credits & Billing

Credits & Billing

Every WorkoutX account gets 5 free scans once, added when you open Body Scan in the dashboard. They don't renew. After that, Body Scan uses a one-time credit pack system. No subscriptions. Purchased credits never expire. Each successful POST /analyze call consumes 1 credit.

GET /v1/billing/packs — List all available credit packs
{
  "free_scans": 5,
  "packs": [
    { "id": "starter", "scans": 20,   "price_usd": 39,  "price_per_scan": 1.95 },
    { "id": "builder", "scans": 100,  "price_usd": 149, "price_per_scan": 1.49 },
    { "id": "growth",  "scans": 500,  "price_usd": 599, "price_per_scan": 1.20 },
    { "id": "scale",   "scans": 1000, "price_usd": 999, "price_per_scan": 1.00 }
  ]
}
BUY Credit packs — bought from your WorkoutX dashboard

Credit packs are bought in the WorkoutX dashboard (Body Scan tab), not through an API call. Checkout is handled by our payment partner, which acts as merchant of record and issues the invoice. Credits are added to your account within seconds of payment and never expire.

POST /v1/billing/enterprise — Enterprise inquiry (10,000+ scans)
curl -X POST 'https://amused-mercy-production-aeaa.up.railway.app/v1/billing/enterprise' \
  -H "Content-Type: application/json" \
  -d '{"email":"dev@company.com","company":"FitApp","volume":"50000"}'
Body Scan API chevron_right Photo Guidelines

Photo Guidelines

Follow these guidelines to get a clean photo. Poor photos reduce the confidence score and may disable some features.

check_circle Do

  • • Stand facing directly toward the camera
  • • Full body visible — head to ankles
  • • Wear underwear, fitted sports gear, or swimwear
  • • Arms slightly away from body
  • • Good, even lighting
  • • Plain or simple background

cancel Avoid

  • • Loose, baggy clothing (inflates waist measurement)
  • • Side angles or tilted body
  • • Cropped photos (head or feet cut off)
  • • Dark or very bright lighting
  • • Blurry or low-resolution photos
  • • Multiple people in frame
Clothing detection: If loose clothing is detected, the API automatically leaves out the U.S. Navy and Relative Fat Mass equations (which depend on the waist estimate) and returns a photo_guidance object with improvement tips. Body fat is still estimated from height, weight, age and sex using the BMI-based equations. The vision model only writes notes.
Body Scan API chevron_right Credits & Pricing

Credits & Pricing

Body Scan is sold as one-time credit packs. No subscriptions. Credits never expire. Prices include tax. All packs include the full feature set.

Pack Scans Price Per Scan
free (automatic, not a pack_id)5$0Once per account
starter20$39$1.95
builder100$149$1.49
growth ★ Popular500$599$1.20
scale ★ Best Value1,000$999$1.00
enterprise10,000+CustomContact Us
Body Scan API chevron_right Error Codes

Error Codes

All errors return JSON with error and message fields.

Status Error Cause
400Bad RequestMissing required field or invalid value (e.g. gender not "male"/"female")
401UnauthorizedMissing or invalid X-BodyScan-Key header
402No CreditsCredit balance is 0. Purchase a pack to continue.
422UnprocessableNo person detected in photo, or body landmarks not visible enough
503Service UnavailableScan engine temporarily unavailable. Retry after a few seconds.
Docs chevron_right API v2

API v2

v2 is a new exercise library: 1,900+ movements as 2,700+ clips with professionally produced 3D animations, male and female models, 720p MP4 video at 30 fps, step-by-step instructions and form tips. It lives next to v1 at https://api.workoutxapp.com/v2. Your existing API key works on both.

  • Male and female models. Each version is its own exercise. counterpartId points at the same movement with the other model, and ?model=female filters the catalog.
  • 720p media. 600×720 MP4 loops at 30 fps (typically 100–300 KB each) with a JPEG poster, delivered through signed links that expire.
  • Richer data. Instructions, tips, primary and secondary muscles with anatomical names, difficulty, mechanics, force, calories and recommended sets and reps.
  • v1-compatible filters. bodyPart, target and equipment use the same values as v1.
key

Header authentication only

v2 accepts the key only in the X-WorkoutX-Key header. Requests with ?api-key= in the URL are rejected with 400, because keys in URLs end up in app bundles and logs.

Docs chevron_right v2 Endpoints

v2 Endpoints

EndpointDescription
GET /v2/exercisesSearch the catalog. Optional filters: bodyPart, target, equipment, category, model, difficulty, mechanic, force, muscle, name, plus limit, offset and lang (tr, de, es, fr, zh-SG, zh-HK; filters stay English). Case-insensitive. limit is capped at 10 on Free, 100 on Starter and 200 on other plans. Joint & Rehab filters jointFocus, intensityLevel and movementTag need Growth or Scale (legacy Ultra). Free uses one filter at a time; combining two or more (for example bodyPart and equipment) needs Starter or higher and otherwise returns 403.
GET /v2/exercises/{id}One exercise, with media links.
GET /v2/exercises/{id}/mediaFresh media links for one exercise. Use it when links have expired.
GET /v2/exercises/legacy/{v1Id}The v2 exercise for a v1 id. See the migration guide below.
GET /v2/bodyParts · /targets · /equipment · /categories · /musclesFilter values with exercise counts.
GET /v2/exercises/{id}/similarSimilar exercises, ranked. See Smart endpoints.
GET /v2/exercises/{id}/alternativesSame target muscle, other equipment.
GET /v2/exercises/{id}/caloriesCalorie estimate for a body weight and duration.
GET /v2/workout/generateA complete workout. Growth or Scale (legacy Pro, Ultra). See Workouts.
GET /v2/workout/programA multi-week program. Scale (legacy Ultra).
GET /v2/supplements …Supplement database and stacks. See Supplements.

Errors

StatusWhen
400Unknown or repeated query parameter, or a bad limit / offset.
400API key in the URL. Send it in the X-WorkoutX-Key header only.
401Missing or invalid key.
403The endpoint or filter needs a higher plan. The body names the feature and requiredPlan.
404Unknown exercise or supplement id.
422A workout or stack parameter is out of range, for example weeks outside 2–16.
429Rate limit or monthly request quota reached.
503Media is temporarily unavailable. Try again shortly.

Example

curl 'https://api.workoutxapp.com/v2/exercises?bodyPart=chest&model=male&limit=1' \
  -H "X-WorkoutX-Key: wx_your_key_here"
{
  "total": 160, "limit": 1, "offset": 0,
  "results": [{
    "id": "ex_WOZL6H",
    "name": "Push Ups Bodyweight",
    "model": "male",
    "counterpartId": "ex_KK4RJV",
    "category": "strength",
    "bodyPart": "Chest", "target": "Pectorals", "equipment": "Body Weight",
    "primaryMuscles": [{ "group": "Chest", "anatomical": ["Pectoralis Major"] }],
    "secondaryMuscles": [{ "group": "Triceps", "anatomical": ["Triceps brachii"] }],
    "instructions": ["Start in a high plank...", "..."],
    "tips": ["Keep your core tight...", "..."],
    "difficulty": "intermediate", "mechanic": "compound", "force": "push",
    "recommendedSets": "3-4", "recommendedReps": "6-10",
    "loopSeconds": null,
    "legacyIds": ["0662"],
    "media": {
      "expiresAt": "2026-11-20T09:00:00.000Z",
      "mediaVersion": 1,
      "watermarked": false,
      "mp4": "https://…/m/v1/ex_WOZL6H/mp4-720.mp4?...",
      "poster": "https://…/m/v1/ex_WOZL6H/poster.jpg?..."
    }
  }]
}
Docs chevron_right v2 Smart endpoints

Smart endpoints

Available on every plan. Results are full v2 exercises with media links, so they count toward your media limits like any other exercise. Ranked lists never include the exercise itself or its other-model clip. All three take lang.

EndpointParametersReturns
GET /v2/exercises/{id}/similarmodel (male, female or any; default: the exercise's model), limit, offset{ exerciseId, model, total, limit, offset, results }; each result has a score
GET /v2/exercises/{id}/alternativesequipment (preferred, ranked first), excludeEquipment (default: the exercise's own), model, limit, offsetSame target muscle, other equipment, ranked
GET /v2/exercises/{id}/caloriesweightKg (default 70), minutes (default 10)met, baseKcalPerMin, kcalPerMin, totalKcal

Example

curl 'https://api.workoutxapp.com/v2/exercises/ex_SAWOOH/alternatives?equipment=dumbbell&limit=3' \
  -H "X-WorkoutX-Key: wx_your_key_here"
Docs chevron_right v2 Workouts

Workouts & programs

GET /v2/workout/generate builds one session (Growth, Scale; legacy Pro, Ultra). GET /v2/workout/program builds a multi-week plan (Scale; legacy Ultra). Both run on a rule-based expert engine, not a language model or machine learning: the same parameters and seed give the same result. Every exercise is a v2 exercise with media links. model picks the male or female clip (default male); a movement that only exists in the other model is used in that model. lang translates the exercises. The response shape differs from /v1/workout/*, which is unchanged.

How a session is built

  • Movement patterns, not body parts. Each split is a template of slots such as squat, hip hinge, horizontal press, row, vertical pull or lunge, then accessories and core. A full-body day gets a squat, a press, a hinge and a pull before any curl, and a push day gets a press, an overhead press and a fly rather than three flies. Each slot gets the best fitting exercise for the equipment, level and joints given, never two versions of the same movement.
  • Prescriptions by goal and level. Sets, reps or a duration, rest, effort (rir, reps in reserve), tempo and load depend on the goal, the exercise's role (main, secondary, accessory, core) and the level. The session is then fitted to duration: every exercise at its minimum sets first, then more sets for the most important lifts while time allows.
  • Warm-up and cool-down. warmup.items are easy cardio and dynamic mobility for the joints the session uses, and warmup.rampUp describes ramp-up sets before the first main lift. cooldown.items are stretches for the muscles trained. Both are catalog exercises with media.
  • Supersets and circuits. block groups the exercises: A, B are straight sets; C1 and C2 are a superset of opposing muscle groups (push with pull, legs with core), where the first one rests 15 s before its partner; in a circuit every station is A1, A2… with rounds and the timing in circuit.
  • Joint care. avoidJoints leaves out movements that load those joints heavily, gives moderate ones lighter loads and higher reps with a note, and adds a line to notes. When a slot's pattern is ruled out, a gentler pattern stands in (for example a hinge or glute exercise instead of a squat).
  • Swaps. Every exercise has alternatives: other exercises with the same movement pattern that fit the same filters. They carry no media; fetch the one the user picks with GET /v2/exercises/{id}.
  • Explained. Each exercise has a rationale (for example "Main lift: squat for the quadriceps and glutes.") and a cue (its first form tip), and summary counts working sets per muscle group.
health_and_safety

Joint care is general guidance, not medical advice

avoidJoints changes which exercises are chosen and how they are prescribed. It does not replace advice from a doctor or physiotherapist, and your app should say so to users with pain or an injury.

Prescriptions

GoalMain liftsSecondaryAccessories
strength5 × 3–5, 180 s rest, 80–87% of 1RM4 × 5–6, 150 s, 75–80% of 1RM3 × 8–10, 90 s
muscle_gain4 × 6–8, 120 s, 70–80% of 1RM, tempo 3-0-1-03 × 8–10, 90 s3 × 10–15, 60 s
general_fitness3 × 8–10, 90 s3 × 10–12, 75 s2 × 12–15, 60 s
fat_loss, enduranceCircuit of 3–4 rounds by level: 30–50 s of work and 10–30 s rest per station, 60–90 s between rounds. Rep-based stations: 12–15 reps (fat_loss) or 15–20 (endurance). Rounds are added while they fit the duration.
mobilityMobility drills, yoga poses and stretches: 2–3 sets of 30–45 s holds.

These are the prescriptions before the session is fitted to duration, which can lower or raise set counts. Beginners get one set fewer on main and secondary lifts, one more rep in reserve and no %1RM; advanced lifters get an extra accessory set and one rep less in reserve. Body-weight exercises get higher reps unless they are hard ones such as pull-ups or dips. strength, muscle_gain and general_fitness sessions over 30 minutes start the first main lift with ramp-up sets.

GET /v2/workout/generate parameters

ParameterDefaultValues
goalmuscle_gainmuscle_gain, strength, fat_loss, endurance, mobility, general_fitness
levelintermediatebeginner, intermediate, advanced
duration4515–120 minutes, warm-up and cool-down included
equipmentfull gymComma-separated equipment (barbell, dumbbell, kettlebell, cable, band, leverage machine, smith machine, ez barbell, trap bar, medicine ball, suspension trainer…) and apparatus (bench, pull-up bar, box, parallel bars, gymnastic rings), or a preset: gym (everything), home (body weight, dumbbell, kettlebell, band, bench), bodyweight. Body weight is always allowed; household items such as a mat, wall or chair are assumed. List apparatus too: barbell,dumbbell without bench leaves out bench presses.
splitfull_bodyfull_body, full_body_b, full_body_c, upper, upper_b, lower, lower_b, push, push_b, pull, pull_b, legs, legs_b, core, conditioning, mobility. The _b and _c days lead with other lifts. The v1 names push_pull_legs and upper_lower still work. Default conditioning for fat_loss and endurance; mobility sessions always use the mobility template.
bodyFocus–Comma-separated: chest, back, shoulders, arms, biceps, triceps, forearms, legs, quads, hamstrings, glutes, hips, calves, core, abs, obliques, cardio, mobility. Overrides split (the response says "split": "custom"). With goal=mobility it picks the muscles to stretch.
avoidJoints–Comma-separated: knee, shoulder, lumbar_spine, elbow, wrist, hip, ankle. General guidance, not medical advice.
formatautoauto, straight, superset, circuit. auto is a circuit for fat_loss and endurance, straight sets for strength and mobility, and otherwise supersets up to 60 minutes and straight sets above. Mobility sessions are always straight sets.
exclude–Comma-separated v2 ids to leave out; excluding one also excludes its other-model clip
seedrandomSame seed and parameters, same workout. A different seed picks among comparable movements at your level for each slot, so it varies the workout; a narrow pool (for example bodyweight with a bodyFocus at beginner level) has fewer variations. The response always carries the seed used.
modelmalemale, female
langentr, de, es, fr, zh-SG, zh-HK. Translates the exercise objects and swap names; the plan's own text (cue, rationale, notes) stays English.

A value outside these sets or ranges returns 422 Invalid Parameter; an unknown or repeated parameter returns 400. If nothing fits the filters, exercises is empty and notes says why. estimatedDurationMinutes is an estimate including warm-up and cool-down, so show it as "about X minutes".

Example: a session

curl 'https://api.workoutxapp.com/v2/workout/generate?goal=muscle_gain&duration=45&equipment=dumbbell,bench&model=female&seed=doc1' \
  -H "X-WorkoutX-Key: wx_your_key_here"
{
  "goal": "muscle_gain", "level": "intermediate", "model": "female", "seed": "doc1",
  "split": "full_body", "format": "superset",
  "targetDurationMinutes": 45, "estimatedDurationMinutes": 41,
  "equipment": ["bench", "body weight", "dumbbell"],
  "summary": {
    "totalExercises": 5, "workingSets": 15,
    "patterns": ["squat", "push_horizontal", "hinge", "pull_horizontal", "push_vertical"],
    "muscles": [{ "group": "Quads", "sets": 7.5 }, { "group": "Glutes", "sets": 7.5 }, …]
  },
  "warmup": {
    "minutes": 6,
    "rampUp": "Before Dumbbell Front Squat: 2 ramp-up sets at about 50% × 10 and 75% × 5 of your working weight.",
    "items": [
      { "durationSeconds": 240, "perSide": false,
        "note": "Easy pace: raise your heart rate and body temperature.",
        "exercise": { "id": "ex_L4EMF6", "name": "Walking", "model": "female", "media": { … }, … } },
      …
    ]
  },
  "exercises": [
    {
      "order": 1, "block": "A", "role": "main", "pattern": "squat",
      "sets": 3, "reps": "6-8", "perSide": false, "restSeconds": 120,
      "rir": 2, "tempo": "3-0-1-0", "load": "70–80% of 1RM",
      "cue": "(the exercise's first form tip)",
      "rationale": "Main lift: squat for the quadriceps and glutes.",
      "alternatives": [
        { "id": "ex_O6QQUL", "name": "Bodyweight Full Squat With Overhead Press", "equipment": "Body Weight", "model": "male" },
        { "id": "ex_KNIBLJ", "name": "Bodyweight Squat", "equipment": "Body Weight", "model": "male" }
      ],
      "exercise": {
        "id": "ex_TFXRNX", "name": "Dumbbell Front Squat", "model": "male",
        "media": { "mp4": "https://…/mp4-720.mp4?…", "poster": "https://…/poster.jpg?…", "expiresAt": "…" },
        …
      }
    },
    …,
    { "order": 4, "block": "D1", "role": "secondary", "pattern": "pull_horizontal",
      "sets": 3, "reps": "8-10", "restSeconds": 15, "rir": 2, …,
      "exercise": { "id": "ex_ZMZBKN", "name": "Dumbbells Bent Over Row", … } },
    { "order": 5, "block": "D2", "role": "secondary", "pattern": "push_vertical",
      "sets": 3, "reps": "8-10", "restSeconds": 90, "rir": 2, …,
      "exercise": { "id": "ex_GW4YEO", "name": "Dumbbell Push Press", … } }
  ],
  "cooldown": {
    "minutes": 2,
    "items": [
      { "durationSeconds": 30, "perSide": false,
        "note": "Stretch for the quads; breathe slowly, no bouncing.",
        "exercise": { "id": "ex_CWLQWA", "name": "Standing Quadriceps Stretch", … } },
      …
    ]
  }
}

Programs

  • Weekly split. daysPerWeek, the goal and the level set the week (schedule): full body A/B/C, upper/lower or push/pull/legs. Fat-loss and endurance programs mix strength days with conditioning circuits. General-fitness and endurance plans of 5–6 days, and 6-day fat-loss plans, include a mobility day. Each distinct day is built once with the session engine (sessions), and later days avoid the exercises of earlier ones.
  • Periodisation and deloads. Training runs in blocks that end with a deload week: every 6 weeks for beginners, 5 for intermediates, 4 for advanced (progressionModel.deloadEvery, null when the program is too short for one). Each week has a phase (accumulation, intensification, deload or test) and a line of guidance.
  • Progression by goal. progressionModel explains the method and the rule for adding load. Muscle-gain blocks move closer to failure each week and add accessory sets; strength blocks take the main lifts from sets of 6 to triples and doubles; circuits add rounds and work time; mobility holds get longer.
  • Test week. Strength programs of 6 weeks or more end with a test week: work up to a heavy single or triple on the main lifts.
  • Rotation. Main lifts keep their exercise in every week so progress can be tracked. Accessories and core exercises switch to one of their alternatives at each new block, so an exerciseId can change from one block to the next.
  • Weekly volume. Sets per muscle group are balanced toward a target for the goal and level; weeklyVolume reports each group's sets, the target range and low, ok or high (empty for mobility programs).
  • Exercise library. Exercises in sessions and program are light (exerciseId, name). exerciseLibrary holds every exercise the program uses, once, as a full v2 exercise with media links.

GET /v2/workout/program parameters

ParameterDefaultValues
goalmuscle_gainAs for /v2/workout/generate
levelintermediatebeginner, intermediate, advanced
weeks42–16
daysPerWeek32–6
duration6020–120 minutes per session
equipmentfull gymSame values and presets as /v2/workout/generate
avoidJoints–As for /v2/workout/generate. General guidance, not medical advice.
formatautoAs for /v2/workout/generate, applied to every training day; mobility days are always straight sets
seedrandomSame seed and parameters, same program
model, langmale, enAs for /v2/workout/generate

Programs take no split, bodyFocus or exclude: the weekly split comes from the goal and the days per week.

Example: a program

curl 'https://api.workoutxapp.com/v2/workout/program?goal=muscle_gain&weeks=6&daysPerWeek=3&seed=doc2' \
  -H "X-WorkoutX-Key: wx_your_key_here"
{
  "goal": "muscle_gain", "level": "intermediate", "model": "male", "seed": "doc2",
  "weeks": 6, "daysPerWeek": 3, "sessionDurationMinutes": 60, "equipment": ["any"],
  "schedule": [
    { "day": 1, "weekday": "Monday", "session": "A", "name": "Full body A" },
    { "day": 2, "weekday": "Wednesday", "session": "B", "name": "Full body B" },
    { "day": 3, "weekday": "Friday", "session": "C", "name": "Full body C" }
  ],
  "progressionModel": {
    "name": "Double progression with rising effort",
    "summary": "Each block starts about 3 reps short of failure and gets closer every week; accessories gain a set in the second half of the block. A deload week ends each block.",
    "rule": "When you reach the top of the rep range on every set, add 2.5–5% load next session and work back up the range.",
    "deloadEvery": 5
  },
  "blocks": [
    { "block": 1, "weeks": [1, 2, 3, 4, 5], "focus": "Foundation", "deloadWeek": 5 },
    { "block": 2, "weeks": [6], "focus": "Progression" }
  ],
  "weeklyVolume": [
    { "group": "Chest", "sets": 13.5, "target": [10, 16], "status": "ok" },
    { "group": "Triceps", "sets": 9, "target": [10, 16], "status": "low" },
    …
  ],
  "sessions": [
    {
      "session": "A", "name": "Full body A", "split": "full_body", "goal": "muscle_gain",
      "format": "superset", "estimatedDurationMinutes": 57,
      "warmup": { "minutes": 6, "rampUp": "Before Barbell Full Squat: …",
                  "items": [{ "exerciseId": "ex_YOPLC7", "name": "Treadmill Walk", "durationSeconds": 240, … }] },
      "cooldown": { "minutes": 2, "items": [{ "exerciseId": "ex_5P2L5F", "name": "Fixed Bar Stretch", … }] },
      "exercises": [
        { "order": 1, "block": "A", "role": "main", "pattern": "squat",
          "exerciseId": "ex_NEMYLA", "name": "Barbell Full Squat",
          "cue": "(the exercise's first form tip)",
          "rationale": "Main lift: squat for the quadriceps and glutes.",
          "alternatives": [{ "id": "ex_NN32EP", "name": "Cable Goblet Squat", "equipment": "Cable", "model": "male" }, …] },
        …
      ]
    },
    …
  ],
  "program": [
    {
      "week": 1, "block": 1, "phase": "accumulation", "deload": false,
      "guidance": "First week of the block: leave a few reps in reserve and focus on technique.",
      "days": [
        { "day": 1, "weekday": "Monday", "session": "A", "name": "Full body A",
          "exercises": [
            { "order": 1, "block": "A", "role": "main", "exerciseId": "ex_NEMYLA", "name": "Barbell Full Squat",
              "sets": 3, "reps": "6-8", "perSide": false, "restSeconds": 120,
              "rir": 3, "load": "70–80% of 1RM", "tempo": "3-0-1-0" },
            …
          ] },
        …
      ]
    },
    …
  ],
  "exerciseLibrary": [
    { "id": "ex_NEMYLA", "name": "Barbell Full Squat", "model": "male", "media": { … }, … },
    …
  ]
}
Docs chevron_right v2 Supplements

Supplements

The same evidence-graded supplement data as v1, in the v2 page shape. Informational content only, not medical advice. Supplement text is English.

EndpointPlansNotes
GET /v2/supplementsGrowth, Scale (legacy Pro, Ultra)Filters category, goal, timing, evidence, search; { total, limit, offset, results, disclaimer }
GET /v2/supplements/filtersGrowth, Scale (legacy Pro, Ultra)Filter values with counts
GET /v2/supplements/{id}Growth, Scale (legacy Pro, Ultra)One supplement
GET /v2/supplements/exercise/{id}Growth, Scale (legacy Pro, Ultra)Supplements relevant to a v2 exercise; limit up to 20
GET /v2/supplements/stackScale (legacy Ultra)goal (required) and level (essential, standard, comprehensive)
Docs chevron_right Media in v2

Media in v2

Media links are signed and expire 24–25 hours after they are issued (media.expiresAt). Load the animations directly from these links. Within the same hour the API returns identical links, so normal browser and app caching keeps working. When a subscription ends, its links stop working within about a day.

rule

Store exercise ids, not media URLs

Saved URLs stop working when they expire. Save the exercise id, and get links when you show the exercise: from the exercise response, from GET /v2/exercises/{id}/media, or with freshMedia(id) in the SDKs, which reuses links until they are close to expiry. Downloading the files or serving them from your own servers or CDN is not permitted on any plan.

Formats by plan

KeyFilePlans
mp4600×720 MP4 loop, 30 fps, typically 100–300 KBAll paid plans (Free: 300×360 with watermark)
poster600×720 still frame (JPEG)All paid plans (Free: 300×360 with watermark)

Play mp4 in a muted, looping video player, and show poster while it loads.

Media limits by plan

PlanDifferent exercisesMedia views / month
FreeWatermarked previews, 10 results per request–
Starter1,000 per rolling 30 days25,000
Legacy Basic500 per rolling 30 days25,000
Growth (legacy Pro)Unlimited150,000
Scale (legacy Ultra)Unlimited600,000
EnterprisePer contractPer contract

On Starter, once media for 1,000 different exercises (500 on legacy Basic) has been loaded in 30 days, new exercises return media: null and mediaLimitReached: true. Exercises you have already used keep working. The X-Media-Exercises-Limit, X-Media-Exercises-Used and X-Media-Exercises-Remaining headers show your usage, and X-Media-Exercises-Next-Free-At shows when allowance frees up at the limit. Only exercises whose video or image was actually loaded count: listing the catalog with media uses up nothing, and usage updates within about 10 minutes of a load. At the limit, links for exercises not used yet answer 429 media_exercise_limit. We email you at 80% and 100%.

A media view is one file started. Range follow-ups and HEAD requests are not counted. Over the monthly limit, the media server answers 429 media_quota_exceeded for 720p files until next month or an upgrade. Watermarked previews keep working.

Web

<video src="{media.mp4}" poster="{media.poster}"
       autoplay loop muted playsinline></video>

iOS (Swift)

let links = try await wx.v2.freshMedia(exerciseId)
let item = AVPlayerItem(url: URL(string: links!.mp4)!)
let player = AVQueuePlayer()
let looper = AVPlayerLooper(player: player, templateItem: item)  // keep a reference
player.isMuted = true
player.play()

Android (Kotlin, Media3 ExoPlayer)

val player = ExoPlayer.Builder(context).build().apply {
    setMediaItem(MediaItem.fromUri(media.mp4))
    repeatMode = Player.REPEAT_MODE_ONE
    volume = 0f
    prepare()
    play()
}

Flutter (video_player)

final links = await wx.v2.freshMedia(exerciseId);
final controller = VideoPlayerController.networkUrl(Uri.parse(links!.mp4));
await controller.initialize();
await controller.setLooping(true);
await controller.setVolume(0);
await controller.play();

Media errors

StatuserrorWhat to do
403link_expiredGet fresh links from the API.
403bad_signatureThe link was changed or is invalid. Use links exactly as the API returns them.
404not_foundThere is no file at this link.
429rate_limitedBulk downloading detected. The account is paused for an hour.
429media_quota_exceededMonthly media views used up. 720p files work again next month or after an upgrade. Watermarked previews keep working.
Docs chevron_right Migrating from v1

Migrating from v1 to v2

For a step-by-step walkthrough with code for each platform, see the v2 migration guide. v1 keeps working, and you'll get plenty of notice before it is retired. Your API key works on both versions, so you can move one screen at a time.

  1. Send the key in the header. Replace ?api-key= with the X-WorkoutX-Key header and change the path from /v1 to /v2.
  2. Map the exercise ids you have stored. Call GET /v2/exercises/legacy/{v1Id} (leading zeros optional) once per stored id and save the v2 id. The match field says how close it is. exact and equivalent are the same movement and safe to replace automatically. alternative (same movement with other equipment, or the base movement of a variation) and closest are suggestions: let your users confirm them or keep the v1 exercise. none means there is no v2 version yet.
  3. Replace gifUrl with media. Play media.mp4 in a looping video player, use media.poster for stills, and refresh links when they expire. Don't store them.
  4. Offer the female model. Show counterpartId as a model switch, or filter with ?model=female.

What changed in the response

v1v2
"0662""ex_WOZL6H" (new ids; legacyIds lists the v1 ids)
gifUrlmedia { mp4, poster, expiresAt }
secondaryMuscles: ["Triceps"]secondaryMuscles: [{ group, anatomical }]
{ total, count, data }{ total, limit, offset, results }
–model, counterpartId, tips, loopSeconds
Docs chevron_right Introduction

WorkoutX API
Reference

The WorkoutX API provides programmatic access to 1,900+ exercises (v2) complete with 720p video animations (v1: 1,300+ with GIFs), body part filters, target muscle data, equipment types, step-by-step instructions, and secondary muscle information.

data_object OpenAPI spec (openapi.json)

What's New · Jun 2026

health_and_safety Joint & Rehab Metadata is here — every exercise now ships with derived joint_focus, intensity_level, and movement_tags fields, and Growth, Scale and legacy Ultra keys can filter /v1/exercises/search directly by joint, intensity, and movement tag. Built for physical therapy, rehab, mobility, and senior-fitness apps.

See the docs arrow_forward
Base URL
api.workoutxapp.com
Version
v1
Format
JSON
Auth
API Key
Quick Start
# Fetch 5 exercises using your API key
curl 'https://api.workoutxapp.com/v1/exercises?limit=5' \
  -H "X-WorkoutX-Key: wx_your_key_here"
Docs chevron_right Authentication

Authentication

All API requests require authentication via an API key. You can pass your key in one of two ways.

1

HTTP Header (Recommended)

Send the key as a request header. This is the preferred method as it keeps the key out of server logs.

curl 'https://api.workoutxapp.com/v1/exercises' \
  -H "X-WorkoutX-Key: wx_your_key_here"
2

Query Parameter

Append the key as a query string parameter. Convenient for quick tests.

curl 'https://api.workoutxapp.com/v1/exercises?api-key=wx_your_key_here'
info

Don't have an API key?

Register for a free account on the Developer Portal to get your key instantly. Free tier includes 500 requests in total.

Docs chevron_right Endpoints

Endpoints

All endpoints are prefixed with https://api.workoutxapp.com/v1. All responses are JSON.

GET /v1/exercises

List all exercises with pagination. Returns an array of exercise objects based on your plan's limit.

Query Parameters

Name Type Required Description
bodyPart string No Filter by body part, e.g. chest. Case-insensitive.
target string No Filter by target muscle, e.g. pectorals.
equipment string No Filter by equipment, e.g. barbell.
name string No Partial name match, e.g. squat.
effortLevel string No beginner · intermediate · advanced. Filters on difficulty.
mechanics string No compound · isolation. Filters on mechanic.
force string No push · pull · hold · carry.
isUnilateral boolean No Single-sided / alternating movements only.
sortMethod string No Sort by name, bodyPart, target, equipment, effortLevel, mechanics, force, popularityRank, or caloriesBurnPerMin.
sortOrder string No ascending (default) · descending.
limit integer No Default: 10. Max depends on plan.
offset integer No Default: 0. Number of results to skip.
lang string No 🌍 Localize the response. en (default) · de · es · fr · zh-SG · zh-HK. Translates exercise names, instructions, body part, equipment, target, and category fields. Falls back to English for any untranslated exercise.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises?limit=2&offset=0' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  {
    "id": "0001",
    "name": "3/4 Sit-up",
    "bodyPart": "Waist",
    "target": "Abs",
    "equipment": "Body Weight",
    // apparatus: physical apparatus needed beyond an open floor — [] means
    // nothing extra needed. Only present on equipment: "Body Weight" records.
    "apparatus": [],
    "difficulty": "beginner",
    "mechanic": "isolation",
    "force": "push",
    "caloriesPerMinute": 4.3,
    "popularityRank": 5,
    "gifUrl": "https://api.workoutxapp.com/v1/gifs/0001.gif"
    // + isUnilateral, recommendedSets/Reps, met, category, description, instructions, secondaryMuscles
  },
  // ...
]
GET /v1/exercises/exercise/:id

Get a single exercise by its unique ID. Returns a single exercise object or a 404 if the ID does not exist.

Path Parameters

Name Type Required Description
id string Yes Exercise ID string, e.g. "0001"

Query Parameters

Name Type Required Description
lang string No 🌍 Localize the response. en (default) · de · es · fr · zh-SG · zh-HK. Translates name, instructions, bodyPart, equipment, target, category, difficulty, mechanic, and force. Falls back to English if the exercise has no translation yet.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/exercise/0001?lang=de' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

{
  "id": "0001",
  "name": "3/4 Sit-up",
  "bodyPart": "Waist",
  "target": "Abs",
  "equipment": "Body Weight",
  "apparatus": [],
  "secondaryMuscles": ["Hip Flexors", "Lower Back"],
  "instructions": [
    "Lie flat on your back with your knees bent and feet flat on the ground.",
    "Place your hands behind your head with your elbows pointing outwards.",
    "Engaging your abs, slowly lift your upper body off the ground..."
  ],
  "gifUrl": "https://api.workoutxapp.com/v1/gifs/0001.gif",
  "category": "strength",
  "difficulty": "beginner",
  "mechanic": "isolation",
  "force": "push",
  "met": 3.5,
  "caloriesPerMinute": 4.3,
  "description": "3/4 Sit-up is a beginner single-joint isolation pushing exercise...",
  "isUnilateral": false,
  "popularityRank": 5,
  "recommendedSets": "3",
  "recommendedReps": "10-15",
  // Growth+ — derived Joint & Rehab Metadata:
  "joint_focus": "lumbar_spine",
  "intensity_level": "gentle",
  "movement_tags": ["beginner-friendly", "controlled-movement", "minimal-equipment"]
}

The apparatus field

equipment answers what load is being moved — "Body Weight" means no external load. It does not tell you what the user needs access to: Ring Dips and Pull-ups are both bodyweight exercises, but neither is doable in an empty room. apparatus closes that gap.

It is present only on records with equipment: "Body Weight" (315 exercises), and lists what is required beyond an open floor. An empty array means genuinely nothing is needed — that is 193 of the 315. Values are an AND: ["box-or-step", "wall"] means both are required.

Value Count Meaning
pull-up-bar38Any overhead bar you hang from — pull-ups, hanging leg raises, levers, muscle-ups.
bench27A bench, chair or similar stable surface the body sits, lies or hangs off.
wall17A wall or equivalent immovable vertical surface, for support, balance or pushing against.
dip-station11Parallel bars, dip bars, parallettes or a dip-pull-up cage.
box-or-step9A box, step, block, stair or other elevated platform for hands or feet.
suspension-trainer6TRX-style straps with an anchor point.
horizontal-bar5A bar fixed at waist/chest height to row under. Distinct from pull-up-bar.
towel4A towel, used to create self-generated resistance.
gymnastic-rings3Gymnastic rings.
balance-board1A balance board.
slide-board1A slide board or sliding platform for the foot.
vertical-pole1A vertical pole (human flag).
info

These 12 values are the complete live set — every value listed appears on at least one record. Exercises whose instructions genuinely require a machine or an external weight were corrected at the equipment field instead of being tagged here, so you will not find gym-machine, dumbbell or ab-wheel in the data. Where an exercise's instructions offer alternatives ("a bench or parallel bars"), the array holds the single most likely apparatus rather than overstating the requirement as an AND of both.

GET /v1/exercises/bodyPart/:bodyPart

Filter exercises by body part. Returns a paginated array of matching exercises.

Parameters

Name Type Required Description
bodyPart string (path) Yes One of: back, cardio, chest, lower arms, lower legs, neck, shoulders, upper arms, upper legs, waist
limit integer (query) No Default: 10. Max depends on plan.
offset integer (query) No Default: 0.
lang string (query) No 🌍 Localize the response. en (default) · de · es · fr · zh-SG · zh-HK. Falls back to English for any untranslated exercise.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/bodyPart/chest?limit=5' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  {
    "id": "0009",
    "name": "barbell bench press",
    "bodyPart": "chest",
    "target": "pectorals",
    "equipment": "barbell",
    "gifUrl": "https://[supabase-url]/storage/v1/object/public/exercise-gifs/0009.gif",
    "secondaryMuscles": ["triceps", "delts"]
  },
  // ...
]
GET /v1/exercises/target/:target

Filter exercises by target muscle group. Returns a paginated array of matching exercises.

Parameters

Name Type Required Description
target string (path) Yes e.g. abs, biceps, calves, cardiovascular system, delts, forearms, glutes, hamstrings, lats, pectorals, quads, traps, triceps, upper back
limit integer (query) No Default: 10. Max depends on plan.
offset integer (query) No Default: 0.
lang string (query) No 🌍 Localize the response. en (default) · de · es · fr · zh-SG · zh-HK. Falls back to English for any untranslated exercise.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/target/biceps?limit=5' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  {
    "id": "0023",
    "name": "barbell curl",
    "bodyPart": "upper arms",
    "target": "biceps",
    "equipment": "barbell",
    "secondaryMuscles": ["forearms"]
  },
  // ...
]
GET /v1/exercises/equipment/:equipment

Filter exercises by the equipment required. Returns a paginated array of matching exercises.

Parameters

Name Type Required Description
equipment string (path) Yes e.g. barbell, body weight, cable, dumbbell, kettlebell, resistance band, smith machine, and more
limit integer (query) No Default: 10. Max depends on plan.
offset integer (query) No Default: 0.
lang string (query) No 🌍 Localize the response. en (default) · de · es · fr · zh-SG · zh-HK. Falls back to English for any untranslated exercise.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/equipment/dumbbell?limit=5' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  {
    "id": "0042",
    "name": "dumbbell bicep curl",
    "bodyPart": "upper arms",
    "target": "biceps",
    "equipment": "dumbbell",
    "secondaryMuscles": ["forearms"]
  },
  // ...
]
GET /v1/exercises/name/:name

Search exercises by name using partial string matching. Useful for autocomplete or free-text search features.

Parameters

Name Type Required Description
name string (path) Yes Partial name string. Case-insensitive match.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/name/squat' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  {
    "id": "0201",
    "name": "barbell squat",
    "bodyPart": "upper legs",
    "target": "quads",
    "equipment": "barbell"
  },
  {
    "id": "0202",
    "name": "goblet squat",
    "bodyPart": "upper legs",
    "target": "quads",
    "equipment": "kettlebell"
  },
  // ...
]
GET /v1/exercises/bodyPartList

Get the complete list of all available body parts. Useful for populating filter dropdowns in your UI.

info

No parameters required. Returns a simple array of strings.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/bodyPartList' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  "back",
  "cardio",
  "chest",
  "lower arms",
  "lower legs",
  "neck",
  "shoulders",
  "upper arms",
  "upper legs",
  "waist"
]
GET /v1/exercises/targetList

Get the complete list of all target muscles in the database. Use these values with the /target/:target endpoint.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/targetList' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  "abs",
  "biceps",
  "calves",
  "cardiovascular system",
  "delts",
  "forearms",
  "glutes",
  "hamstrings",
  "lats",
  "pectorals",
  "quads",
  "serratus anterior",
  "spine",
  "traps",
  "triceps",
  "upper back"
]
GET /v1/exercises/equipmentList

Get the complete list of all equipment types in the database. Use these values with the /equipment/:equipment endpoint.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/equipmentList' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

[
  "barbell",
  "body weight",
  "cable",
  "dumbbell",
  "ez barbell",
  "kettlebell",
  "leverage machine",
  "medicine ball",
  "olympic barbell",
  "resistance band",
  "roller",
  "rope",
  "skierg machine",
  "sled machine",
  "smith machine",
  "stability ball",
  "stationary bike",
  "stepmill machine",
  "tire",
  "trap bar",
  "upper body ergometer",
  "weighted",
  "wheel roller"
]
GET /v1/exercises/:id/similar Smart ✨

Returns exercises similar to the given one, ranked by shared target muscle, body part, mechanics, force type, secondary muscles, and effort level. Each result includes a similarityScore (higher = more similar). Perfect for "you might also like" recommendations.

Query Parameters

Name Type Default Description
limitinteger10Number of similar exercises to return
offsetinteger0Pagination offset

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/0025/similar?limit=5' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

{
  "total": 312,
  "count": 5,
  "data": [
    {
      "id": "3294",
      "name": "Archer Push Up",
      "target": "Pectorals",
      "equipment": "Body Weight",
      "similarityScore": 115
    }
  ]
}
GET /v1/exercises/:id/alternatives Smart ✨

Find exercises that hit the same target muscle but use different equipment. Perfect for "I don't have a barbell at home" or "what can I do at the gym instead?" scenarios. Each result includes an alternativeScore.

Query Parameters

Name Type Description
equipmentstringPrefer alternatives using this equipment (e.g. dumbbell)
excludeEquipmentstringExclude alternatives with this equipment (defaults to source exercise's equipment)
limitintegerResults per page (default 10)

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/0025/alternatives?equipment=dumbbell' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

{
  "total": 48,
  "count": 3,
  "data": [
    {
      "id": "0289",
      "name": "Dumbbell Bench Press",
      "target": "Pectorals",
      "equipment": "Dumbbell",
      "alternativeScore": 115
    }
  ]
}
GET /v1/exercises/:id/calories Smart ✨

Estimate how many calories a user burns performing this exercise, scaled to their body weight. Uses MET-based formula: kcal = baseKcalPerMin × (weightKg / 70) × minutes. Every exercise in the database has a per-minute calorie value.

Query Parameters

Name Type Default Description
weightKgnumber70User's body weight in kilograms
minutesnumber10Duration of the activity in minutes

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/0025/calories?weightKg=80&minutes=15' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

{
  "id": "0025",
  "name": "Barbell Bench Press",
  "bodyPart": "Chest",
  "target": "Pectorals",
  "weightKg": 80,
  "minutes": 15,
  "baseKcalPerMin": 5,
  "kcalPerMin": 5.71,
  "totalKcal": 85.7
}
GET /v1/workout/generate AI Generator Growth+

Generate a fully structured, ready-to-use workout plan with a single API call. Pass your user's goal, available time, fitness level, and equipment — the API returns a complete session with ordered exercises, sets, reps, and rest periods. Perfect for building AI-powered fitness apps, personalized training programs, or a "Today's Workout" feature without managing any exercise logic yourself.

auto_awesome

How the generator works

The engine filters exercises by your equipment and fitness level, then distributes them across the target muscle groups using the selected split. Compound movements are prioritized for strength/muscle gain goals; isolation movements are mixed in as accessories. Exercise count is automatically calculated to fit within your requested duration. Every call returns a freshly randomised selection — no two workouts are the same.

Query Parameters

Name Type Default Description
goal string muscle_gain muscle_gain · strength · fat_loss · endurance · mobility
duration integer 45 Target workout length in minutes (20–120). Exercise count is auto-calculated to fit.
level string intermediate beginner · intermediate · advanced
Not a strict filter — an exercise one level above or below is also eligible (e.g. level=intermediate can return beginner or advanced exercises), so a session can always be filled even for narrow equipment/level combinations.
split string full_body Which muscle groups to train in this session.
full_body · upper · lower · push · pull · legs · push_pull_legs · upper_lower · core.
Ignored if bodyFocus is provided.
equipment string — Comma-separated list of available equipment (e.g. barbell,dumbbell). Omit to allow any equipment.
bodyFocus string — Comma-separated body parts for full custom control (e.g. chest,back). Overrides split. Also accepts common aliases not in the raw dataset — core, legs, arms, abs, quads, glutes, etc.
The response's bodyFocus field echoes back exactly what you sent; see resolvedBodyFocus below for what it was actually matched against internally.
exclude string — Comma-separated exercise IDs to exclude (e.g. exercises the user dislikes or already did today).
seed string — Pass a seed for a reproducible plan (same seed + params → same workout). Omit for a fresh plan; the response always returns the seed used so you can reproduce it.

Example Requests

1 — Quick full-body workout (defaults)

curl 'https://api.workoutxapp.com/v1/workout/generate' \
  -H "X-WorkoutX-Key: wx_your_key_here"

2 — 30-minute beginner fat-loss session, bodyweight only

curl 'https://api.workoutxapp.com/v1/workout/generate?goal=fat_loss&duration=30&level=beginner&equipment=body+weight&split=full_body' \
  -H "X-WorkoutX-Key: wx_your_key_here"

3 — Advanced push day, barbell + dumbbell, exclude specific exercises

curl 'https://api.workoutxapp.com/v1/workout/generate?goal=muscle_gain&duration=60&level=advanced&split=push&equipment=barbell,dumbbell&exclude=0025,0034' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

{
  "goal": "muscle_gain",
  "level": "intermediate",
  "seed": "06vhrfi3",
  "split": "push",
  "bodyFocus": ["chest", "shoulders", "upper arms"],
  // resolvedBodyFocus: internal categories bodyFocus was matched against —
  // only differs from bodyFocus when you used an alias (core/legs/arms/etc).
  "resolvedBodyFocus": ["chest", "shoulders", "upper arms"],
  "equipment": ["barbell", "dumbbell"],
  // filtersRelaxed: OMITTED unless a constraint had to be loosened to fill
  // the session. Only ever contains "bodyFocus", "mechanics" (always
  // together), and/or "level". equipment/exclude are never relaxed.
  // bodyFocusUncovered: OMITTED unless one or more requested bodyFocus
  // tokens ended up with zero exercises — e.g. more tokens than the
  // session has room for, or a token's category has no matching exercise
  // for the given equipment/level. Distinct from filtersRelaxed: equipment
  // and level are NOT relaxed when this fires, a token just didn't fit.
  "totalExercises": 5,
  "estimatedDurationMinutes": 47,
  "warmup": [
    { "activity": "Light cardio", "durationMinutes": 3, "note": "Raise core temperature..." }
    // + dynamic mobility, ramp-up sets
  ],
  "exercises": [
    {
      "order": 1,
      "sets": 4,
      "reps": "6-8",
      "restSeconds": 90,
      "note": "Primary compound movement",
      // matchedFocus: which resolvedBodyFocus categories THIS exercise satisfies.
      // Needed because a category can be a `target` value, not `bodyPart` — e.g.
      // "spine" exercises have bodyPart:"Back", target:"Spine", so checking
      // coverage via exercise.bodyPart alone can miss it. Present whenever
      // resolvedBodyFocus is (i.e. bodyFocus or split resolved to something).
      "matchedFocus": ["chest"],
      "exercise": {
        "id": "0025",
        "name": "Barbell Bench Press",
        "bodyPart": "Chest",
        "target": "Pectorals",
        "equipment": "Barbell",
        "gifUrl": "https://api.workoutxapp.com/v1/gifs/0025.gif"
      }
    },
    // ... more exercises
  ],
  "cooldown": [
    { "activity": "Static stretching", "durationMinutes": 3, "note": "Hold ~30s each..." }
  ]
}

Split Reference

split value Muscle groups trained
full_bodyChest, back, shoulders, legs, arms — balanced full session
upperChest, back, shoulders, upper & lower arms
lowerQuads, hamstrings, calves, lower back, core
pushChest, shoulders, triceps
pullBack, biceps, forearms
legsQuads, hamstrings, calves, lower back
push_pull_legsFull body PPL — all major groups in one session
upper_lowerUpper body focus — chest, back, shoulders, arms
coreAbs, lower back — targeted core session

Use bodyFocus for fully custom muscle group selection — it overrides split.

GET /v1/workout/program New Scale

Generate a periodised, multi-week training program with progressive overload. Exercises stay fixed per training day so users can add load/reps week to week, while sets and intensity follow a 4-week undulating block — three build weeks (RPE 7 → 8 → 9) followed by a deload — that repeats for the program length. Goes beyond single-session generation (/v1/workout/generate) for apps that ship full training plans.

Query Parameters

Name Type Description
goalstringmuscle_gain · strength · fat_loss · endurance · mobility
levelstringbeginner · intermediate · advanced
weeksintegerProgram length, 2–12. Default 4.
daysPerWeekintegerTraining days per week, 2–6 (sets the weekly split). Default 3.
durationintegerPer-session minutes, 20–120. Default 60.
equipmentstringComma-separated available equipment. Omit for any.

Example Request

curl 'https://api.workoutxapp.com/v1/workout/program?goal=muscle_gain&level=intermediate&weeks=8&daysPerWeek=4&equipment=barbell,dumbbell' \
  -H "X-WorkoutX-Key: wx_your_ultra_key_here"

Example Response

{
  "goal": "muscle_gain",
  "level": "intermediate",
  "weeks": 8,
  "daysPerWeek": 4,
  "split": ["upper", "lower", "upper", "lower"],
  "progressionModel": "4-week undulating block (3 build weeks + deload), repeating",
  "program": [
    {
      "week": 1,
      "phase": "accumulation",
      "intensity": "RPE 7",
      "deload": false,
      "guidance": "Build week 1 — leave ~3 reps in reserve...",
      "days": [ /* fixed exercises with sets/reps/intensity */ ]
    },
    // week 3 → RPE 9 + extra set, week 4 → deload, then repeats
  ]
}
GET /v1/exercises/changes New Growth+

Keep a local mirror of the dataset in sync. Returns exercises added or updated on or after the since date — newest first, each annotated with addedAt, updatedAt, and changeType (added | updated). Poll it on a schedule to receive new exercises and GIFs added during your subscription, without re-pulling the entire catalogue.

Query Parameters

Name Type Required Description
sinceISO dateYesReturns items changed on or after this, e.g. 2026-01-01.
limitintegerNoPage size.
offsetintegerNoResults to skip.

Example Request

curl 'https://api.workoutxapp.com/v1/exercises/changes?since=2026-01-01' \
  -H "X-WorkoutX-Key: wx_your_ultra_key_here"

Example Response

{
  "since": "2026-01-01T00:00:00.000Z",
  "asOf": "2026-06-16T10:00:00.000Z",
  // datasetETag: catalogue-wide hash. Same value as the ETag header on
  // /v1/exercises. Store it and compare on each poll — see note below.
  "datasetETag": "bc4fc5a0a895e29a",
  "total": 3,
  "count": 3,
  "data": [
    {
      "id": "5202",
      "name": "Front Plank",
      "changeType": "added",
      "addedAt": "2026-06-14T...",
      "updatedAt": "2026-06-14T..."
      // + full exercise fields
    }
  ]
}
info

How change detection works, and its limit. An exercise appears here only if its stored updatedAt is on or after since — there is no content diffing. A catalogue-wide edit that does not bump individual record timestamps will not show up, and total: 0 looks identical to "nothing changed."

Use datasetETag as a safety net. It is the hash of the entire catalogue and changes on any change to it, including ones no record timestamp captured. Store the value you last synced against and compare it on each poll: if it differs but total is 0, something moved that the timestamps missed — do a full re-pull. Note it is computed at server start, so it advances on deploy rather than instantly.

GET /v1/supplements New Growth+

A curated database of 29 evidence-rated supplements — proteins, creatine, pre-workout ingredients, vitamins, minerals, and joint-support compounds. Each record includes typical dosage, intake timing, training goals, an evidence_level rating (strong / moderate / emerging), benefits, stacking suggestions, and practical considerations. Perfect for adding a supplement guide or nutrition layer to your fitness app.

info

Informational content — not medical advice

The dataset contains no medical claims. Every response includes a disclaimer field advising users to consult a healthcare professional. Content is ranked by research evidence level so your users always see the best-supported options first.

Query Parameters

Name Type Description
category string protein · performance · pre_workout · amino_acids · vitamins_minerals · hydration · recovery · joint_support · adaptogens · general_health
goal string muscle_gain · strength · fat_loss · endurance · recovery · mobility · general_health
timing string pre_workout · intra_workout · post_workout · morning · evening · with_meals · any_time
evidence string strong · moderate · emerging — filter by research evidence level
search string Search by name, summary, or category (e.g. creatine)
limit / offset integer Standard pagination — same behaviour as /v1/exercises

Related Endpoints

Endpoint Plan Description
/v1/supplements/{id} Growth+ Single supplement by ID (e.g. creatine-monohydrate)
/v1/supplements/exercise/{exerciseId} Growth+ Supplements relevant to a given exercise — resistance exercises return strength-focused picks, cardio exercises return endurance & hydration picks
/v1/supplements/filters Growth+ All available categories, goals, timings & evidence levels with counts
/v1/supplements/stack Scale Goal-based stack builder — ordered supplement stack with a timing guide. goal required; level = essential (3) · standard (5) · comprehensive (8)

Example Requests

1 — Strong-evidence supplements for muscle gain

curl 'https://api.workoutxapp.com/v1/supplements?goal=muscle_gain&evidence=strong' \
  -H "X-WorkoutX-Key: wx_your_key_here"

2 — Supplements relevant to Barbell Bench Press

curl 'https://api.workoutxapp.com/v1/supplements/exercise/0025' \
  -H "X-WorkoutX-Key: wx_your_key_here"

3 — Scale: essential fat-loss stack with timing guide

curl 'https://api.workoutxapp.com/v1/supplements/stack?goal=fat_loss&level=essential' \
  -H "X-WorkoutX-Key: wx_your_key_here"

Example Response

{
  "id": "creatine-monohydrate",
  "name": "Creatine Monohydrate",
  "category": "performance",
  "goals": ["muscle_gain", "strength"],
  "timing": ["any_time"],
  "typical_dosage": "3-5 g daily",
  "evidence_level": "strong",
  "summary": "One of the most researched sports supplements...",
  "benefits": ["Extensively studied for strength and power performance", ...],
  "stacks_well_with": ["whey-protein", "carbohydrate-powder"],
  "considerations": "Daily consistency matters more than timing...",
  "disclaimer": "Informational content only — not medical advice..."
}
Docs chevron_right Rate Limits

Rate Limits

All plans are subject to both per-minute rate limits and monthly quotas. Exceeding either returns a 429 Too Many Requests response.

Plan Monthly Quota Rate Limit Max Results
Free 500 in total 30 / min 10 per request
Starter 5,000 / month 150 / min 100 per request
Growth 25,000 / month 300 / min Unlimited
Scale 100,000 / month 600 / min Unlimited

Response Headers

Every API response includes the following headers so you can monitor your usage programmatically:

Header Description
X-WorkoutX-Plan Your current subscription plan name.
X-RateLimit-Limit Maximum requests allowed per minute.
X-RateLimit-Remaining Requests remaining in the current minute window.
X-Quota-Limit Total monthly quota for your plan.
X-Quota-Remaining Requests remaining in the current monthly period.
X-Quota-Reset When the monthly quota resets, in ISO 8601 UTC (for example 2026-11-01T00:00:00.000Z). Not sent on the Free plan, whose quota never resets.

Reading Headers in Code

# Include -I to print response headers
curl -sI 'https://api.workoutxapp.com/v1/exercises?limit=1' \
  -H "X-WorkoutX-Key: wx_your_key_here"

# Example response headers:
X-WorkoutX-Plan: pro
X-RateLimit-Limit: 300
X-RateLimit-Remaining: 298
X-Quota-Limit: 10000
X-Quota-Remaining: 9847
X-Quota-Reset: 2026-11-01T00:00:00.000Z
Docs chevron_right Error Codes

Error Codes

The API uses standard HTTP status codes. All error responses return a JSON body with a message field explaining what went wrong.

Status Code Error Description
401 Unauthorized Missing or invalid API key. Verify your key is correct and included in the request.
403 Forbidden Your API key or account has been disabled, or you are accessing a feature not available on your plan.
404 Not Found The requested exercise ID does not exist in the database.
429 Too Many Requests You have exceeded your per-minute rate limit or monthly quota. Check rate limit headers for reset timing.

Example Error Responses

// HTTP 401 Unauthorized
{
  "error": "Unauthorized",
  "message": "Missing or invalid API key. Pass your key via X-WorkoutX-Key header.",
  "status": 401
}

// HTTP 429 Too Many Requests
{
  "error": "Too Many Requests",
  "message": "Monthly quota exceeded. Upgrade your plan or wait for reset.",
  "status": 429
}

// HTTP 404 Not Found
{
  "error": "Not Found",
  "message": "Exercise with ID '9999' does not exist.",
  "status": 404
}
Docs chevron_right Plans

Plans & Quotas

Choose a plan that matches your usage. All plans include the full exercise metadata. Yearly billing gives you 2 months free. Subscribers to the earlier Basic, Pro and Ultra plans keep their plan, limits and price for as long as the subscription stays active.

Free
$0/mo
  • check_circle 500 requests in total
  • check_circle 30 req / min
  • check_circle Max 10 results
  • remove_circle Multi-filter search
Starter
$19/mo
  • check_circle 5,000 req / month
  • check_circle 25,000 media views / month
  • check_circle 720p MP4 video
  • check_circle Up to 1,000 exercises / 30 days
  • check_circle Multi-filter search
Growth
$39/mo
  • check_circle 25,000 req / month
  • check_circle 150,000 media views / month
  • check_circle Unlimited results
  • check_circle AI Workout Generator, Supplements
  • check_circle Joint & Rehab Metadata
Scale
$79/mo
  • check_circle 100,000 req / month
  • check_circle 600,000 media views / month
  • check_circle Training Programs, Stack Builder
  • check_circle Priority support

Ready to get started?

Create your account and get an API key in under a minute. Free plan, no credit card required.

vpn_key Get API Key Free