> ## 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.

# Start Training

> Start a new training job with the specified configuration.

Start a new training job with the specified configuration.

### Request body

`TrainingRequest`

**agent\_config** `AgentConfigRequest` *required*

**environment\_scenarios** `object[]` *required*

Training scenarios

**reward\_config** `object` *required*

Reward function configuration

**num\_episodes** `integer`

Number of training episodes

**profile** `string`

Training profile

**resume\_from\_checkpoint** `string,null`

Checkpoint path to resume training from

**training\_config\_overrides** `object,null`

Optional training configuration overrides

### Response

`TrainingResponse`

**training\_id** `string` *required*

Training job identifier

**status** `string` *required*

Training status

**estimated\_time** `number,null`

Estimated completion time

**message** `string` *required*

Status message

### Status codes

| Code | Meaning |
| - | - |
| `200` | Successful response |
| `202` | Training started successfully |
| `400` | Invalid configuration |
| `401` | Authentication required |
| `403` | Insufficient permissions |
| `422` | Validation Error |
| `429` | Rate limit exceeded |
| `500` | Internal server error |

```bash cURL theme={null}
curl --request POST \
  --url 'http://localhost:8000/training' \
  --header "Authorization: Bearer $STATESET_AGENTS_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "agent_config": {
    "enable_planning": false,
    "max_new_tokens": 256,
    "model_name": "gpt2",
    "temperature": 0.7
  },
  "environment_scenarios": [
    {
      "id": "customer_support",
      "topic": "support",
      "user_responses": [
        "I need help",
        "Thank you"
      ]
    }
  ],
  "num_episodes": 50,
  "profile": "balanced",
  "resume_from_checkpoint": "./outputs/checkpoint-100",
  "reward_config": {
    "helpfulness_weight": 0.7,
    "safety_weight": 0.3
  },
  "training_config_overrides": {
    "continual_strategy": "replay_lwf",
    "replay_ratio": 0.3
  }
}'
```

```json 200 theme={null}
{
  "training_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "status": "pending",
  "estimated_time": 1.5,
  "message": "Two-person tent, green — replacement for damaged pole set."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.