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

# PUT /v1/streams/{stage_id}/packs/{pack_id}/content

```text
PUT https://weights.fyi/run/v1/streams/{stage_id}/packs/{pack_id}/content?item_count=<n>
Authorization: Bearer <token>                    scope: submit
X-Content-SHA256: <the body's SHA-256, optional>

<the pack's bytes>
```

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

**Answer time:** synchronous: the answer comes when the last byte has been read, checked and stored and the pack is registered, so the time is mostly the time your connection takes to carry the body.

Send one input pack's bytes with your API key alone and register the pack runnable on its stream. You need no storage credential: the service streams the body into your workspace's custody in parts of 64 MiB, hashes it on the way, and registers the pack with the stored object's `r2_input_uri`, `sha256` and `compressed_bytes`. A `jsonl_zst` body must start with a Zstandard frame. Nothing is registered until the whole body has arrived and matched its digest.

One upload can feed several stages of the same plan: register the receipt's `r2_input_uri`, `sha256` and `compressed_bytes` on another stream with [POST .../packs](/run/docs/reference/streams-packs-create.md), with `est_input_tokens` and `est_output_tokens`. Sending the same bytes to the same pack again answers its registration and stores nothing twice; other bytes for a registered pack are refused. A pack registered lazily is promoted by its upload.

## Request

| Name | Where | Required | Meaning |
|---|---|---|---|
| `Authorization` | header | yes | Bearer token with `submit` scope. |
| `stage_id` | path | yes | Plan-qualified stream ID, or the authored stage ID with `plan_id`. |
| `pack_id` | path | yes | Letters, digits and `._:-`, at most 128 characters. |
| `plan_id` | query | no | The plan, when `stage_id` is the authored stage ID. |
| `item_count` | query | yes | Items in the pack, at least 1. |
| `format` | query | no | `jsonl_zst` (default; `jsonl.zst` is accepted), `jsonl`, `parquet`, `arrow_ipc`, `lance` or `safetensors`. |
| `ordinal` | query | no | Position in the stream; the next free one when omitted. |
| `est_input_tokens`, `est_output_tokens` | query | no | Token estimates; 0 when omitted. |
| `max_pending_packs` | query | no | This call's backlog limit instead of the stage's. |
| `sha256` or `X-Content-SHA256` | query or header | no | Expected SHA-256 of the body; both must agree when both are given. |
| `Content-Length` | header | no | Over the limit refuses the call before a byte is read; a chunked body is read up to the limit. |
| the body | body | yes | The pack's bytes, at most 512 MiB (`max_record_pack_bytes` in [capabilities](/run/docs/reference/compute-capabilities.md)). |

## Return value

**201 Created** for a new or promoted pack, **200 OK** for an identical replay, with a `Location` header naming the pack. The body is the registration: `plan_id`, authored `stage_id`, `stream_id`, `pack_id`, `ordinal`, `item_count`, `format`, `r2_input_uri`, `sha256`, `compressed_bytes`, the token estimates and `replayed`.

## Errors

| Status | Code | Meaning |
|---|---|---|
| `400` | `invalid_compute_plan` | A missing or bad query value, an empty body, or a stage that takes no packs. |
| `400` | `source_format_mismatch` | A `jsonl_zst` body without a Zstandard frame. |
| `400` | `content_sha256_mismatch` | The body's digest is not the one given; `expected` and `actual` show both. |
| `401` | `unauthorized` | Supply a valid token. |
| `403` | `scope_required`, `compute_tenancy_unauthorized` | Submit access is unavailable. |
| `404` | `compute_stage_not_found` | Absent or inaccessible stream. |
| `409` | `compute_plan_conflict` | Other bytes for a registered pack, or a sealed or finished stream. |
| `413` | `body_too_large` | The body is over the limit; `limit_bytes` gives it. |
| `429` | `stream_backpressure` | The stream's backlog is full; wait for packs to finish. |
| `502` | `storage_unavailable` | Storage refused a part; nothing is registered, so send the pack again. |
| `503` | `stream_store_not_configured` | Uploads are not switched on for this service. |

## Examples

```sh
curl -s -T pack-0001.jsonl.zst "https://weights.fyi/run/v1/streams/STREAM_ID/packs/PACK_ID/content?item_count=500" -H "Authorization: Bearer $WEIGHTS_API_KEY"
```

## History

- 2026-11-01: added uploads with the API key alone, digest checks and identical replays.

## See also

See [list completed outputs](/run/docs/reference/streams-outputs-list.md), [read a pack's output](/run/docs/reference/streams-packs-output-get.md) and [register a pack](/run/docs/reference/streams-packs-create.md).
