# Exercise Database & AI Workout Planner API

> 870+ exercises with muscles, steps and photos, plus AI weekly workout plans built from them.

**Ship the workout feature of your fitness app this week.** Search **870+ exercises** by muscle, equipment, level and category, each with **step-by-step instructions**, **primary and secondary muscles** and **start/end photos**. Find **substitutes** when the machine is taken. Then let the AI write a **complete program**: weekly sessions with **sets, reps, rest and coaching cues**, a **week-by-week progression** with a deload, **swap options** for every exercise and **safety notes** for sore knees or a bad back. The AI only picks exercises from the database, and every one is checked before you get the plan.

- Host: `exercise-database-ai-workout-planner-fitness.p.rapidapi.com`
- Base URL: `https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout`
- Auth: headers `X-RapidAPI-Key` and `X-RapidAPI-Host`
- OpenAPI: https://helenis-api.com/docs/workout/openapi.json

## Endpoints

### Exercises

Search, look up and swap exercises of the database. No AI.

#### Search Exercises

`GET /v1/workout/exercises`

Search and filter exercises. Search the 870+ exercises by name and filter them by muscle, equipment, level, category, force and mechanic. Each exercise comes with its muscles, step-by-step instructions and two photos. With `q`, best matches first; without it, alphabetical. No AI. 1 credit.

| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| `q` | query | `string` | no | Words of the name, e.g. 'bench press', 'pushup'; also matches muscles and equipment. | `squat` |
| `muscle` | query | `string` | no | Primary muscle(s), comma-separated: chest, lats, quadriceps... or a group: back, legs, arms, core, upper body, lower body. | `quadriceps` |
| `secondary` | query | `boolean` | no | Also match exercises that work `muscle` as a secondary muscle. Default `False`. |  |
| `equipment` | query | `string` | no | Equipment, comma-separated: body only, dumbbell, barbell, kettlebells, cable, machine, bands, medicine ball, exercise ball, foam roll, e-z curl bar, other. | `dumbbell,body only` |
| `level` | query | `string` | no | beginner, intermediate or expert, comma-separated. | `beginner` |
| `category` | query | `string` | no | strength, stretching, plyometrics, powerlifting, olympic weightlifting, strongman, cardio. | `strength` |
| `force` | query | `string` | no | push, pull or static. | `push` |
| `mechanic` | query | `string` | no | compound or isolation. | `compound` |
| `include_instructions` | query | `boolean` | no | false for a lighter answer without the steps. Default `True`. |  |
| `limit` | query | `integer` | no | 1-100. Default `20`. | `10` |
| `offset` | query | `integer` | no | Results to skip, for paging. Default `0`. |  |

```bash
curl -G "https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout/exercises" \
  --data-urlencode "q=squat" \
  --data-urlencode "muscle=quadriceps" \
  --data-urlencode "equipment=dumbbell,body only" \
  --data-urlencode "level=beginner" \
  --data-urlencode "category=strength" \
  --data-urlencode "force=push" \
  --data-urlencode "mechanic=compound" \
  --data-urlencode "limit=10" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: exercise-database-ai-workout-planner-fitness.p.rapidapi.com"
```

#### Get Exercise

`GET /v1/workout/exercises/{exercise_id}`

One exercise: muscles, equipment, instructions, photos. The full record of one exercise: category, level, force, mechanic, equipment, primary and secondary muscles, step-by-step instructions and start/end photos. 404 `exercise_not_found` (not billed). 1 credit.

| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| `exercise_id` | path | `string` | yes | Exercise id (or exact name). | `Barbell_Squat` |

```bash
curl -G "https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout/exercises/{exercise_id}" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: exercise-database-ai-workout-planner-fitness.p.rapidapi.com"
```

#### Get Exercise Alternatives

`GET /v1/workout/exercises/{exercise_id}/alternatives`

Substitutes for an exercise: same muscles, your equipment. Exercises that can replace this one (machine taken, no barbell at home, too hard): same primary muscles and movement family, ranked by a similarity score from shared muscles, push/pull, mechanic, category and level. No AI. 404 `exercise_not_found` (not billed). 1 credit.

| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| `exercise_id` | path | `string` | yes | Exercise id (or exact name). | `Barbell_Squat` |
| `equipment` | query | `string` | no | Only substitutes doable with this equipment, comma-separated. | `dumbbell,body only` |
| `other_equipment` | query | `boolean` | no | Only substitutes that use different equipment. Default `False`. |  |
| `level` | query | `string` | no | beginner, intermediate or expert, comma-separated. | `beginner,intermediate` |
| `limit` | query | `integer` | no | 1-30. Default `10`. | `5` |

```bash
curl -G "https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout/exercises/{exercise_id}/alternatives" \
  --data-urlencode "equipment=dumbbell,body only" \
  --data-urlencode "level=beginner,intermediate" \
  --data-urlencode "limit=5" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: exercise-database-ai-workout-planner-fitness.p.rapidapi.com"
```

#### List Exercise Filters

`GET /v1/workout/filters`

Every muscle, equipment, level and category, with counts. The values the filters accept, each with its number of exercises, and the muscle groups (back, legs, arms, core...) accepted as shortcuts. Build your app's filter menus from it. 1 credit.

```bash
curl -G "https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout/filters" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: exercise-database-ai-workout-planner-fitness.p.rapidapi.com"
```

### AI Workout Planner

Week-by-week programs built from database exercises.

#### Generate Workout Plan

`POST /v1/workout/plan`

AI workout plan, week by week, from database exercises. Generate a workout program for a goal, level, equipment and schedule: weekly sessions with sets, reps, rest and cues, every week written out, swaps and safety notes, only database exercises. Not medical advice. 20 credits per 25 slots (exercises a week + weeks): 20 to 80, see `credits`.

| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| `goal` | body | `"muscle_gain" \| "strength" \| "fat_loss" \| "general_fitness" \| "endurance" \| "mobility" \| "athletic"` | no | muscle_gain, strength, fat_loss, general_fitness, endurance, mobility or athletic (power and speed). Default `general_fitness`. | `muscle_gain` |
| `level` | body | `string` | no | beginner, intermediate or expert (advanced). Sets the exercises allowed and the training volume. Default `beginner`. | `intermediate` |
| `equipment` | body | `string[]` | no | What the person has: body only, dumbbell, barbell, kettlebells, cable, machine, bands, medicine ball, exercise ball, foam roll, e-z curl bar, other (bench, pull-up bar, box...), or 'full gym'. Bodyweight exercises are always allowed; exercises that need a bench, box or bar (bench press, bench dips, pull-ups) only with 'other', machine or cable. | `["dumbbell", "bands"]` |
| `days_per_week` | body | `integer` | no | Default `3`. | `4` |
| `minutes_per_session` | body | `integer` | no | 15-120, warm-up included. Default `45`. | `45` |
| `weeks` | body | `integer` | no | Program length. Default `4`. | `4` |
| `focus` | body | `string[]` | no | Muscles or groups to prioritise: chest, back, legs, arms, core, glutes, shoulders... | `["glutes", "back"]` |
| `limitations` | body | `"knees" \| "lower_back" \| "shoulders" \| "wrists" \| "elbows" \| "neck" \| "hips" \| "ankles"[]` | no | Areas to protect (past injury, discomfort): knees, lower_back, shoulders, wrists, elbows, neck, hips, ankles. The plan avoids loading them and leaves out jumps and Olympic lifts. Not a medical assessment. | `["knees"]` |
| `preferences` | body | `string` | no | Short training preferences, e.g. 'no running, likes supersets'. Used as preferences only. | `Short rests, likes supersets` |
| `language` | body | `string` | no | Language of the plan's texts. Exercise names stay in English. Default `English`. | `English` |

```bash
curl -X POST "https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout/plan" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: exercise-database-ai-workout-planner-fitness.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "muscle_gain",
    "level": "intermediate",
    "equipment": [
      "dumbbell",
      "bands"
    ],
    "days_per_week": 3,
    "minutes_per_session": 45,
    "weeks": 4,
    "focus": [
      "glutes"
    ],
    "limitations": [
      "knees"
    ]
  }'
```

## Sample call

