KinesteX

Sessions, Profile & Limits

Chat sessions are persistent, named, durable records — messages survive restarts and can be reloaded any time. A session belongs to the authenticated user; other users cannot read, modify, or delete it.


Endpoints:


MethodPathDescription
GET/api/trainer/historyLoad a conversation's message history
POST/api/trainer/sessionsCreate a named chat session ({ "title": "Leg day planning" }, max 255 chars)
GET/api/trainer/sessionsList the user's sessions, most recently active first
PATCH/api/trainer/sessions/:idRename a session
DELETE/api/trainer/sessions/:idDelete a session (also clears its in-progress planning state)
GET/api/trainer/profileGet the stored fitness profile (404 if none yet)
PUT/api/trainer/profileCreate or update the fitness profile

History (GET /api/trainer/history?session_id=…&limit=50, limit capped at 100) — use it to restore chat UI state on app startup. Assistant messages carry metadata.intent, metadata.action, and — when the turn produced a plan — the full metadata.workout_plan, so you can re-render plans from history alone. If the user has no sessions yet the response is { "messages": [] }; it never creates a session.


json
1{
2  "conversation_id": "9c1e37a2-…",
3  "title": "New Chat",
4  "messages": [
5    { "role": "user", "content": "make me a chest workout", "created_at": "2026-07-14T10:00:00Z" },
6    {
7      "role": "assistant",
8      "content": "Here's your chest workout! …",
9      "metadata": { "intent": "CREATE_WORKOUT", "action": "WORKOUT_UPDATED", "workout_plan": { } },
10      "created_at": "2026-07-14T10:00:05Z"
11    }
12  ]
13}

Rate limits:


LimitScopeOn exceed
50 workout generations / dayper user (resets at UTC midnight)429
50 refinements / workoutper workout plan429 — confirm the current plan or start a new workout
50 chat sessionsper user400 on session create
Company-level daily quotaper company429

Undo/redo do not count against the refinement limit. Higher limits are available — contact KinesteX.