{"name":"Gym API","description":"Personal gym tracker for one person. A coding agent writes the training plan (planned workouts) here; the owner starts the next workout in the app and logs sets. JSON, no auth, CORS open.","base_url":"https://gym.abdellatif.io/api","auth":"none","docs":{"html":"https://gym.abdellatif.io/api/docs","openapi":"https://gym.abdellatif.io/api/openapi.json","llms_txt":"https://gym.abdellatif.io/llms.txt"},"resources":{"next":{"href":"https://gym.abdellatif.io/api/next","description":"The next workout (prefilled) and the planned queue."},"workouts":{"href":"https://gym.abdellatif.io/api/workouts","description":"Plans and history: workout → items (A1/A2 supersets) → sets."},"exercises":{"href":"https://gym.abdellatif.io/api/exercises","description":"Exercise library with history, PRs and suggestions."},"programs":{"href":"https://gym.abdellatif.io/api/programs","description":"Optional groupings of workouts (training blocks)."},"stats":{"href":"https://gym.abdellatif.io/api/stats","description":"Totals, weekly volume, streak, muscle recency, recent PRs."},"export":{"href":"https://gym.abdellatif.io/api/export","description":"Everything as one JSON document."}},"endpoints":[{"method":"GET","path":"/api/next","summary":"The next workout (prefilled) and the planned queue"},{"method":"GET","path":"/api/workouts","summary":"List workouts (summaries, no items)"},{"method":"POST","path":"/api/workouts","summary":"Create a workout with nested items (and sets) in one call"},{"method":"GET","path":"/api/workouts/{id}","summary":"One workout with items and sets"},{"method":"PUT","path":"/api/workouts/{id}","summary":"Create or update a workout by id (upsert with merge rules)"},{"method":"PATCH","path":"/api/workouts/{id}","summary":"Change workout fields (date, position, title, notes, status …)"},{"method":"DELETE","path":"/api/workouts/{id}","summary":"Delete a workout with its items and sets"},{"method":"POST","path":"/api/workouts/{id}/start","summary":"Start: status in_progress, sets materialised from the suggestions"},{"method":"POST","path":"/api/workouts/{id}/complete","summary":"Complete: status completed, unlogged sets dropped, items marked done/skipped"},{"method":"POST","path":"/api/workouts/{id}/skip","summary":"Skip a planned workout (restore with PATCH status planned)"},{"method":"POST","path":"/api/workouts/{id}/duplicate","summary":"Copy a workout as a new plan (items and prescriptions, no sets)"},{"method":"POST","path":"/api/workouts/{id}/reorder","summary":"Reorder a workout's items"},{"method":"POST","path":"/api/workouts/{id}/items","summary":"Add an item (exercise or free-form block) to a workout"},{"method":"PATCH","path":"/api/items/{id}","summary":"Change an item (prescription, exercise, label, notes …)"},{"method":"DELETE","path":"/api/items/{id}","summary":"Delete an item and its sets"},{"method":"POST","path":"/api/items/{id}/sets","summary":"Add a set (defaults copied from the previous set)"},{"method":"PATCH","path":"/api/sets/{id}","summary":"Change a set (e.g. log it: done true)"},{"method":"DELETE","path":"/api/sets/{id}","summary":"Delete a set"},{"method":"GET","path":"/api/exercises","summary":"List exercises with usage stats (search before naming one in a plan)"},{"method":"POST","path":"/api/exercises","summary":"Create an exercise with explicit metadata"},{"method":"GET","path":"/api/exercises/{id}","summary":"Exercise detail: full history, PRs and next suggestion"},{"method":"PATCH","path":"/api/exercises/{id}","summary":"Change an exercise (aliases, notes, unit, step …)"},{"method":"DELETE","path":"/api/exercises/{id}","summary":"Delete an exercise (items keep their name, lose the link)"},{"method":"POST","path":"/api/exercises/{id}/merge","summary":"Merge a duplicate into another exercise (history moves, name becomes an alias)"},{"method":"GET","path":"/api/exercises/{id}/suggestion","summary":"What the app would prefill for a prescription you are considering"},{"method":"GET","path":"/api/programs","summary":"List programs with workout counts"},{"method":"POST","path":"/api/programs","summary":"Create a program"},{"method":"GET","path":"/api/programs/{id}","summary":"A program with its workouts (summaries)"},{"method":"PATCH","path":"/api/programs/{id}","summary":"Change a program (name, description, status)"},{"method":"DELETE","path":"/api/programs/{id}","summary":"Delete a program (optionally with its planned workouts)"},{"method":"GET","path":"/api/stats","summary":"Totals, weekly volume, streak, muscle recency, recent PRs"},{"method":"GET","path":"/api/export","summary":"Everything as one JSON document (backup)"},{"method":"POST","path":"/api/import","summary":"Bulk upsert exercises, programs and workouts"},{"method":"POST","path":"/api/parse","summary":"Preview how a prescription will be parsed (and how a result text reads as sets)"},{"method":"GET","path":"/api","summary":"API index: resources, endpoints, links to the docs"},{"method":"GET","path":"/api/openapi.json","summary":"This OpenAPI 3.1 document"},{"method":"GET","path":"/api/docs","summary":"Human-readable reference with recipes (HTML)"},{"method":"GET","path":"/llms.txt","summary":"Guide for coding agents (markdown)"},{"method":"GET","path":"/api/health","summary":"Health check"}],"quick_start":["curl -sS https://gym.abdellatif.io/api/next","curl -sS \"https://gym.abdellatif.io/api/exercises?q=bench\"","See https://gym.abdellatif.io/llms.txt for recipes (plan next week, edit a plan, read history)."]}