Skip to main content

Datasets API

Prefix: /api/v1/datasets · UI: Dataset Management

Datasets

MethodPathDescription
POST``Create a dataset record (201)
GET``List datasets (paginated)
GET/{id}Get dataset details
PATCH/{id}Update dataset metadata / filter settings
DELETE/{id}Delete dataset — cascades to its tokenizations (204)
POST/downloadStart a HuggingFace download (202); body includes repo_id, optional split/config
DELETE/{id}/cancelCancel an in-progress download. During download: removes partial files; during processing: preserves raw files for retry
GET/{id}/task-statusStatus of the dataset's current background task
GET/{id}/samplesPaginated raw samples (bytes fields sanitized to strings)

Tokenizations

A dataset has many tokenizations — unique per (dataset, model, max_length).

MethodPathDescription
POST/{id}/tokenizeStart a tokenization job (202); body: model_id, max_length, filter options
POST/tokenize-previewPreview tokenization of sample text without running a job
GET/{id}/tokenizationsList the dataset's tokenizations
GET/{id}/tokenizations/{model_id}Get the tokenization for a specific model
POST/{id}/tokenizations/{tok_id}/cancelCancel a running tokenization
DELETE/{id}/tokenizations/{tok_id}Delete one tokenization (204)
DELETE/{id}/tokenizationClear tokenization state (legacy single-tokenization path)

Progress channels: datasets/{id}/progress (events dataset:progress|completed|error) and datasets/{id}/tokenization/{tok_id} (events tokenization:progress|status) — see the WebSocket reference.