SDKs/Python
terminal Official SDK ยท Python 3.8+
Coming Soon

WorkoutX Python SDK

The official Python client for the WorkoutX API. Pull 1,400+ exercises with GIF animations, generate workouts, fetch supplements, and run Body Scans โ€” perfect for backend services, data science notebooks, and AI coaching tools. Minimal dependencies, type-hinted, works everywhere Python runs.

pip install workoutx-sdk

๐Ÿ“ฆ Publishing to PyPI shortly โ€” not yet installable. Get your key now and you'll be ready the moment it lands.

Quick start

One client covers both products โ€” the Exercise API (API-key auth) and the Body Scan API (user JWT). The SDK attaches the right credential automatically.

from workoutx import WorkoutX wx = WorkoutX( api_key="wx_your_key_here", # exercises / gifs / workout / supplements scan_token="eyJ...", # body scan (optional) ) # Exercises page = wx.exercises.list(limit=20) lunges = wx.exercises.by_name("lunges") similar = wx.exercises.similar("0001") # Exercise GIF (bytes) or a ready img URL data = wx.gifs.get("0001") src = wx.gif_url("0001") # AI Workout Generator & supplements workout = wx.workout.generate(goal="hypertrophy", days=4) # Body Scan credits = wx.scan.credits()
science

Built for data & AI

Clean dictionaries you can drop straight into pandas, ML pipelines, or an LLM-powered coaching agent.

shield

Resilient by default

Automatic retries with backoff on 429 and 5xx, honoring Retry-After. Structured WorkoutXError with status, code and tips.

dataset

Both products, one client

Exercises, GIFs, workouts, supplements and Body Scan โ€” all under wx.*. Auth handled transparently per product.

Look up an exercise by name or ID โ€” safely

Exercise IDs are not sequential, so passing a human name to get() returns a 404. The find() helper tries an ID first, then falls back to a name search.

ex = wx.exercises.find("lunges") # dict | None

Frequently asked questions

How do I install the WorkoutX Python SDK?

Run pip install workoutx-sdk. It supports Python 3.8+ and has minimal dependencies (only certifi for reliable TLS).

Can I use it for data science or AI coaching apps?

Yes. Responses are plain Python dicts/lists, so they slot directly into pandas, scikit-learn pipelines, or prompts for an LLM agent.

How do I get an API key?

Create a free account in the Developer Portal and copy your wx_... key. Pass it as api_key.

How does authentication work for the Body Scan API?

Body Scan uses a logged-in user's JWT. Pass scan_token=, or scan_email= and scan_password= to let the SDK log in automatically.

Security & API keys

vpn_key

Keep keys out of source

Load your API key from an environment variable or secret manager rather than hard-coding it. Never commit keys to version control.

image

GIF URLs carry the key

gif_url() puts the key in the query string for direct image loading. Since URLs can leak via logs and referrers, use a separate, restricted key for GIFs where possible.

lock

Credentials stay on the server

The Body Scan scan_email/scan_password auto-login should only run in trusted server environments โ€” not in code shipped to end users.

Start building with Python

Free tier included. 1,400+ exercises, GIFs, workouts, and Body Scan in one SDK.

Get your free API key