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

# Perform ensemble inference with input dropout for confidence calibration

> **Required scope:** write

**Required scope:** `write`

### Request body

`NSREnsembleInferRequest`

**drop\_count** `integer`

Number of random tokens to drop per run (default: 1)

**inputs** `GroundedInputRequest[]` *required*

Input sequence for inference

**runs** `integer`

Number of ensemble runs (default: 5, max: 25)

**session\_id** `string`

Optional session ID for context persistence

### Response

`NSREnsembleInferResponse`

**agreement** `number (double)` *required*

Agreement ratio for the consensus (0.0 to 1.0)

**confidence** `number (double)` *required*

Calibrated confidence based on agreement and mean per-run confidence (0.0 to 1.0)

**output** `object`

**output**

**type** `string` *required*

**processing\_time\_ms** `integer (int64)` *required*

Processing time in milliseconds

**results** `NSREnsembleRunResponse[]` *required*

Per-run outputs and diagnostics

**NSREnsembleRunResponse**

**confidence** `number (double)` *required*

Confidence score for this run

**error** `string`

Error string when the run fails

**inputs\_used** `integer` *required*

Inputs used in this run (after dropout)

**output** `object`

**output**

**type** `string` *required*

**runs** `integer` *required*

Number of runs performed

### Status codes

| Code | Meaning |
| - | - |
| `200` | Ensemble inference successful |
| `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 |
| `504` | Reasoning budget exhausted before completion |

```bash cURL theme={null}
curl --request POST \
  --url 'https://api.nsr.stateset.com/api/v1/nsr/infer/ensemble' \
  --header "X-API-Key: $STATESET_NSR_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "drop_count": 1,
  "inputs": [
    {
      "type": "text",
      "value": "49.00"
    }
  ],
  "runs": 1,
  "session_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}'
```

```json 200 theme={null}
{
  "agreement": 1.5,
  "confidence": 7.5,
  "output": {
    "type": "null"
  },
  "processing_time_ms": 250,
  "results": [
    {
      "confidence": 7.5,
      "error": "string",
      "inputs_used": 1,
      "output": {
        "type": null
      }
    }
  ],
  "runs": 1
}
```


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