{
  "openapi": "3.0.1",
  "info": {
    "title": "AI Workout Plan Generator & Exercise Database",
    "description": "Generate week-by-week workout plans from 870+ real exercises (sets, reps, rest, swaps) for any goal, level and equipment, or export the exercise database. 🏋️",
    "version": "1.0",
    "x-build-id": "oybYDfHHiBwFsFWTK"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/helenisapi~ai-workout-plan-generator/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-helenisapi-ai-workout-plan-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/helenisapi~ai-workout-plan-generator/runs": {
      "post": {
        "operationId": "runs-sync-helenisapi-ai-workout-plan-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/helenisapi~ai-workout-plan-generator/run-sync": {
      "post": {
        "operationId": "run-sync-helenisapi-ai-workout-plan-generator",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "generatePlan": {
            "title": "Generate a workout plan",
            "type": "boolean",
            "description": "When true (default), builds a week-by-week workout plan from the profile fields (goal, level, equipment, daysPerWeek, minutesPerSession, weeks...), or one plan per item of `profiles`. Every exercise comes from the exercise database. Set false to only export exercises (with `exportExercises` true).",
            "default": true
          },
          "goal": {
            "title": "Goal",
            "enum": [
              "muscle_gain",
              "strength",
              "fat_loss",
              "general_fitness",
              "endurance",
              "mobility",
              "athletic"
            ],
            "type": "string",
            "description": "What the plan trains for: \"muscle_gain\" (default), \"strength\", \"fat_loss\", \"general_fitness\", \"endurance\", \"mobility\" or \"athletic\" (power and speed). Used when `generatePlan` is true and `profiles` is empty.",
            "default": "muscle_gain"
          },
          "level": {
            "title": "Level",
            "enum": [
              "beginner",
              "intermediate",
              "expert"
            ],
            "type": "string",
            "description": "Training level, which sets the exercises allowed and the volume: \"beginner\", \"intermediate\" (default) or \"expert\" (advanced). Used when `generatePlan` is true and `profiles` is empty.",
            "default": "intermediate"
          },
          "equipment": {
            "title": "Equipment available",
            "type": "array",
            "description": "Equipment the person has, as a list, e.g. [\"dumbbell\", \"bands\"]. \"full gym\" allows everything; \"other\" covers a bench, a pull-up bar or a box. Bodyweight exercises are always allowed; an empty list means bodyweight only. Default [\"dumbbell\"].",
            "items": {
              "type": "string",
              "enum": [
                "full gym",
                "dumbbell",
                "barbell",
                "kettlebells",
                "cable",
                "machine",
                "bands",
                "medicine ball",
                "exercise ball",
                "foam roll",
                "e-z curl bar",
                "other"
              ],
              "enumTitles": [
                "Full gym",
                "Dumbbells",
                "Barbell",
                "Kettlebells",
                "Cables",
                "Machines",
                "Resistance bands",
                "Medicine ball",
                "Exercise ball",
                "Foam roller",
                "EZ curl bar",
                "Other (bench, pull-up bar, box)"
              ]
            },
            "default": [
              "dumbbell"
            ]
          },
          "daysPerWeek": {
            "title": "Training days per week",
            "minimum": 1,
            "maximum": 7,
            "type": "integer",
            "description": "Training days per week, 1-7, e.g. 4. Default 3. Each training day gets its own session in the weekly template.",
            "default": 3
          },
          "minutesPerSession": {
            "title": "Minutes per session",
            "minimum": 15,
            "maximum": 120,
            "type": "integer",
            "description": "Length of each session in minutes, warm-up included, 15-120, e.g. 60. Default 45. The number of exercises fits this time.",
            "default": 45
          },
          "weeks": {
            "title": "Program length (weeks)",
            "minimum": 1,
            "maximum": 12,
            "type": "integer",
            "description": "Program length in weeks, 1-12. Default 4. Every week is written out with its sets and reps in the key-value store record OUTPUT (PLAN-1, PLAN-2... in bulk); dataset rows show the weekly template.",
            "default": 4
          },
          "focus": {
            "title": "Priority muscles",
            "type": "array",
            "description": "Muscles or groups to give priority to, e.g. [\"chest\", \"glutes\"]: chest, back, legs, arms, core, glutes, shoulders, quadriceps, hamstrings... Leave empty for a balanced plan.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "limitations": {
            "title": "Areas to protect",
            "type": "array",
            "description": "Body areas to protect: knees, lower_back, shoulders, wrists, elbows, neck, hips, ankles. The plan avoids loading them and leaves out jumps and Olympic lifts. Leave empty for none. General fitness guidance, not medical advice.",
            "items": {
              "type": "string",
              "enum": [
                "knees",
                "lower_back",
                "shoulders",
                "wrists",
                "elbows",
                "neck",
                "hips",
                "ankles"
              ],
              "enumTitles": [
                "Knees",
                "Lower back",
                "Shoulders",
                "Wrists",
                "Elbows",
                "Neck",
                "Hips",
                "Ankles"
              ]
            },
            "default": []
          },
          "preferences": {
            "title": "Preferences",
            "maxLength": 200,
            "type": "string",
            "description": "Free-text training preferences, up to 200 characters, e.g. \"short rests, likes supersets, no running\". Leave empty for none."
          },
          "language": {
            "title": "Language",
            "type": "string",
            "description": "Language of the plan's texts, e.g. \"English\", \"French\" or \"Spanish\". Default \"English\". Exercise names stay in English.",
            "default": "English"
          },
          "profiles": {
            "title": "Several profiles (bulk)",
            "type": "array",
            "description": "One plan per profile, as JSON objects with the API's snake_case fields (goal, level, equipment, days_per_week, minutes_per_session, weeks, focus, limitations, preferences, language), e.g. [{\"goal\": \"strength\", \"level\": \"beginner\", \"equipment\": [\"barbell\"], \"days_per_week\": 3}]. When set, replaces the single profile fields. Up to 50 profiles (Apify free plan: 1). Leave empty for one plan.",
            "default": []
          },
          "exportExercises": {
            "title": "Export exercises",
            "type": "boolean",
            "description": "When true, adds the exercises of the 870+ exercise database that match the exercise filters (exerciseKeyword, exerciseMuscle, exerciseEquipment, exerciseLevel, exerciseCategory) as rows of type \"exercise\": muscles, equipment, level, step-by-step instructions and photos; one exercise event each. Default false.",
            "default": false
          },
          "exerciseKeyword": {
            "title": "Keyword",
            "type": "string",
            "description": "Words of the exercise name to search for, e.g. \"squat\" or \"bench press\". Leave empty for every exercise. Used only when `exportExercises` is true."
          },
          "exerciseMuscle": {
            "title": "Muscle or group",
            "type": "string",
            "description": "Muscles or groups to filter on, comma-separated, e.g. \"chest, lats\" or \"legs\" (also quadriceps, back, arms, core...). Leave empty for every muscle. Used only when `exportExercises` is true."
          },
          "exerciseEquipment": {
            "title": "Equipment",
            "type": "string",
            "description": "Equipment to filter on, comma-separated, e.g. \"dumbbell, kettlebells\" (also body only, barbell, cable, machine, bands...). Leave empty for any equipment. Used only when `exportExercises` is true."
          },
          "exerciseLevel": {
            "title": "Exercise level",
            "type": "string",
            "description": "Exercise level to filter on: beginner, intermediate or expert, e.g. \"beginner\". Leave empty for every level. Used only when `exportExercises` is true."
          },
          "exerciseCategory": {
            "title": "Category",
            "type": "string",
            "description": "Exercise category to filter on, e.g. \"stretching\": strength, stretching, plyometrics, powerlifting, olympic weightlifting, strongman or cardio. Leave empty for every category. Used only when `exportExercises` is true."
          },
          "maxExercises": {
            "title": "Max exercises",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Most exercises to export, 1-1000, e.g. 200. Default 100 (the database holds 870+; Apify free plan: 50 per run). Used only when `exportExercises` is true.",
            "default": 100
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}