Rayform

Python SDK

SDK reference

Classes and methods in the rayform Python package.

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

Client

Python
rayform.Client(api_key=None, base_url=None, cache_dir=None, cache_max_gb=200, offline=False, timeout_s=60)

The entry point. Resource namespaces hang off it: client.sessions, client.segments, client.slices, client.exports, client.assets. List methods return lazy iterators that fetch pages as you go.

Sessions

client.sessions.upload

Python
client.sessions.upload(path, *, site, device=None, notes=None, part_size=64 * 2**20, wait=False, timeout=None) -> Session

Uploads a file, resuming if an earlier attempt was interrupted, and completes the session. With wait=True it blocks until processing finishes and raises ProcessingError if the session fails.

client.sessions.get, list, delete

Python
client.sessions.get(id) -> Session
client.sessions.list(site=None, status=None) -> Iterator[Session]
client.sessions.delete(id) -> None

Session

MemberTypeDescription
id, site, statusstrAs in the session object
issueslist[Issue]Problems found while processing
segments()list[Segment]Segments produced from this session
wait(timeout=None)SessionBlock until processed or failed
refresh()SessionRe-read from the API

Segments

Python
client.segments.search(
    *, site=None, event=None, object=None, text=None, near=None, context=None,
    recorded=None, quality_min=None, has_channels=None, session=None,
) -> SegmentResults

Arguments accept a value or a list. SegmentResults is iterable, sliceable, and has total.

client.segments.get

Python
client.segments.get(id, version=None) -> Segment

Segment

MemberReturnsDescription
id, version, session, sitestrIdentifiers
t0_ns, t1_ns, duration_sint, int, floatTime window
events()pyarrow.TableInteraction events, time-ordered
entities()list[Entity]People, objects and robots
channel(name, t0_ns=None, t1_ns=None, frame="rayform")pyarrow.TableOne channel's samples
frames(camera, every=1)Iterator[Frame]Decoded images with timestamps
scene_at(t_ns)SceneThe scene with moving objects posed at t_ns
quality, contextdictScores and labels

Scenes

Scene

MemberReturnsDescription
splatsdict[str, numpy.ndarray]means, scales, quats (wxyz), opacities, sh
collision_mesh()trimesh.TrimeshRequires trimesh
to_usd(path)NoneWrite OpenUSD for Isaac Sim (rayform[usd])
to_mjcf(dir)NoneWrite MJCF for MuJoCo (rayform[mujoco])

Slices

Python
client.slices.create(*, query=None, segments=None, exclude=None, name=None) -> Slice
client.slices.get(id) -> Slice
client.slices.list(name=None) -> Iterator[Slice]

Slice

MemberReturnsDescription
id, hash, namestrIdentifiers
segment_count, duration_sint, floatSize
segments()Iterator[Segment]Exact versions in the slice
pull(workers=8)NoneDownload everything into the cache

Exports

Python
client.exports.create(slice, *, format, options=None, destination=None) -> Export
client.exports.get(id) -> Export

Export

MemberReturnsDescription
status, progressstr, floatState and fraction done
wait(timeout=None)ExportBlock until finished; raises ExportError on failure
files()Iterator[ExportFile]Paths, sizes and signed URLs
download(dir)NoneDownload files kept in Rayform storage

Assets

Python
client.assets.get(id) -> Asset             # metadata and a signed URL
client.assets.load(id) -> dict | bytes     # decoded content, verified against the ID

PyTorch

rayform.torch.EpisodeDataset

Python
rayform.torch.EpisodeDataset(
    slice, *, obs, action=None, fps=None, horizon=1, frame="rayform",
    quat_order="wxyz", image_size=None, transform=None, seed=0,
)

A map-style torch.utils.data.Dataset. See Training with PyTorch for the sample layout. set_epoch(epoch) fixes the order for distributed training.

Visualisation

rayform.rerun.show

Python
rayform.rerun.show(segment, *, channels=None, with_scene=True, spawn=True)

Logs a segment's cameras, poses, events and scene to the Rerun viewer.

Last updated October 18, 2026