# API reference: datasets

Dataset-kind repo extras: episode index, frames index, per-episode playback payload, dataset meta, and the datasets listed from the Hugging Face Hub

## GET /v1/datasets/{owner}/{repo}/episodes

`listDatasetEpisodes` · scope `none` · List dataset episodes

Returns the episode index of a dataset-kind repo, parsed from repo files (LeRobotDataset layout). Returns a 409 problem if the repo is not a dataset.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.
- `limit` (query): Page size.
- `cursor` (query): Opaque cursor from the previous page's `next_cursor`.

Responses:

- `200`: Page of episodes.
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

## GET /v1/datasets/{owner}/{repo}/episodes/{episode_index}/frames-index

`getEpisodeFramesIndex` · scope `none` · Frames index for one episode

Maps an episode to the repo files that store its frames: parquet data slices and per-camera videos. Clients can then range-read them instead of downloading the whole dataset.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.
- `episode_index` (path, required): Zero-based episode index.

Responses:

- `200`: The frames index.
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

## GET /v1/datasets/{owner}/{repo}/episodes/{episode_index}/series

`getEpisodeSeries` · scope `none` · Playable payload for one episode

Returns everything a viewer needs to play one episode in a single round trip:

- presigned per-camera video URLs
- the downsampled `observation.state` / `action` channels as `{t, name, value}` points
- fps and the episode's task strings

`getEpisodeFramesIndex` says *where* the frames live. This operation says *what they are*. The server range-reads the parquet columns it needs and never downloads the whole file. It decimates each channel to at most `max_points` samples with a min/max algorithm that preserves spikes. Returns a 409 problem if the repo is not a dataset, or if its files are not a readable LeRobotDataset.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.
- `episode_index` (path, required): Zero-based episode index.
- `max_points` (query): Maximum samples returned **per channel**. The series is decimated to fit (min/max per bucket, so spikes survive); a shorter episode is returned whole.

Responses:

- `200`: The episode payload.
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

## GET /v1/datasets/{owner}/{repo}/episodes/{episode_index}/rows

`getEpisodeRows` · scope `none` · One page of an episode's rows

Returns one page of an episode's rows, as a table. The server reads the episode's parquet file by byte range. It fetches only the footer and the row groups that hold the page.

A vector column such as `observation.state` comes back as one column per value. Each is labelled with the dataset's own joint names where it declares them. Image and video features are listed in `features` and not returned. So is a feature that declares more than 1,024 values. A page holds at most 2,048 columns.

One request reads at most 64 MiB from storage. A page that would read more is a 409 problem. A smaller `limit` or fewer `columns` fits. The same 409 comes when the repo is not a readable LeRobotDataset.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.
- `episode_index` (path, required): Zero-based episode index.
- `offset` (query): The first row of the page, counted from the start of the episode.
- `limit` (query): Rows on the page.
- `columns` (query): Feature keys to return, comma separated, in the order wanted. Every feature that fits on one page when absent. At most 64 keys, and a repeated key counts once. An unknown key is `422`.

Responses:

- `200`: The page of rows.
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).
- `422`: Request failed validation.
- `503`: A service this endpoint needs is not configured in this deployment. The API boots with zero secrets. An endpoint that needs one says so instead of returning a stack trace.

## PUT /v1/datasets/{owner}/{repo}/meta

`putDatasetMeta` · scope `key:write` · Set dataset meta

Replaces the dataset meta block on a dataset-kind repo in full. Uploaders and workers write it. The hub then reads the format version, the task strings, the camera count and the widths of `observation.state` and `action` from the repo's own files. It stores them with the meta. A dataset it cannot read still gets its meta, with those facts left empty. Every upload path ends here, so this call also queues a dataset check (`createDatasetCheck`, trigger `upload`) after it answers. `recording.policy_repo` and `recorded_policy` name the same policy. Give either one, or both naming the same repo (`422` otherwise). Returns a 409 problem if the repo kind is not `dataset`.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

Request body: `application/json`, required.

Responses:

- `200`: Stored dataset meta.
- `401`: Missing or invalid credentials.
- `403`: Authenticated but not allowed (visibility, membership or scope).
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).
- `422`: Request failed validation.

## GET /v1/datasets/{owner}/{repo}/exclusions

`listDatasetExclusions` · scope `none` · List the episodes kept out of training

Every episode of the dataset someone proposed to keep out of training, with who proposed it, when and why, and what a person decided. Training leaves out the episodes whose status is `excluded`, and nothing else. Visible to anyone who can read the dataset repo. Any other caller gets `404`; another kind of repo is `409`.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

Responses:

- `200`: The dataset's exclusion list.
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).

