> ## Documentation Index
> Fetch the complete documentation index at: https://weights.fyi/run/llms.txt

# POST /v1/streams/{stage_id}/packs/accept-loss

```text
POST https://weights.fyi/run/v1/streams/{stage_id}/packs/accept-loss
Authorization: Bearer <token>                    scope: submit
Content-Type: application/json
```

**Available since:** 2026-10-31: included in this build; see [What is live](/run/docs/what-is-live.md) for deployment status.

**Answer time:** synchronous count check, acceptance commit and scheduling refresh.

The [stage acceptance of loss](/run/docs/reference/compute-stages-packs-accept-loss.md) addressed by stream, like [registering packs](/run/docs/reference/streams-packs-create.md) and [sealing](/run/docs/reference/streams-seal.md): a stream's dead-lettered packs become `dead_letter_accepted`, with your reason. Body, checks, replay and answer are the stage call's; no output is invented.

Address the stream by its `stream_id` (`plan_id~stage_id`), or by its authored stage identifier with `plan_id` in the query. Send the stage's current `packs_dead_lettered` as `expected_dead_lettered`; a changed count refuses the call without changing work.

## Request

| Name | Where | Required | Meaning |
|---|---|---|---|
| `Authorization` | header | yes | Bearer token with `submit`. |
| `stage_id` | path | yes | The plan's `stream_id`, or an authored stage identifier. |
| `plan_id` | query | no | Disambiguates an authored stage identifier; must agree with a qualified identifier. |
| `Idempotency-Key` | header | conditional | Unique key, unless `operation_key` is supplied. |
| `operation_key` | JSON body | conditional | Operation key; takes precedence over the header for durable replay. |
| `expected_dead_lettered` | JSON body | yes | Positive integer matching the current stage count. |
| `reason` | JSON body | yes | Nonblank string, at most 4,096 UTF-8 bytes after trimming. |

Send a JSON object of at most 1 MiB. Unknown fields are rejected.

## Return value

**200 OK** with the [plan receipt](/run/docs/reference/compute-plans-get.md), `operation` details and `replayed`, as the stage call answers. Accepted losses remain visible in `packs_dead_letter_accepted`.

## Errors

| Status | Code | Meaning |
|---|---|---|
| `400` | `invalid_json`, `invalid_compute_plan`, `invalid_idempotency_key` | Invalid body, count, key or reason. |
| `401` | `unauthorized`, `invalid_token`, `token_revoked`, `token_expired` | Supply a valid token. |
| `403` | `scope_required`, `account_suspended`, `compute_tenancy_unauthorized` | Access is unavailable. |
| `404` | `compute_plan_not_found`, `compute_stage_not_found` | Absent or inaccessible work. |
| `409` | `ambiguous_compute_stage` | Supply `plan_id` or use `stream_id`. |
| `409` | `dead_letter_count_changed` | Refresh; includes expected and actual counts. |
| `409` | `compute_plan_conflict`, `idempotency_key_in_progress` | State or key prevents acceptance. |
| `413` | `body_too_large` | Over 1 MiB. |
| `422` | `idempotency_key_reused` | Header key belongs to a different request. |
| `429` | `rate_limited` | Wait for `Retry-After`. |

## Examples

```sh
curl -s 'https://weights.fyi/run/v1/streams/STREAM_ID/packs/accept-loss' \
  -H "Authorization: Bearer $WEIGHTS_API_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: accept-loss-1" \
  -d '{"expected_dead_lettered":1,"reason":"Reviewed; missing results are unnecessary."}'
```

## History

- 2026-10-31: documented the acceptance of loss by stream.

## See also

- [Accept loss by plan and stage](/run/docs/reference/compute-stages-packs-accept-loss.md)
- [Retry by stream](/run/docs/reference/streams-packs-retry.md)
- [Read a plan](/run/docs/reference/compute-plans-get.md)
