# API reference: repos

Repos (kind = dataset | model | robot): create, read, update, delete, search

## GET /v1/repos

`listRepos` · scope `none` · List / search repos

Lists repos visible to the caller (public + own/org private). `q` matches slug and description (case-insensitive substring, v0); `tag` may repeat and every given tag must match.

Parameters:

- `q` (query): Search text (matches slug and description).
- `kind` (query)
- `owner` (query): Filter by owner handle (username or org slug).
- `tag` (query): Filter by tag; repeatable (AND semantics).
- `visibility` (query)
- `sort` (query): Sort key, always descending. `updated` and `created` are times. `downloads` is `downloads_30d` and `likes` is `likes`. `trending` is the last 7 days: downloads plus seven times the likes given. Ties go to the most recently updated repo. Under `trending` only, the repos marked `featured` come first, in the order the hub set. `evidence` is the policy list's order: Lucen-certified repos first, then by `deployments.robots`, then by the pass rate of the newest published sim test, then `updated`. A repo with no sim test sorts after one with any. A count a publisher wrote in a README is not evidence and does not sort.
- `robot` (query): `owner/slug` of a robot repo. With `kind=model`, or no `kind`: only the model repos whose `model_meta.robot` names it (the policies built for that robot). With `kind=dataset`: only the dataset repos recorded on it. A dataset names a robot when its `dataset_meta.robot_type` is the robot's slug. The dataset owner's own robot of that slug wins; with none of their own, every robot of that slug is named. A dataset also names the robot its `recorded_policy` was built for. With `kind=robot` the page is empty. The filter is part of the query. It is not applied over a page afterwards. A robot repo the caller cannot see yields an empty page, exactly like an unknown `owner`. So this filter does not reveal whether a robot repo exists.
- `maker_hardware` (query): `true` returns only the robot repos whose card declares `hardware.maker_hardware` (the maker's own hardware, with the runtime built in). `false` returns the repos that do not. Part of the query, like every filter here.
- `dataset` (query): `owner/slug` of a dataset repo. Only model repos whose `model_meta.datasets` names it (the policies trained on that dataset), as part of the query. A dataset repo the caller cannot see yields an empty page, like an unknown `owner`.
- `interface_fingerprint` (query): Returns only robot repos whose card's CURRENT `interface_fingerprint` is this. Pass the `embodiment_fingerprint` from a stamped policy's manifest to find the robot the policy was built for. It is part of the query, like every filter here.
- `certified` (query): `true` returns only the model repos Lucen's signed certification list names (an entry's `source.hub_repo`) that still hold the certified bytes. A copy of a certified file in another repo does not qualify, and neither does a revoked file. It is part of the query. When no valid list is in force the page is empty.
- `method` (query): Only model repos whose `model_meta.method` is this id (a method of `listMethods`, or a LeRobot `policy.type` an upload declared). Part of the query. An id nothing carries is an empty page.
- `task` (query): Only model repos whose `model_meta.task` is this. Part of the query.
- `class` (query): Only model repos whose `model_meta.control_class` is this. Part of the query.
- `sim` (query): `pass`: only model repos whose newest published sim test, run by the hub, passed every test. `fail`: only those whose newest one did not. A count a publisher wrote in a README (`sim_tests.source: readme`) is not a sim test here. Part of the query.
- `deployed` (query): `true`: only model repos with at least one finished deployment (`deployments.robots` ≥ 1). Part of the query.
- `trainable` (query): A method id of `listMethods` that trains from a dataset (its `dataset_needs` is set). Only the dataset repos whose stored facts meet those needs, the rule `DatasetMeta.trainable` reports. Part of the query. Any other id is `422`.
- `facets` (query): `tags` adds `facets` to the page: how many of the caller's **visible** repos carry each tag. The counts are made in the query. Visibility is a `WHERE` clause there, and no post-filter runs. So a private repo never adds to a count a stranger sees. `kind` and `owner` scope the counted set. `q`, `tag`, `visibility` and `robot` do NOT, so a filter rail's counts hold still while you click. This is the same rule as `listRuns?facets=true`. Omit it and nothing is counted. `policies` counts the tags and, for model repos, the split by `method`, `task`, `class` and `robot`, plus the `certified`, `sim_pass` and `deployed` evidence counts. The same rule applies, except that `facet_scope` names which of `robot` and `method` also scope the counted set.
- `facet_scope` (query): With `facets=policies`: the filters among `robot` and `method` that scope the counted set as well as the page. A robot's own policy list passes `facet_scope=robot`, so its counts are the robot's; `/policies` passes none, so its counts hold still while a robot or a method is chosen. Repeatable.
- `limit` (query): Page size.
- `cursor` (query): Opaque cursor from the previous page's `next_cursor`.

Responses:

- `200`: Page of repos.
- `422`: Request failed validation.

## POST /v1/repos

`createRepo` · scope `key:write` · Create a repo

Creates a dataset, model or robot repo. `owner` defaults to the caller's username; pass an org slug to create under an org the caller belongs to. Visibility defaults to `private`. A renamed repo's former address still leads to it, so a new repo cannot take it (`409`).

Request body: `application/json`, required.

Responses:

- `201`: Repo created.
- `401`: Missing or invalid credentials.
- `403`: Authenticated but not allowed (visibility, membership or scope).
- `409`: State conflict (duplicate handle/slug, wrong repo kind, terminal job, ...).
- `422`: Request failed validation.

## GET /v1/repos/{owner}/{repo}

`getRepo` · scope `none` · Get a repo

Full repo detail including the kind-specific meta block (`dataset_meta` | `model_meta` | `robot_card`) when set.

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 repo.
- `404`: Resource not found (or hidden from the caller).

