# Assets

> Download the stored files behind a segment, such as reconstructed scenes and collision meshes.

Source: https://rayform.world/docs/api/assets
Last updated: 2026-10-18
Status: Rayform is in private preview. APIs, formats and the SDK described here may change before general availability.

Assets are content-addressed: an asset's ID is the SHA-256 of its decoded content, so the same file is stored once and an ID always means the same bytes. Segment objects list their assets under `assets`.

## The asset object

```json
{
  "id": "sha256:ab12f09c...",
  "object": "asset",
  "kind": "scene",
  "codec": "gs-codec@3.1",
  "bytes": 48210331,
  "url": "https://files.rayform.world/assets/9f3c...?sig=...",
  "url_expires_at": "2026-10-15T10:22:00Z"
}
```

| `kind` | Contents |
| --- | --- |
| `scene` | Gaussian splats of the static scene, losslessly encoded |
| `object` | Splats of one moving object |
| `collision` | Collision mesh, GLB |
| `visual_mesh` | Textured mesh, GLB |

Scene and object assets use Rayform's lossless splat codec. Decode them with the SDK, which picks the decoder from `codec`:

```python
splats = client.assets.load("sha256:ab12f09c...")    # dict of NumPy arrays
print(splats["means"].shape, splats["scales"].shape, splats["sh"].shape)
```

```text
(1843201, 3) (1843201, 3) (1843201, 16, 3)
```

## Retrieve an asset

```endpoint
GET /v1/assets/{id}
```

Returns the asset with a signed download URL valid for 15 minutes. Request the asset again for a fresh URL.

```bash
curl https://api.rayform.world/v1/assets/sha256:ab12f09c... \
  -H "Authorization: Bearer $RAYFORM_API_KEY"
```

Because IDs are content hashes, downloads can be cached forever and verified locally:

```bash
curl -s "$ASSET_URL" -o scene.rfs && rayform verify scene.rfs --expect sha256:ab12f09c...
```