Generate Workout Plan: `POST /v1/workout/plan`.

```bash
curl -X POST "https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout/plan" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" \
  -H "X-RapidAPI-Host: exercise-database-ai-workout-planner-fitness.p.rapidapi.com" \
  -H "Content-Type: application/json" \
  -d '{
    "goal": "muscle_gain",
    "level": "intermediate",
    "equipment": [
      "dumbbell",
      "bands"
    ],
    "days_per_week": 3,
    "minutes_per_session": 45,
    "weeks": 4,
    "focus": [
      "glutes"
    ],
    "limitations": [
      "knees"
    ]
  }'
```

## Response

```json
{
  "plan": {
    "title": "Glute-Focused Hypertrophy Program",
    "summary": "A 3-day full-body split focusing on glute development and posterior chain strength while protecting the knees.",
    "goal": "muscle_gain",
    "level": "intermediate",
    "days_per_week": 3,
    "minutes_per_session": 45,
    "weeks": 4,
    "split": "Full Body A, B, A",
    "equipment": ["body only", "dumbbell", "bands"],
    "focus": ["glutes"],
    "limitations": ["knees"]
  },
  "sessions": [
    {
      "day": 1,
      "name": "Full Body A",
      "focus": "Glute and Upper Body Push",
      "warmup": "Perform 5 minutes of light movement and dynamic arm circles.",
      "exercises": [
        {
          "exercise_id": "Single_Leg_Glute_Bridge",
          "name": "Single Leg Glute Bridge",
          "sets": 4,
          "reps": "12-15 per side",
          "rest_seconds": 90,
          "note": "Squeeze glutes at the top.",
          "primary_muscles": ["glutes"],
          "equipment": "body only",
          "image": "https://cdn.jsdelivr.net/gh/yuhonas/free-exercise-db@f00c92c7dcf1216a928a52c3706c7ce8e2f71ed5/exercises/Single_Leg_Glute_Bridge/0.jpg",
          "swaps": [
            { "exercise_id": "Leg_Lift", "name": "Leg Lift", "equipment": "body only" },
            { "exercise_id": "Butt_Lift_Bridge", "name": "Butt Lift (Bridge)", "equipment": "body only" }
          ]
        },
        {
          "exercise_id": "Stiff-Legged_Dumbbell_Deadlift",
          "name": "Stiff-Legged Dumbbell Deadlift",
          "sets": 3,
          "reps": "8-12",
          "rest_seconds": 120,
          "note": "Keep back flat and hinge at hips.",
          "primary_muscles": ["hamstrings"],
          "equipment": "dumbbell",
          "image": "https://cdn.jsdelivr.net/gh/yuhonas/free-exercise-db@f00c92c7dcf1216a928a52c3706c7ce8e2f71ed5/exercises/Stiff-Legged_Dumbbell_Deadlift/0.jpg",
          "swaps": [
            { "exercise_id": "Band_Good_Morning", "name": "Band Good Morning", "equipment": "bands" },
            { "exercise_id": "Band_Good_Morning_Pull_Through", "name": "Band Good Morning (Pull Through)", "equipment": "bands" }
          ]
        },
        { "...": "Dumbbell Bench Press, Dumbbell Shoulder Press, Monster Walk" }
      ],
      "cooldown": "Perform 5 minutes of static stretching for the hamstrings and chest.",
      "estimated_minutes": 48
    },
    { "...": "Day 2: Hip Extension with Bands, One-Arm Dumbbell Row, Hyperextensions, Dumbbell Bicep Curl, Bench Dips" },
    { "...": "Day 3: Hip Lift with Band, Natural Glute Ham Raise, Pushups, Arnold Dumbbell Press, Glute Kickback" }
  ],
  "progression": [
    { "week": 1, "theme": "Acclimation", "sets_change": 0, "rep_change": 0, "intensity": "RPE 7", "note": "Focus on perfect form." },
    { "week": 2, "theme": "Hypertrophy Loading", "sets_change": 1, "rep_change": 0, "intensity": "RPE 8", "note": "Increase volume." },
    { "week": 3, "theme": "Peak Intensity", "sets_change": 1, "rep_change": -1, "intensity": "RPE 9", "note": "Push close to failure." },
    { "week": 4, "theme": "Deload", "sets_change": -1, "rep_change": 1, "intensity": "RPE 6", "note": "Reduce fatigue." }
  ],
  "weeks": [
    { "...": "week 1 as the sessions above" },
    {
      "week": 2,
      "theme": "Hypertrophy Loading",
      "intensity": "RPE 8",
      "note": "Increase volume.",
      "sessions": [
        {
          "day": 1,
          "name": "Full Body A",
          "exercises": [
            { "exercise_id": "Single_Leg_Glute_Bridge", "name": "Single Leg Glute Bridge", "sets": 5, "reps": "12-15 per side", "rest_seconds": 90 },
            { "exercise_id": "Stiff-Legged_Dumbbell_Deadlift", "name": "Stiff-Legged Dumbbell Deadlift", "sets": 4, "reps": "8-12", "rest_seconds": 120 },
            { "...": "..." }
          ]
        }
      ]
    },
    { "...": "weeks 3 and 4" }
  ],
  "guidelines": [
    "Perform exercises with a slow, controlled tempo.",
    "Rest at least one full day between sessions.",
    "Increase weight only when all reps are completed with perfect form.",
    "Prioritize glute activation in every movement."
  ],
  "safety": {
    "notes": [
      "Avoid deep squats or lunges to protect the knees; use hip hinges and bridges instead.",
      "Stop immediately if you feel sharp pain in the joints or back."
    ],
    "disclaimer": "General fitness guidance for healthy adults, not medical advice. Check with a doctor or physiotherapist before starting, especially with an injury, pain or a health condition, and stop any exercise that hurts."
  },
  "checks": { "exercises_validated": 15, "removed": 0 },
  "credits": 20
}
```

