AI coach that creates personalized training plans for runners, cyclists, swimmers, and triathletes. This skill provides access to workout plans, performance metrics, AI coaching, and plan adaptation. Powered by Transition.
Authenticated endpoints require the TRANSITION_API_KEY environment variable. Pass it as the X-API-Key header on every request. If it's not set, tell the user to generate one in the Transition app under Settings > API Keys.
Base URL: https://api.transition.fun
Generate a random structured workout. Each request returns a different workout.
curl "https://api.transition.fun/api/v1/wod?sport=run&duration=45"
Parameters:
sport — run, bike, swim, or strength (default: run)duration — minutes, 10-300 (default: 45)Response:
{
"date": "2026-02-09",
"sport": "run",
"name": "Tempo Builder",
"description": "Build aerobic endurance with sustained tempo efforts",
"duration_minutes": 45,
"intensity": "moderate",
"segments": [
{"name": "Warm-up", "duration_minutes": 9, "intensity": "easy", "description": "Easy jog to warm up"},
{"name": "Tempo", "duration_minutes": 27, "intensity": "moderate", "description": "Steady tempo at comfortably hard pace"},
{"name": "Cool-down", "duration_minutes": 9, "intensity": "easy", "description": "Easy jog to cool down"}
]
}
Retrieve scheduled workouts for a date range.
curl -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/workouts?start=2026-02-09&end=2026-02-15"
Parameters:
start — Start date (YYYY-MM-DD, required)end — End date (YYYY-MM-DD, required)start and end is 90 days.curl -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/workouts/123"
Trigger AI workout generation for the user's training plan.
curl -X POST -H "X-API-Key: $TRANSITION_API_KEY" \
-H "Content-Type: application/json" \
"https://api.transition.fun/api/v1/workouts/generate"
Adapt the training plan based on recent performance or schedule changes.
curl -X POST -H "X-API-Key: $TRANSITION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "feeling fatigued after race weekend"}' \
"https://api.transition.fun/api/v1/workouts/adapt"
Poll whether workout generation/adaptation is complete.
curl -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/workouts/status"
Get CTL (fitness), ATL (fatigue), and TSB (form) data.
curl -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/performance/pmc"
Get FTP, threshold paces, heart rate zones, and other metrics.
curl -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/performance/stats"
Chat with the AI endurance coach. Returns a streaming response (SSE).
curl -X POST -H "X-API-Key: $TRANSITION_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "Should I do intervals today or rest?"}' \
"https://api.transition.fun/api/v1/coach/chat"
curl -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/coach/history"
curl -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/profile"
curl -X POST -H "X-API-Key: $TRANSITION_API_KEY" \
"https://api.transition.fun/api/v1/workouts/123/push-garmin"
| Tier | Read Endpoints | AI Endpoints |
|---|---|---|
| ------ | --------------- | ------------- |
| Free | 100/day | 3/day |
| Paid | 10,000/day | 100/day |
Read endpoints: workouts, metrics, profile, history
AI endpoints: coach chat, adapt, generate
Rate limit errors return HTTP 429 with a message indicating which limit was exceeded.
GET /api/v1/performance/pmc and look at TSB (Training Stress Balance). If TSB is below -20, the athlete is likely fatigued — suggest easier workouts or rest.GET /api/v1/wod. No API key needed.POST /workouts/generate or POST /workouts/adapt, poll GET /workouts/status until it returns ready, then fetch the workouts.共 1 个版本