curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/machines/train' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"examples": [
{
"expected_category": "string",
"input": "string"
}
],
"include_flywheel": true
}'
{
"concept_models_learned": 1,
"concept_rules_learned": 1,
"custom_examples": 1,
"flywheel_examples": 1,
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"successful_abductions": 1,
"total_examples": 1,
"training_time_ms": 250
}
Train machine handler
Required scope: models:manage
POST
/
api
/
v1
/
machines
/
train
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/machines/train' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"examples": [
{
"expected_category": "string",
"input": "string"
}
],
"include_flywheel": true
}'
{
"concept_models_learned": 1,
"concept_rules_learned": 1,
"custom_examples": 1,
"flywheel_examples": 1,
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"successful_abductions": 1,
"total_examples": 1,
"training_time_ms": 250
}
Required scope:
models:manage
Request body
TrainRequest
ProvisionTrainingExample[]
Additional training examples (optional).
boolean
Whether to include flywheel events (default: true).
Response
TrainResponse
integer
required
integer
required
integer
required
integer
required
string
required
integer
required
integer
required
integer (int64)
required
Status codes
| Code | Meaning |
|---|---|
200 | Training completed |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
404 | Machine not provisioned |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
500 | Training failed |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/machines/train' \
--header "X-API-Key: $STATESET_NSR_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"examples": [
{
"expected_category": "string",
"input": "string"
}
],
"include_flywheel": true
}'
{
"concept_models_learned": 1,
"concept_rules_learned": 1,
"custom_examples": 1,
"flywheel_examples": 1,
"org_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"successful_abductions": 1,
"total_examples": 1,
"training_time_ms": 250
}
Last modified on August 31, 2026