---
title: "Bulk Retrain Conditions"
method: POST
path: "/internal/conditions/bulk-retrain"
tags: ["internal"]
---

# Bulk Retrain Conditions

`POST /internal/conditions/bulk-retrain`

## Request

- Base URL: `https://api.kobaltlabs.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.kobaltlabs.com/internal/conditions/bulk-retrain`
- Auth: none declared

Run free_coding for each requested condition and return suggested code.

Results are **not** persisted — the caller reviews suggestions and calls
bulk-update to save them.

At most ``_BULK_RETRAIN_MAX_BLOCKS`` conditions are processed per request.
Concurrency is bounded by a semaphore to avoid overwhelming the LLM API.

## Request body

- ConditionBulkRetrainRequest
  - `block_ids` string[], required

## Response `200`

Successful Response

- ConditionBulkRetrainResponse
  - `items` ConditionBulkRetrainResultItem[], required
    - `block_id` string, uuid, required
    - `suggested_code` string, nullable, required
    - `explanation` string, nullable, required
    - `error` string, nullable, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kobaltlabs/apis/kobaltlabs-api.md) - [All operations](https://skmtc.dev/kobaltlabs/apis/kobaltlabs-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kobaltlabs/apis/kobaltlabs-api/revisions/8587332d5e43?raw)
