Rayform

Getting started

Quickstart

Upload one recording, wait for it to process, and load the result in Python.

Rayform is in private preview. APIs, formats and the SDK described here may change before general availability.

This guide takes one recording from your machine to a PyTorch batch. You need Python 3.10 or later and a Rayform API key from the private preview.

1. Install the SDK

Shell
pip install rayform

The core package depends only on NumPy and PyArrow. Add extras when you need them:

Shell
pip install "rayform[torch]"        # PyTorch datasets
pip install "rayform[lerobot]"      # LeRobot export helpers
pip install "rayform[rerun]"        # open segments in the Rerun viewer

2. Authenticate

Create a key in the console and export it. The SDK and the CLI both read RAYFORM_API_KEY.

Shell
export RAYFORM_API_KEY="rf_live_..."
rayform whoami
Text
org_7Hq2 · Acme Robotics · key rf_live_...9c2f (read, write)

3. Upload a recording

Any MCAP file or ROS 2 bag with at least one camera works. Include joint states if a robot is in the loop. site groups recordings made in the same place, so repeat visits are registered into one coordinate frame.

Python
import rayform

client = rayform.Client()
session = client.sessions.upload(
    "recordings/kitchen_2026-10-14.mcap",
    site="lab-2",
    wait=True,          # block until processing finishes
)
print(session.id, session.status)
Text
ses_01JA8K2M9Q processed

Uploads are resumable: if the connection drops, run the same call again and it continues from the last confirmed part.

4. Look at what came back

Python
for seg in session.segments():
    print(seg.id, seg.duration_s, [e.type for e in seg.events()])
Text
seg_4f0a 7.45 ['grasp', 'place']
seg_4f0b 5.10 ['open_drawer']
seg_4f0c 9.80 ['grasp', 'handover', 'place']

Open one in the Rerun viewer to check the reconstruction against the raw camera frames:

Python
rayform.rerun.show(session.segments()[0])

5. Freeze a slice and train

Python
from torch.utils.data import DataLoader

slice_ = client.slices.create(segments=session.segments(), name="quickstart")

dataset = rayform.torch.EpisodeDataset(
    slice_,
    obs=["cam0/rgb", "cam0/depth", "joints/position"],
    action="joints/position_delta",
    fps=15,
)
batch = next(iter(DataLoader(dataset, batch_size=8)))
print({k: tuple(v.shape) for k, v in batch.items()})
Text
{'cam0/rgb': (8, 3, 480, 640), 'cam0/depth': (8, 1, 480, 640), 'joints/position': (8, 7), 'action': (8, 7)}

Next steps

Last updated October 18, 2026