Skip to main content
Create the client with datasets() or use hosted().datasets. For a guided example, see datasets. Examples use a configured client from datasets(). Examples reuse the SDK setup. Run Python snippets inside the async function shown in the Python guide.

list

Read one catalog page, or iterate the whole catalog.
Returns: DatasetPage when awaited; a Dataset per iteration. See dataset fields.
TypeScript returns DatasetList; Python returns an awaitable, asynchronously iterable handle. for await / async for follows subsequent pages. Page fields are items, nextCursor, hasMore in TypeScript; items, next_cursor, has_more in Python.

get

Read all versions and one page of a selected version’s tasks.
Returns: Dataset, including versions, selected_version, tasks, and failed_tasks.

getActive / get_active

Resolve a bare dataset name to its active version.
Returns: ActiveDataset; version, active_version, and tasks are present.
Raises NoActiveVersionError when no version is active. Use get if you need to inspect a dataset before it has an active version.

getTaskBuild / get_task_build

Read one task’s settled build result.
Returns: TaskBuild: task_name, state, and failure.
state is READY or FAILED. Failure fields are code, step, message, and optional excerpt. Read failure.excerpt for the retained failing-step output when available; it can be omitted or null. A missing task or an unsettled build returns 404 task_not_found.

taskFiles / task_files

Get a client for one task’s retained package files.
Returns: TaskPackageFiles. Creating this client makes no request.
The file client exposes status, list, and read. See the filesystem reference for their parameters and response fields.

preflight

Check a local corpus’s metadata before uploading its task files.
Returns: DatasetPreflight. Inspect tasks_refused, each task’s reason, and the checks listed in deferred.
Reads task TOML files and an optional dataset manifest. It does not build images or run verifiers. SDK publish does not call preflight automatically.

publish

Submit a dataset version. Publishing an existing version label reimports it in place; use a new label when you need to keep the earlier version. Follow the returned import id with watchImport / watch_import.
Returns: DatasetImport after the source is accepted; image builds may still be running.
Git requires an HTTPS URL and a full 40-character commit SHA or tag. Branch names are refused with unpinned_git_ref. Optional git_path selects one relative repository directory. Point a local directory directly at the desired folder.An existing dataset keeps its organization when both the call and client omit org. Supplying a different organization is refused; publishing another version does not move the dataset.In TypeScript, callbacks belong to the second options argument. Python accepts them as keywords and calls them from the uploader thread: keep them short and thread-safe. Registration callbacks require a resumable local upload with explicit name and version; they do not fire for every publish.

getImport / get_import

Read a publish operation by its import id.
Returns: DatasetImport. See import fields.
id is the required string returned by publish. Import status is QUEUED, RUNNING, COMPLETED, or FAILED. receiving distinguishes an upload still arriving from an import ready to be picked up.

watchImport / watch_import

Wait for the import to finish and confirm the published version’s state.
Returns: DatasetImport. A failed import is returned with status: "FAILED" and failure; inspect it before using the version.
The watch retries HTTP 429 and 503 after a delay. A version that does not settle in time raises ImportSettleError with code settle_timeout; Python’s overall limit raises TimeoutError. Timing out stops the wait, not the import. A READY version can contain failed tasks: read the dataset’s failed_tasks.

listImports / list_imports

Find your previous publishes, newest first.
Returns: DatasetImportPage when awaited; a DatasetImport per iteration.

download

Download the original corpus package for a dataset you own.
Returns: With to: a saved file path string. Without options: TypeScript Buffer, Python bytes.
Buffered and disk downloads check the declared byte length and digest. A raw TypeScript stream leaves client-side verification to the caller. Only the owning account can download; platform-curated datasets are not downloadable. package_not_retained means an older version has no saved corpus package.

update

Change whether a moving upstream git ref is imported automatically.
Returns: Dataset summary fields. Call get for its task page and full version list.
Requires an owned dataset with a moving git ref. Otherwise the server returns dataset_not_owned or upstream_not_watchable.

activate

Choose the ready version used by bare-name references.
Returns: Dataset detail with the selected active version.
You must own the dataset. A version still building returns version_not_ready; FAILED and ARCHIVED versions return version_not_activatable. Publishing already activates the new ready version on owned datasets.

delete

Delete an owned dataset, including its versions, tasks, and archived solutions.
Returns: No value (void / None).
name is required. A dataset referenced by any job returns dataset_in_use; error.details.sample_job_ids names blocking jobs and job_count gives their count when known. A platform-curated dataset returns dataset_not_owned.

Dataset fields

The schemas below list TypeScript fields. Python uses the same field names as dataclass attributes, except page cursors are next_cursor and has_more. Optional TypeScript fields can be absent; Python normally represents missing optional values as None.
list returns summary fields. get adds the selected task page, version list, failed tasks, and timestamps. active_version is the current default; latest_version is the newest version even when it is not active. Python’s ActiveDataset timestamps may be None.DatasetVersionState is DRAFT, RECEIVING, IMPORTING, BUILDING, READY, FAILED, or ARCHIVED. task_count counts ready tasks; n_failed_tasks counts failed builds. Page<T> has items: T[], nextCursor: string | null, and hasMore: boolean.failed_tasks is a sample of at most 500 failed tasks, sorted by task name. It has no cursor and does not use the requested task-page limit. n_failed_tasks gives the full count; use getTaskBuild / get_task_build to inspect a particular task.
Fields
providers is keyed by e2b, daytona, and modal. A successful provider verdict can still declare a fallback in degrades_to. Notes are non-fatal. lint lists what the environment linter found in the task, errors first; it is advisory too. Python defaults missing gpus to 0 and notes and lint to empty lists.
Fields
manifest preserves dataset metadata. source.kind chooses the source variant; git URLs are returned without embedded credentials. A null source means no recorded provenance.
Fields
moved says whether the remote ref differs from the imported commit. acked_commit is the newest commit already imported into any local version. behind_by is reserved and currently null. Null or failed checks do not mean the source is up to date.
Fields

Preflight fields

checks names checks performed. deferred names checks that need the full corpus, with reads describing their input. task_key is the task identity used during preflight. Provider verdicts and task notes use the shapes above.harbor_support is the range of Harbor versions the importer reads. Each accepted task’s harbor_format names the oldest Harbor release that declares every field the task uses. The top-level harbor_format is the corpus’s newest, ranked by release order. newest_fields is empty when that release is at or below window_start. Servers that predate these fields omit them.
Fields

Import fields

failure is null unless a failure was recorded. task_count appears when known. Python represents missing task_count and timestamps as None, and defaults missing receiving to False. DatasetImportStatus is QUEUED, RUNNING, COMPLETED, or FAILED.
Fields
lint on an import and on dataset detail is the environment linter’s summary for the version: null before the importer has parsed the tasks and on versions imported before the linter existed. Counts stay exact when truncated is true; only per-task lists are cut. truncated means an error or warning was cut; infos_truncated means only infos were. Python maps these to the EnvLintSummary, EnvLintRuleSummary and EnvLintFinding dataclasses with the same field names.
Fields
done and total describe each phase’s units. images separates built, mirrored, and reused (banked) images. codebuild records copy-build usage. Python maps images to ImportImageCounts and codebuild to ImportCodeBuildMeter dataclasses with these same field names. Progress is recorded at phase boundaries and coarse intervals, not every second.
Fields
Last modified on November 9, 2026