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

# Branch from a parent thought to multiple children

> **Required scope:** write

**Required scope:** `write`

### Request body

`BranchThoughtsRequest`

<ParamField body="children" type="ThoughtChild[]" required>
  Children (content, score) pairs
</ParamField>

<ParamField body="parent_id" type="integer" required>
  Parent thought ID
</ParamField>

### Response

`ThoughtResponse[]` — each element:

<ResponseField name="content" type="string" required>
  Content
</ResponseField>

<ResponseField name="id" type="integer" required>
  Thought ID
</ResponseField>

<ResponseField name="score" type="number (float)" required>
  Score
</ResponseField>

### Status codes

| Code  | Meaning                                            |
| ----- | -------------------------------------------------- |
| `200` | Branched successfully                              |
| `401` | Unauthorized — missing or invalid credentials      |
| `403` | Forbidden — the key/token lacks the required scope |
| `429` | Rate limited — see Retry-After / X-RateLimit-Reset |
| `503` | GoT not enabled                                    |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.nsr.stateset.com/api/v1/nsr/got/branch' \
    --header 'X-API-Key: YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "children": [
      {
        "content": "Apply rule: walk -> WALK",
        "score": 0.9
      },
      {
        "content": "Apply rule: twice -> repeat 2x",
        "score": 0.8
      },
      {
        "content": "Apply composition operator",
        "score": 0.7
      }
    ],
    "parent_id": 0
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "content": "Two-person tent, green — replacement for damaged pole set.",
      "id": 1001,
      "score": 7.5
    }
  ]
  ```
</ResponseExample>