*From a real response, shortened.* Every `exercise_id` opens its full record with `/exercises/{exercise_id}`. `weeks` repeats the sessions with that week's sets and reps, ready to display as a calendar.

## Why developers pick this API

- ✅ **No invented exercises:** the planner chooses from the database by number, then every pick is checked against it (`checks` in the answer). Your app can show the photos and instructions of every exercise in the plan.
- 💸 **Priced to be the obvious choice:** exercise lookups from **$0.0006** on PRO (popular exercise APIs charge $0.001 to $0.0056 a call), and a full AI plan from **$0.012**, where the AI workout planners on RapidAPI charge $0.02. Failed calls use 0 credits.
- 🧠 **Plans a coach would sign:** compound lifts first, rep ranges and rest that fit the goal, every muscle trained, the session length respected (`estimated_minutes`).
- 🔁 **Swaps built in:** each exercise of a plan comes with two database alternatives your users can tap.
- 🔓 **Open data:** the exercises come from the public-domain free-exercise-db dataset, so you can store what you fetch.

## Exercise database

```bash
curl -G "https://exercise-database-ai-workout-planner-fitness.p.rapidapi.com/v1/workout/exercises/Goblet_Squat" \
  -H "X-RapidAPI-Key: YOUR_API_KEY" -H "X-RapidAPI-Host: exercise-database-ai-workout-planner-fitness.p.rapidapi.com"
```

```json
{
  "id": "Goblet_Squat",
  "name": "Goblet Squat",
  "category": "strength",
  "level": "beginner",
  "force": "push",
  "mechanic": "compound",
  "equipment": "kettlebells",
  "primary_muscles": ["quadriceps"],
  "secondary_muscles": ["calves", "glutes", "hamstrings", "shoulders"],
  "instructions": [
    "Stand holding a light kettlebell by the horns close to your chest. This will be your starting position.",
    "Squat down between your legs until your hamstrings are on your calves. Keep your chest and head up and your back straight.",
    "At the bottom position, pause and use your elbows to push your knees out. Return to the starting position, and repeat for 10-20 repetitions."
  ],
  "images": [
    "https://cdn.jsdelivr.net/gh/yuhonas/free-exercise-db@f00c92c7dcf1216a928a52c3706c7ce8e2f71ed5/exercises/Goblet_Squat/0.jpg",
    "https://cdn.jsdelivr.net/gh/yuhonas/free-exercise-db@f00c92c7dcf1216a928a52c3706c7ce8e2f71ed5/exercises/Goblet_Squat/1.jpg"
  ]
}
```

