v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
felix
datasets

Preview Dataset From Hub

Preview a dataset from HuggingFace Hub without saving it.

Fetches the dataset and returns a preview (first 50 rows, schema, metadata) for user review before confirming the import.

Requires a HuggingFace API token with read access.

post/felix/datasets/preview-from-hub

Request body

repo_idstring required

HuggingFace repo ID to pull from

revisionstring nullable

Specific revision/branch to pull

namestring nullable

Name for the local dataset (defaults to repo name)

hf_tokenstring required

HuggingFace API token

session_idstring nullable

Session ID for SSE log streaming

column_mappingobject nullable

Column mapping from source to standard names

dataset_typestring nullable

Dataset type (ner, classification, custom)

Response

Successful Response

preview_rowsobject[] required

Sample rows from the dataset (first 50 rows)

total_rowsinteger required

Total number of rows in the dataset

columnsstring[] required

List of column names

dataset_typestring required

Inferred dataset type (classification, ner, custom)

schema_object nullable

Inferred schema mapping column names to data types

metadataobject nullable

Dataset metadata from HuggingFace