# Versioning

> How segments, slices and the API are versioned, so a result you publish can be reproduced.

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

## Segment versions

A segment's `version` is a hash of everything that produced it: the original recording, the calibration, the site map, the pipeline version, and the resulting assets. If any input changes, the version changes. Old versions are kept while any slice refers to them.

## Slice hashes

A slice's `hash` covers its sorted segment versions and their asset IDs. Freezing the same data twice returns the same slice, and a slice never changes after it is created.

```python
a = client.slices.create(query={"site": "lab-2", "event": "grasp"})
b = client.slices.create(segments=list(a.segments()))
assert a.id == b.id
```

## Assets

Asset IDs are SHA-256 hashes of decoded content. The SDK checks every download and every decode against its ID and raises `IntegrityError` on any mismatch.

## What to record with an experiment

| Record | Why |
| --- | --- |
| Slice ID | Reproduces the exact training data |
| Export options (`fps`, `frame`, `action`, …) | Reproduces the exact samples |
| SDK version | Reproduces loading and decoding |

## API versions

The API is versioned in the path (`/v1`). Within a version, changes are additive: new fields, new endpoints, new optional parameters. Breaking changes ship as a new version, and the previous version stays available for at least twelve months after general availability.

> During the private preview, `/v1` may still change. Preview teams are told about every change before it ships.