Search with `/exercises?muscle=glutes&equipment=dumbbell,body only&level=beginner`: `muscle` takes the 17 muscles or the groups *back*, *legs*, *arms*, *core*, *upper body*, *lower body*; `q` searches names ("hip thrust", "pushup"). `/filters` lists every value with its number of exercises, for your filter menus.

## Alternatives

`/exercises/Barbell_Squat/alternatives?equipment=dumbbell,body only&limit=3` answers *Dumbbell Squat* (similarity 100), *Dumbbell Lunges* (98) and *Bodyweight Walking Lunge* (98): same primary muscles, same movement family, doable with what the user has. Add `other_equipment=true` to get only exercises that use different equipment.

## Errors

| Status | `code` | Meaning |
|---|---|---|
| 400 | `invalid_request` | A field is out of range: unknown equipment, 8 days a week, 13 weeks... |
| 400 | `invalid_filter` | Unknown muscle, equipment, level or category in a search. |
| 400 | `too_few_exercises` | This equipment, level and goal leave too few exercises. Not billed. |
| 400 | `plan_limit` | The free BASIC plan allows plans of 20 credits. Not billed. |
| 404 | `exercise_not_found` | No exercise has this id. Not billed. |
| 429 | `daily_limit_reached` | Daily safety limit of your plan; resets at 00:00 UTC. |
| 503 | `ai_error` | The AI did not answer or wrote an incomplete plan; retry. Not billed. |

## Pricing

Exercise calls 1 credit; a plan 20 per 25 exercises a week (20 to 80). Failed calls are never billed.

| Plan | Price | Credits included | Above the quota |
|---|---|---|---|
| BASIC | Free | 40 / day | resets every day |
| PRO | $4.99/month | 8,000 / month | $0.007 per credit |
| ULTRA | $14.99/month | 25,000 / month | $0.007 per credit |
| MEGA | $49.99/month | 80,000 / month | $0.007 per credit |

Apify actor **AI Workout Plan Generator & Exercise Database**: billed per event; free-plan users get 1 plan and 50 exercises per run.

| Event | Charged for | Price |
|---|---|---|
| `workout-plan` | each plan, per 25 exercises a week | $0.01 |
| `exercise` | each exercise exported | $0.0003 |

## Links

- API reference (HTML): https://helenis-api.com/docs/workout
- OpenAPI: https://helenis-api.com/docs/workout/openapi.json
- Overview and pricing: https://helenis-api.com/apis/workout/
- RapidAPI listing: https://rapidapi.com/helenis-api-helenis-api-life/api/exercise-database-ai-workout-planner-fitness?utm_source=helenis&utm_medium=site&utm_campaign=workout&utm_content=markdown
- Apify actor: https://apify.com/helenisapi/ai-workout-plan-generator?utm_source=helenis&utm_medium=site&utm_campaign=workout&utm_content=markdown
- MCP server (Apify): https://mcp.apify.com?tools=helenisapi/ai-workout-plan-generator

MCP: Works in Claude, Cursor, VS Code and any MCP client; billed per event through Apify (your Apify token).

## Conventions (every Helenis API)

- Auth: two headers on every call, `X-RapidAPI-Key` (your key) and `X-RapidAPI-Host` (the API's host). One RapidAPI key works for every API you subscribe to.
- Billing in credits: one for a simple call, more for heavier work (a minute of audio, a page read by AI). Each API states its rule.
- Failed calls are never billed: a `4xx` bills zero credits and a `5xx` is never counted.
- Errors share one envelope: `{"error": {"status", "code", "message"}}` with a stable machine-readable `code`.
- `400`: fix the input (validation errors are always 400, never 422); not billed.
- `429`: rate limit; wait for `Retry-After`. `503`: temporary upstream or AI failure (`ai_error`, `upstream_timeout`); retry later, not billed.
- Values the source does not give come back as `null`, never invented.
