Create an API key in the app, then read and write programs, history, measurements and equipment from any script. Run whole workouts through the engine.
Create an API key
Go to Me → API Keys. The row is in the Account group. Type a name under Create New Key and tap Create. If you leave the name empty, the key is called "API Key".
The new key appears under Your Keys with its name and creation date. It starts with lftsk_. Tap Copy to put it on the clipboard. The label changes to Copied! for two seconds.
Keep the key secret. Anyone who has it can read and change your training data. If you lose it, delete it and create a new one.
API keys need Premium and a signed-in account. Without an account, the screen shows a Log in button. Without Premium, it shows Subscribe to unlock.
Revoke a key
Tap Delete next to a key. The app asks "Are you sure you want to delete this API key?". Tap OK. Every request with that key now gets a 401 error. With no keys left, the screen says "No API keys yet".
What a key can do
A key acts as you. It reaches everything the app stores for your account:
Programs: list, read, create, update and delete. Program text is Liftoscript. A syntax error returns 422 with the line number.
History: list with date filters and paging, read one record, create, update, delete. Records use the Liftoscript Workouts text format.
Playground: run a program day with commands like complete_set(1, 1) and finish_workout(), without saving. Returns the workout and the updated program text.
Program stats: sets per muscle group, strength versus hypertrophy split and workout length estimates for any program text.
Gyms and equipment: create gyms, switch the current gym, and change bars, plates and fixed weights.
Exercise data: 1RM, rounding, notes, muscle overrides and per-gym equipment per exercise.
Measurements: bodyweight, body parts, body fat, and the read-only sleep, calories and protein series from Health sync.
Call the API
Every request goes to https://www.liftosaur.com/api/v1 with the key as a Bearer token:
The reply is JSON with a data object. Errors come back as an error object with a code and a message:
401 missing or invalid key.
403 no active Premium subscription.
400 invalid input, like deleting the active program.
404 record or program not found.
409 conflict, like a duplicate measurement timestamp.
422 Liftoscript parse error, or a program script that failed.
Use id=current in the programs endpoints for the active program. Lists page with hasMore and nextCursor, 50 records by default and 200 at most.
Request and response bodies for every endpoint are in the REST API reference.
Run a workout from another app
The endpoints under /api/v1/workout/* run the program engine on the server. Your app reports what the lifter did, and the server applies progressions, updates 1RMs and writes history, the same as finishing in the app.
GET /api/v1/workout/next previews the next day, with weights rounded to your gym, plates per side and rest timers resolved.
POST /api/v1/workout/start starts it.
POST /api/v1/workout/set logs one set by setId. POST /api/v1/workout/sets logs several in one call.
POST /api/v1/workout/finish saves it, runs progressions and advances the next-workout pointer.
GET /api/v1/workout/current returns the live workout, so your app can pick up sets logged on the phone.
DELETE /api/v1/workout/current discards the live workout.
Writes need two extra headers, X-Liftosaur-Device-Id and X-Liftosaur-Client. Every write is safe to repeat after a lost reply. An AMRAP set or a set with askWeight returns 400 missing_set_input until you send the value.
AI assistants and MCP
The same key also powers the MCP server, so Claude, ChatGPT or Gemini can edit programs and log workouts for you. See Using AI with Liftosaur.
{"feature":{"id":"api","title":"API","shortDescription":"Create an API key in the app, then read and write programs, history, measurements and equipment from any script. Run whole workouts through the engine.","order":70,"category":"Sharing and data","datePublished":"2026-09-27","dateModified":"2026-09-29","screenshots":["api-me-row","api-keys-empty"]},"content":"## Create an API key\n\nGo to **Me → API Keys**. The row is in the **Account** group. Type a name under **Create New Key** and tap **Create**. If you leave the name empty, the key is called \"API Key\".\n\nThe new key appears under **Your Keys** with its name and creation date. It starts with `lftsk_`. Tap **Copy** to put it on the clipboard. The label changes to **Copied!** for two seconds.\n\nKeep the key secret. Anyone who has it can read and change your training data. If you lose it, delete it and create a new one.\n\nAPI keys need Premium and a signed-in account. Without an account, the screen shows a **Log in** button. Without Premium, it shows **Subscribe to unlock**.\n\n## Revoke a key\n\nTap **Delete** next to a key. The app asks \"Are you sure you want to delete this API key?\". Tap **OK**. Every request with that key now gets a `401` error. With no keys left, the screen says \"No API keys yet\".\n\n## What a key can do\n\nA key acts as you. It reaches everything the app stores for your account:\n\n- **Programs**: list, read, create, update and delete. Program text is Liftoscript. A syntax error returns `422` with the line number.\n- **History**: list with date filters and paging, read one record, create, update, delete. Records use the Liftoscript Workouts text format.\n- **Playground**: run a program day with commands like `complete_set(1, 1)` and `finish_workout()`, without saving. Returns the workout and the updated program text.\n- **Program stats**: sets per muscle group, strength versus hypertrophy split and workout length estimates for any program text.\n- **Gyms and equipment**: create gyms, switch the current gym, and change bars, plates and fixed weights.\n- **Exercise data**: 1RM, rounding, notes, muscle overrides and per-gym equipment per exercise.\n- **Measurements**: bodyweight, body parts, body fat, and the read-only `sleep`, `calories` and `protein` series from Health sync.\n\n## Call the API\n\nEvery request goes to `https://www.liftosaur.com/api/v1` with the key as a Bearer token:\n\n```\ncurl https://www.liftosaur.com/api/v1/programs \\\n -H \"Authorization: Bearer lftsk_your_key_here\"\n```\n\nThe reply is JSON with a `data` object. Errors come back as an `error` object with a `code` and a `message`:\n\n- `401` missing or invalid key.\n- `403` no active Premium subscription.\n- `400` invalid input, like deleting the active program.\n- `404` record or program not found.\n- `409` conflict, like a duplicate measurement timestamp.\n- `422` Liftoscript parse error, or a program script that failed.\n\nUse `id=current` in the programs endpoints for the active program. Lists page with `hasMore` and `nextCursor`, 50 records by default and 200 at most.\n\nRequest and response bodies for every endpoint are in the [REST API reference](/doc/api).\n\n## Run a workout from another app\n\nThe endpoints under `/api/v1/workout/*` run the program engine on the server. Your app reports what the lifter did, and the server applies progressions, updates 1RMs and writes history, the same as finishing in the app.\n\n- `GET /api/v1/workout/next` previews the next day, with weights rounded to your gym, plates per side and rest timers resolved.\n- `POST /api/v1/workout/start` starts it.\n- `POST /api/v1/workout/set` logs one set by `setId`. `POST /api/v1/workout/sets` logs several in one call.\n- `POST /api/v1/workout/finish` saves it, runs progressions and advances the next-workout pointer.\n- `GET /api/v1/workout/current` returns the live workout, so your app can pick up sets logged on the phone.\n- `DELETE /api/v1/workout/current` discards the live workout.\n\nWrites need two extra headers, `X-Liftosaur-Device-Id` and `X-Liftosaur-Client`. Every write is safe to repeat after a lost reply. An AMRAP set or a set with `askWeight` returns `400 missing_set_input` until you send the value.\n\n## AI assistants and MCP\n\nThe same key also powers the MCP server, so Claude, ChatGPT or Gemini can edit programs and log workouts for you. See [Using AI with Liftosaur](/features/chatgpt-claude-and-ai).","sizes":{"account/account-email-form":{"width":600,"height":1304},"account/account-forgot-password":{"width":600,"height":1304},"account/account-screen":{"width":600,"height":1304},"account/account-sign-in":{"width":600,"height":1304},"chatgpt-claude-and-ai/chatgpt-claude-and-ai-autofill":{"width":600,"height":1304},"api/api-key-created":{"width":600,"height":1304},"api/api-keys-empty":{"width":600,"height":1304},"api/api-me-row":{"width":600,"height":1304},"apple-watch/apple-watch-health-settings":{"width":600,"height":1304},"apple-watch/watch-apple-watch-amrap":{"width":416,"height":496},"apple-watch/watch-apple-watch-crown":{"width":416,"height":496},"apple-watch/watch-apple-watch-exercise":{"width":416,"height":496},"apple-watch/watch-apple-watch-get-ready":{"width":416,"height":496},"apple-watch/watch-apple-watch-home":{"width":416,"height":496},"apple-watch/watch-apple-watch-set-clock":{"width":416,"height":496},"apple-watch/watch-apple-watch-workout":{"width":416,"height":496},"built-in-programs/built-in-programs-import":{"width":600,"height":1304},"built-in-programs/built-in-programs-info":{"width":600,"height":1304},"built-in-programs/built-in-programs-library":{"width":600,"height":1304},"built-in-programs/built-in-programs-preview":{"width":600,"height":1304},"built-in-programs/built-in-programs-started":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-adhoc":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-adhoc-picker":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-create-program-day":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-edit-day":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-edit-exercise":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-next-workout":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-pick-day":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-program-day":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-swap-adhoc":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-swap-from-program":{"width":600,"height":1304},"changing-a-workout/changing-a-workout-swap-recent":{"width":600,"height":1304},"custom-exercises/custom-exercises-autofill":{"width":600,"height":1304},"custom-exercises/custom-exercises-clone-library":{"width":600,"height":1304},"custom-exercises/custom-exercises-cloned":{"width":600,"height":1304},"custom-exercises/custom-exercises-form":{"width":600,"height":1304},"custom-exercises/custom-exercises-hidden-group":{"width":600,"height":1304},"custom-exercises/custom-exercises-image-library":{"width":600,"height":1304},"custom-exercises/custom-exercises-image-source":{"width":600,"height":1304},"custom-exercises/custom-exercises-in-workout":{"width":600,"height":1304},"custom-exercises/custom-exercises-muscle-groups":{"width":600,"height":1304},"custom-exercises/custom-exercises-picker":{"width":600,"height":1304},"custom-exercises/custom-exercises-target-muscles":{"width":600,"height":1304},"equipment-and-gyms/equipment-and-gyms-barbell":{"width":600,"height":1304},"equipment-and-gyms/equipment-and-gyms-custom":{"width":600,"height":1304},"equipment-and-gyms/equipment-and-gyms-exercise":{"width":600,"height":1304},"equipment-and-gyms/equipment-and-gyms-fixed":{"width":600,"height":1304},"equipment-and-gyms/equipment-and-gyms-gyms":{"width":600,"height":1304},"equipment-and-gyms/equipment-and-gyms-hidden":{"width":600,"height":1304},"equipment-and-gyms/equipment-and-gyms-list":{"width":600,"height":1304},"exercise-library/exercise-library-calculator":{"width":600,"height":1304},"exercise-library/exercise-library-from-program":{"width":600,"height":1304},"exercise-library/exercise-library-list":{"width":600,"height":1304},"exercise-library/exercise-library-multi-add":{"width":600,"height":1304},"exercise-library/exercise-library-override-muscles":{"width":600,"height":1304},"exercise-library/exercise-library-picker":{"width":600,"height":1304},"exercise-library/exercise-library-prs":{"width":600,"height":1304},"exercise-library/exercise-library-search":{"width":600,"height":1304},"exercise-library/exercise-library-stats":{"width":600,"height":1304},"exercise-library/exercise-library-swap":{"width":600,"height":1304},"graphs/graphs-bodyweight":{"width":600,"height":1304},"graphs/graphs-choose":{"width":600,"height":1304},"graphs/graphs-exercise":{"width":600,"height":1304},"graphs/graphs-legend":{"width":600,"height":1304},"graphs/graphs-muscle-group":{"width":600,"height":1304},"graphs/graphs-personal-records":{"width":600,"height":1304},"graphs/graphs-settings":{"width":600,"height":1304},"health-sync/android-health-sync-measurements":{"width":600,"height":1339},"health-sync/android-health-sync-settings":{"width":600,"height":1339},"health-sync/android-health-sync-share":{"width":600,"height":1339},"health-sync/android-health-sync-sleep-nutrition":{"width":600,"height":1339},"health-sync/health-sync-measurements":{"width":600,"height":1304},"health-sync/health-sync-settings":{"width":600,"height":1304},"health-sync/health-sync-share":{"width":600,"height":1304},"health-sync/health-sync-sleep-nutrition":{"width":600,"height":1304},"import-export/import-export-export":{"width":600,"height":1304},"import-export/import-export-hevy":{"width":600,"height":1304},"import-export/import-export-import":{"width":600,"height":1304},"liftoscript/liftoscript-exercise-sheet":{"width":600,"height":1304},"liftoscript/liftoscript-full-program":{"width":600,"height":1304},"liftoscript/liftoscript-per-day":{"width":600,"height":1304},"liftoscript/liftoscript-playground":{"width":600,"height":1304},"lock-screen-and-notifications/android-lock-screen-and-notifications-live-update":{"width":600,"height":1339},"lock-screen-and-notifications/android-lock-screen-and-notifications-reminder":{"width":600,"height":1339},"lock-screen-and-notifications/android-lock-screen-and-notifications-sound":{"width":600,"height":1339},"lock-screen-and-notifications/lock-screen-and-notifications-dynamic-island":{"width":600,"height":1304},"lock-screen-and-notifications/lock-screen-and-notifications-live-activity":{"width":600,"height":1304},"lock-screen-and-notifications/lock-screen-and-notifications-reminder":{"width":600,"height":1304},"lock-screen-and-notifications/lock-screen-and-notifications-sound":{"width":600,"height":1304},"measurements/measurements-add":{"width":600,"height":1304},"measurements/measurements-bodyweight":{"width":600,"height":1304},"measurements/measurements-moving-average":{"width":600,"height":1304},"measurements/measurements-sleep-nutrition":{"width":600,"height":1304},"measurements/measurements-types":{"width":600,"height":1304},"first-run-and-settings/first-run-and-settings-appearance":{"width":600,"height":1304},"first-run-and-settings/first-run-and-settings-dark-mode":{"width":600,"height":1304},"first-run-and-settings/first-run-and-settings-equipment":{"width":600,"height":1304},"first-run-and-settings/first-run-and-settings-me":{"width":600,"height":1304},"first-run-and-settings/first-run-and-settings-units":{"width":600,"height":1304},"first-run-and-settings/first-run-and-settings-welcome":{"width":600,"height":1304},"playground/playground-completed":{"width":600,"height":1304},"playground/playground-day":{"width":600,"height":1304},"playground/playground-finished":{"width":600,"height":1304},"playground/playground-variables":{"width":600,"height":1304},"premium/premium-account":{"width":600,"height":1304},"premium/premium-feature-info":{"width":600,"height":1304},"premium/premium-plans":{"width":600,"height":1304},"program-editor/program-editor-create":{"width":600,"height":1304},"program-editor/program-editor-day-details":{"width":600,"height":1304},"program-editor/program-editor-exercise-sheet":{"width":600,"height":1304},"program-editor/program-editor-full-text":{"width":600,"height":1304},"program-editor/program-editor-grid":{"width":600,"height":1304},"program-editor/program-editor-perday-text":{"width":600,"height":1304},"program-editor/program-editor-ui-mode":{"width":600,"height":1304},"program-editor/program-editor-week-stats":{"width":600,"height":1304},"progressions/progressions-linear-settings":{"width":600,"height":1304},"progressions/progressions-preview":{"width":600,"height":1304},"progressions/progressions-state-variables":{"width":600,"height":1304},"progressions/progressions-suppressed":{"width":600,"height":1304},"rest-timer/rest-timer-collapsed":{"width":600,"height":1304},"rest-timer/rest-timer-dynamic-island":{"width":600,"height":1304},"rest-timer/rest-timer-expanded":{"width":600,"height":1304},"rest-timer/rest-timer-get-ready":{"width":600,"height":1304},"rest-timer/rest-timer-lock-screen":{"width":600,"height":1304},"rest-timer/rest-timer-settings":{"width":600,"height":1304},"rest-timer/rest-timer-sound":{"width":600,"height":1304},"rest-timer/watch-rest-timer":{"width":416,"height":496},"rest-timer/watch-rest-timer-exercise":{"width":416,"height":496},"set-types/set-types-amrap-popup":{"width":600,"height":1304},"set-types/set-types-per-side":{"width":600,"height":1304},"set-types/set-types-rpe-logged":{"width":600,"height":1304},"set-types/set-types-rpe-popup":{"width":600,"height":1304},"sharing-programs/sharing-programs-export-text":{"width":600,"height":1304},"sharing-programs/sharing-programs-image-preview":{"width":600,"height":1304},"sharing-programs/sharing-programs-image-settings":{"width":600,"height":1304},"sharing-programs/sharing-programs-import":{"width":600,"height":1304},"sharing-programs/sharing-programs-menu":{"width":600,"height":1304},"sharing-programs/sharing-programs-private-link":{"width":600,"height":1304},"sharing-programs/sharing-programs-public-link":{"width":600,"height":1304},"sharing-workouts/sharing-workouts-copied-text":{"width":600,"height":1304},"sharing-workouts/sharing-workouts-finish-screen":{"width":600,"height":1304},"sharing-workouts/sharing-workouts-profile-settings":{"width":600,"height":1304},"sharing-workouts/sharing-workouts-share-sheet":{"width":600,"height":1304},"sharing-workouts/sharing-workouts-story-preview":{"width":600,"height":1304},"supersets/supersets-liftoscript":{"width":600,"height":1304},"supersets/supersets-next-exercise":{"width":600,"height":1304},"supersets/supersets-picker":{"width":600,"height":1304},"supersets/supersets-program-editor":{"width":600,"height":1304},"supersets/supersets-timer":{"width":600,"height":1304},"supersets/supersets-workout":{"width":600,"height":1304},"sync-and-offline/sync-and-offline-account":{"width":600,"height":1304},"sync-and-offline/sync-and-offline-me-account":{"width":600,"height":1304},"sync-and-offline/sync-and-offline-sign-in":{"width":600,"height":1304},"timed-sets/timed-sets-count-up":{"width":600,"height":1304},"timed-sets/timed-sets-edit-time":{"width":600,"height":1304},"timed-sets/timed-sets-get-ready":{"width":600,"height":1304},"timed-sets/timed-sets-recorded":{"width":600,"height":1304},"timed-sets/timed-sets-running":{"width":600,"height":1304},"timed-sets/timed-sets-set-row":{"width":600,"height":1304},"timed-sets/timed-sets-timers":{"width":600,"height":1304},"week-insights/week-insights-details":{"width":600,"height":1304},"week-insights/week-insights-edit-muscle-groups":{"width":600,"height":1304},"week-insights/week-insights-exercises":{"width":600,"height":1304},"week-insights/week-insights-home":{"width":600,"height":1304},"week-insights/week-insights-muscle-groups":{"width":600,"height":1304},"week-insights/week-insights-settings":{"width":600,"height":1304},"workout-history/workout-history-change-date":{"width":600,"height":1304},"workout-history/workout-history-delete":{"width":600,"height":1304},"workout-history/workout-history-feed":{"width":600,"height":1304},"workout-history/workout-history-menu":{"width":600,"height":1304},"workout-history/workout-history-month-calendar":{"width":600,"height":1304},"workout-history/workout-history-note-on-card":{"width":600,"height":1304},"workout-history/workout-history-notes":{"width":600,"height":1304},"workout-history/workout-history-past-card":{"width":600,"height":1304},"workout-history/workout-history-past-workout":{"width":600,"height":1304},"workout-history/workout-history-week-insights":{"width":600,"height":1304},"workout-screen/workout-screen-e1rm":{"width":600,"height":1304},"workout-screen/workout-screen-edit-target":{"width":600,"height":1304},"workout-screen/workout-screen-exercise-menu":{"width":600,"height":1304},"workout-screen/workout-screen-exercise-notes":{"width":600,"height":1304},"workout-screen/workout-screen-history":{"width":600,"height":1304},"workout-screen/workout-screen-keypad":{"width":600,"height":1304},"workout-screen/workout-screen-next-set":{"width":600,"height":1304},"workout-screen/workout-screen-overview":{"width":600,"height":1304},"workout-screen/workout-screen-rounding":{"width":600,"height":1304},"workout-screen/workout-screen-summary":{"width":600,"height":1304}}}