Python
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
response = client.dataframer.seed_datasets.create_with_files(
dataset_type="SINGLE_FILE",
files=[b"Example data", b"Example data"],
name="name",
)
print(response.id)curl https://df-api.dataframer.ai/api/dataframer/seed-datasets/create/ \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-F dataset_type=SINGLE_FILE \
-F files='["Example data","Example data"]' \
-F name=name{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer Reviews 2025",
"description": "Product reviews with files",
"dataset_type": "SINGLE_FILE",
"file_count": 1,
"folder_count": 0,
"created_at": "2025-01-15T10:30:00Z",
"created_by_email": "sarah.chen@acme.com"
}{
"error": "<string>",
"code": "not_supported_hybrid"
}Seed Datasets
Create seed dataset
Create a new seed dataset with uploaded files
POST
/
api
/
dataframer
/
seed-datasets
/
create
/
Python
import os
from dataframer import Dataframer
client = Dataframer(
api_key=os.environ.get("DATAFRAMER_API_KEY"), # This is the default and can be omitted
)
response = client.dataframer.seed_datasets.create_with_files(
dataset_type="SINGLE_FILE",
files=[b"Example data", b"Example data"],
name="name",
)
print(response.id)curl https://df-api.dataframer.ai/api/dataframer/seed-datasets/create/ \
-H 'Content-Type: multipart/form-data' \
-H "Authorization: Bearer $DATAFRAMER_API_KEY" \
-F dataset_type=SINGLE_FILE \
-F files='["Example data","Example data"]' \
-F name=name{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Customer Reviews 2025",
"description": "Product reviews with files",
"dataset_type": "SINGLE_FILE",
"file_count": 1,
"folder_count": 0,
"created_at": "2025-01-15T10:30:00Z",
"created_by_email": "sarah.chen@acme.com"
}{
"error": "<string>",
"code": "not_supported_hybrid"
}You can upload one of the following types of datasets:
- SINGLE_FILE: exactly one file containing all the samples
- MULTI_FILE: multiple files, where each file is a separate sample
- MULTI_FOLDER: multiple folders, where each folder is a separate sample and only contains files with no nested folders
File constraints by dataset type
| Type | Allowed formats | Size limit | Count limit |
|---|---|---|---|
| SINGLE_FILE | CSV, JSON, JSONL | 50MB | 1 file, min 2 rows |
| MULTI_FILE | TXT, MD, JSON, CSV, JSONL, PDF | 1MB/file, 50MB total | 2-1000 files |
| MULTI_FOLDER | TXT, MD, JSON, CSV, JSONL, PDF | 1MB/file, 50MB total | 2-1000 files, 20/folder, min 2 folders |
Authorizations
Body
multipart/form-data
Folder names for MULTI_FOLDER datasets. This is a parallel array with files: folder_names[i] specifies which folder files[i] belongs to (e.g., if files=['a.txt', 'b.txt'] and folder_names=['doc1', 'doc2'], then a.txt goes in doc1, b.txt goes in doc2). Minimum 2 unique folder names required. For MULTI_FOLDER, file order within each folder is preserved as uploaded — earlier files should be the ones that later files may depend on.
Minimum array length:
2Response
Seed dataset created successfully

