curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/train' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"examples": [
{
"correct_decision": "string",
"tool_input": null,
"tool_name": "string"
}
],
"org_id": "string"
}'
{
"successful_abductions": 1,
"total_examples": 1,
"training_time_ms": 1
}
PolicyTrain
Required scope: models:manage
POST
/
api
/
v1
/
policy
/
train
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/train' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"examples": [
{
"correct_decision": "string",
"tool_input": null,
"tool_name": "string"
}
],
"org_id": "string"
}'
{
"successful_abductions": 1,
"total_examples": 1,
"training_time_ms": 1
}
Required scope:
models:manage
Request body
PolicyTrainRequest
PolicyExample[]
required
string
Response
PolicyTrainResponse
integer
required
integer
required
integer (int64)
required
Status codes
| Code | Meaning |
|---|---|
200 | Policy training result |
400 | Invalid request |
401 | Unauthorized — missing or invalid credentials |
403 | Forbidden — the key/token lacks the required scope |
429 | Rate limited — see Retry-After / X-RateLimit-Reset |
500 | Internal server error |
curl --request POST \
--url 'https://api.nsr.stateset.com/api/v1/policy/train' \
--header 'X-API-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"examples": [
{
"correct_decision": "string",
"tool_input": null,
"tool_name": "string"
}
],
"org_id": "string"
}'
{
"successful_abductions": 1,
"total_examples": 1,
"training_time_ms": 1
}