## POST /v1/datasets/{owner}/{repo}/exclusions

`proposeDatasetExclusions` · scope `key:write` · Propose episodes to keep out of training

Proposes keeping some episodes out of training, with one reason for all of them. Nothing changes for training until a person confirms with `decideDatasetExclusions`: a proposal is only a flag. An agent with a `write` key may propose, so it can act on a dataset check. An episode already excluded stays excluded. Proposing an episode again replaces its reason and its proposer. The caller must be able to write the dataset repo. An invisible repo is `404`, a visible one you cannot write is `403`, and another kind of repo is `409`. An episode the dataset does not have is `422`. Audited as `dataset.exclusion_propose`.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

Request body: `application/json`, required.

Responses:

- `200`: The dataset's exclusion list after the proposal.
- `401`: Missing or invalid credentials.
- `403`: Authenticated but not allowed (visibility, membership or scope).
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).
- `422`: Request failed validation.

## POST /v1/datasets/{owner}/{repo}/exclusions/decide

`decideDatasetExclusions` · scope `session` · Confirm, reject or undo keeping episodes out of training

A person's decision on episodes of a dataset they can write. `exclude` keeps the episodes out of every training run created from now on. It confirms a proposal, or excludes an episode no one proposed when a `reason` is given. `reject` turns a proposal down. `restore` puts an excluded episode back. Only a signed-in person decides: no key of any scope, so no agent, removes data from training. A decision that does not apply to an episode's status is `409` and changes nothing. Audited as `dataset.exclusion_decide`.

Parameters:

- `owner` (path, required): Repo owner handle (username or org slug).
- `repo` (path, required): Repo slug. A renamed repo's former slug also finds it, and the answer names its current address.

Request body: `application/json`, required.

Responses:

- `200`: The dataset's exclusion list after the decision.
- `401`: Missing or invalid credentials.
- `403`: Authenticated but not allowed (visibility, membership or scope).
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).
- `422`: Request failed validation.

## POST /v1/dataset-checks

`createDatasetCheck` · scope `key:write` · Queue a check of a dataset repo's files

Queues a job that opens the dataset's parquet and video files. It checks the LeRobot layout, dropped frames, joint limits and time sync. It also checks episode durations, action limits and the task text. The results land in `DatasetMeta.checks`. The check only flags episodes. Keeping them out of training is a person's decision (`decideDatasetExclusions`). The hub queues one by itself when the meta is set (an upload). It queues another when a dataset is made public with files it has not checked.

The repo must be a dataset repo the caller can **write**. An invisible one is `404`, a visible one you cannot write is `403`, and the wrong kind is `409`. While a check of the repo is queued or running, that check is returned (`200`) and no second one is queued. The job reads the files by range, under the hub's per-request read budget. Episodes past the budget are not checked, and each check says how many were. A check is unpriced: it runs on the hub's own workers.

Request body: `application/json`, required.

Responses:

- `200`: The check of this repo already queued or running.
- `201`: The check, queued.
- `401`: Missing or invalid credentials.
- `403`: Authenticated but not allowed (visibility, membership or scope).
- `404`: Resource not found (or hidden from the caller).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).
- `422`: Request failed validation.

## GET /v1/dataset-checks/{check_id}

`getDatasetCheck` · scope `none` · Get a dataset check

Returns the check's status. Once the job finished, it also returns the checks with their evidence, the episodes they flagged and what the job read. Visible to anyone who can read the dataset repo. Any other caller gets `404`.

Parameters:

- `check_id` (path, required): Dataset check id (`dchk_...`).

Responses:

- `200`: The check.
- `404`: Resource not found (or hidden from the caller).

## GET /v1/external-datasets

`listExternalDatasets` · scope `none` · List the datasets listed from Hugging Face

LeRobot datasets from the Hugging Face Hub, listed beside the hub's own. The hub stores their public metadata only. It hosts none of their files and has read none of them. Each item links to its page on Hugging Face. `downloads` and `likes` are Hugging Face's own counts. They are kept apart from the hub's own counts and sorts. A daily sync refreshes the list, and `synced_at` says when it last succeeded. A failed sync keeps the last list. A training run may name one of them as `hf://{id}` in its recipe. The trainer downloads it when the run starts.

Parameters:

- `q` (query): Search text. It matches the id (`author/name`) and the tags, case-insensitive.
- `sort` (query): Order by Hugging Face's downloads in the last 30 days, its likes, or its last update. Always descending.
- `limit` (query): Page size.
- `cursor` (query): Opaque cursor from the previous page's `next_cursor`.

Responses:

- `200`: Page of listed datasets.
- `422`: Request failed validation.
