# Custom Workout

Configure custom workout sequences. For complete custom workout implementation, see [Custom Integration](/docs/integration/custom-integration).

| Parameter | Type | Description | Effect |
|-----------|------|-------------|--------|
| customWorkoutExercises | array | Array of exercise configurations | Defines a custom sequence of exercises with their parameters |
| restSpeeches | string[] | Rest period audio identifiers | Custom audio to play during rest periods |
| currentRestSpeech | string | Current rest speech identifier | Sets the active rest period audio |
| videoURL | string | Custom video URL | URL for custom exercise demonstration video |

**Custom Workout Flow:**
1. Pass `customWorkoutExercises` during initial verification
2. Send `workout_activity_action: "start"` message to begin the workout
3. The system will navigate to the workout flow automatically

**Custom Workout Parameters**

_Swift (iOS)_
```swift
// Via customParams for additional settings
let customExercises = [
    WorkoutSequenceExercise(
        exerciseId: "exercise-id-1",
        reps: 15,
        duration: nil,
        includeRestPeriod: true,
        restDuration: 20
    )
]

kinestex.createCustomWorkoutView(
    customWorkouts: customExercises, // direct
    customParams: [
        "restSpeeches": ["rest_speech_1", "rest_speech_2"],
        "videoURL": "https://example.com/demo.mp4"
    ]
)
```

_Kotlin (Android)_
```kotlin
// Via customParams for additional settings
val customExercises = listOf(
    WorkoutSequenceExercise(
        exerciseId = "exercise-id-1",
        reps = 15,
        duration = null,
        includeRestPeriod = true,
        restDuration = 20
    )
)

KinesteXSDK.createCustomWorkoutView(
    customWorkouts = customExercises, // direct
    customParams = mapOf(
        "restSpeeches" to listOf("rest_speech_1", "rest_speech_2"),
        "videoURL" to "https://example.com/demo.mp4"
    )
)
```

_React Native_
```jsx
// Direct support in postData
const customWorkoutExercises = [
  {
    exerciseId: 'exercise-id-1',
    reps: 15,
    duration: null,
    includeRestPeriod: true,
    restDuration: 20,
  },
];

const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  customWorkoutExercises: customWorkoutExercises, // direct
  customParameters: {
    restSpeeches: ['rest_speech_1', 'rest_speech_2'],
    videoURL: 'https://example.com/demo.mp4',
  },
};
```

_Flutter_
```dart
// Via customParams for additional settings
final customExercises = [
  WorkoutSequenceExercise(
    exerciseId: "exercise-id-1",
    reps: 15,
    duration: null,
    includeRestPeriod: true,
    restDuration: 20,
  ),
];

KinesteXAIFramework.createCustomWorkoutView(
  customWorkouts: customExercises, // direct
  customParams: {
    "restSpeeches": ["rest_speech_1", "rest_speech_2"],
    "videoURL": "https://example.com/demo.mp4",
  },
);
```

_HTML / JavaScript_
```html
// Direct in postData object
const customWorkoutExercises = [
  {
    exerciseId: "exercise-id-1",
    reps: 15,
    duration: null,
    includeRestPeriod: true,
    restDuration: 20,
  },
];

const postData = {
  userId: "user-123",
  company: "YOUR_COMPANY",
  key: "YOUR_API_KEY",
  customWorkoutExercises: customWorkoutExercises,
  restSpeeches: ["rest_speech_1", "rest_speech_2"],
  videoURL: "https://example.com/demo.mp4",
};
```

_React (TypeScript)_
```tsx
// Direct support in postData
const customWorkoutExercises: WorkoutSequenceExercise[] = [
  {
    exerciseId: 'exercise-id-1',
    reps: 15,
    duration: null,
    includeRestPeriod: true,
    restDuration: 20,
  },
];

const postData: IPostData = {
  key: 'YOUR_API_KEY',
  userId: 'user-123',
  company: 'YOUR_COMPANY',
  customWorkoutExercises: customWorkoutExercises, // direct
  customParameters: {
    restSpeeches: ['rest_speech_1', 'rest_speech_2'],
    videoURL: 'https://example.com/demo.mp4',
  },
};
```

---
Source: https://kinestex.com/docs/customization-parameters/custom-workout-params · Index: https://kinestex.com/llms.txt