## PATCH /v1/repos/{owner}/{repo}

`updateRepo` · scope `key:write` · Update a repo

Updates description, tags and/or visibility. Slug rename is not supported in v0. Requires write access to the repo. Robots fetch certified files from the model repo Lucen's list names as their source. That repo cannot be made private until Lucen revokes the file (`409`). While the hub cannot read Lucen's certification list, making a model repo private waits (`503`). A copy of a certified file elsewhere may be hidden. The factory repo can never be made private (`409`). Robots install every skill file from it by name. Making a dataset repo public queues a dataset check (trigger `publish`) when the hub has not checked its current files.

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`: Updated repo.
- `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.
- `503`: The hub cannot read Lucen's certification list right now, or the newest serial it accepted. Nothing was changed. Try again in a minute.

## DELETE /v1/repos/{owner}/{repo}

`deleteRepo` · scope `key:write` · Delete a repo

Deletes the repo and unlinks its files. Content-addressed blobs are garbage-collected later. Requires write access. A repo referenced by training-run or rollout history cannot be deleted (409), because cost and provenance rows must survive. For that case, the v1+ escape hatch is archive/hide: retire a repo from listings without destroying history. A repo that holds a file Lucen certified stays until Lucen revokes the file (409). While the hub cannot read Lucen's certification list, a repo with files is not deleted (503).

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:

- `204`: Repo deleted.
- `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, ...).
- `503`: The hub cannot read Lucen's certification list right now, or the newest serial it accepted. Nothing was changed. Try again in a minute.

## PUT /v1/repos/{owner}/{repo}/like

`setRepoLike` · scope `session` · Like or unlike a repo

Sets whether the signed-in person likes this repo. A person likes a repo once, so liking it again changes nothing. The answer is the new count and the person's own state. A repo the caller cannot read is `404`. Only a signed-in person may like. No API key can, so an agent cannot add likes. A change writes a `repo.like` or `repo.unlike` audit row.

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 repo's likes after the change.
- `401`: Missing or invalid credentials.
- `403`: Authenticated but not allowed (visibility, membership or scope).
- `404`: Resource not found (or hidden from the caller).
- `422`: Request failed validation.

## POST /v1/repos/{owner}/{repo}/fork

`forkRepo` · scope `key:write` · Copy a repo into your account

Makes a new repo with the same kind, description, tags, files and card or meta as one the caller can read. The copy's files point at the same stored content. Nothing is uploaded again, and the copy takes no storage of its own. The copy records where it came from in `forked_from`. It goes under the caller's handle unless `owner` names an organization they belong to. It keeps the source's name unless `slug` gives another. It is private unless `visibility` says otherwise. When a repo with that name already exists and was copied from the same source, it is returned with `200`. A second click is therefore harmless. Any other repo with that name is a `409`, and so is a renamed repo's former address. A copied policy names the robot `robot` gives, else the source's robot. A second request with `robot` points the earlier copy at that robot.

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`.

Responses:

- `200`: The copy made earlier from the same source.
- `201`: The copy.
- `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/repos/{owner}/{repo}/mirrors

`pushRepoMirror` · scope `session` · Push a policy or a dataset to Hugging Face

Copies a policy or a dataset to a repo on the Hugging Face Hub, with the Hugging Face connection of the workspace that owns it. A dataset goes in its LeRobot layout with a dataset card. A policy goes as its policy folder or its ONNX file, its contract and a model card. The card links back to this repo. Checkpoints stay on the hub.

The push runs in the background. The answer is `202` with the mirror `pushing`. `getRepo` then shows it `pushed` with the Hugging Face commit, or `failed` with the reason. `hf_repo` defaults to the connected account's name and this repo's slug. It is created when it does not exist, private unless `private` is false.

The Hub repo's namespace must be the connection's account or one of its organizations (`422`). Some Hub repos already exist and were not created by the hub. Only the person who made the connection, or an owner of the workspace, may push into one of those. The connection's account must also own that namespace. Anyone else may push into repos the hub created. Otherwise the push fails with the reason.

Only a signed-in person who may write the repo can push it. A robot repo is `422`. A workspace with no Hugging Face connection 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.

Request body: `application/json`.

Responses:

- `202`: The push started.
- `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/repos/{owner}/{repo}/imports

`importRepoFromHuggingface` · scope `session` · Copy a Hugging Face repo into this policy or dataset

The hub copies the files of a Hugging Face repo into this one, with the Hugging Face connection of the workspace that owns it. A private repo imports too. The token stays on the hub. No job or runner ever gets it.

The copy runs in the background. The answer is `202` with an entry of `mirrors` whose `direction` is `import` and whose state is `importing`. `getRepo` then shows it `imported` with the Hugging Face commit, or `failed` with the reason. `prefix` puts the files in a folder, as a policy's import does (`policy`). A dataset imported to its root gets its numbers from `meta/info.json`, and the hub checks its files.

**Who may import a private repo.** The connection reaches the connector's private repos. Only the person who made the connection, or an owner of the workspace that holds it, may import a private repo with it. Anyone else who may write the repo imports public repos only. The hub asks Hugging Face with no token whether the repo is public. It then downloads it with no token. A private repo is `403` for them. The job checks this again when it runs.

At most 5,000 files and 2 GiB per import. Each file is read up to the size Hugging Face listed for it, and counts toward the account's storage quota as an upload does. Only a signed-in person who may write the repo can import into it. A robot repo is `422`. A workspace with no Hugging Face connection is `409`, and so is a second import while one runs.

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:

- `202`: The copy started.
- `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.
