> ## 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 (v1)

> Start a new v1 training job.

Start a new v1 training job.

### Request body

`TrainingRequestV1`

<ParamField body="prompts" type="string[]" required>
  Training prompts
</ParamField>

<ParamField body="strategy" type="string">
  Training strategy
</ParamField>

<ParamField body="num_iterations" type="integer">
  Number of training iterations
</ParamField>

<ParamField body="idempotency_key" type="string,null">
  Optional idempotency key for safe retries
</ParamField>

### Response

`TrainingCreateResponseV1`

<ResponseField name="job_id" type="string" required />

<ResponseField name="status" type="string" required />

### Status codes

| Code  | Meaning                 |
| ----- | ----------------------- |
| `200` | Successful response     |
| `202` | Successful Response     |
| `401` | Authentication required |
| `422` | Validation Error        |
| `429` | Rate limit exceeded     |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'http://localhost:8000/api/v1/training' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "prompts": [
      "string"
    ],
    "strategy": "computational",
    "num_iterations": 1,
    "idempotency_key": "req_01J9X4Q8M2ZK7V3N"
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "job_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "status": "pending"
  }
  ```
</ResponseExample>
