> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Flywheel train handler

> Trigger flywheel-driven training for the authenticated org. Collects recent learning events, converts them to training examples, and runs a training batch…

Trigger flywheel-driven training for the authenticated org.

Collects recent learning events, converts them to training examples,
and runs a training batch through the NSR Machine's deduction-abduction learner.

**Required scope:** `write`

### Response

No response body. Not enough events to train.

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Not enough events to train                         |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/api/v1/flywheel/train' \
    --header 'X-API-Key: YOUR_API_KEY'
  ```
</RequestExample>
