Create a dataset from file upload, HuggingFace, or Kaggle
client.datasets.create(DatasetCreateParams { source } body, RequestOptionsoptions?): DatasetCreateResponse { dataset_id, status, upload_instructions }
POST/api/v1/datasets
Unified ingest endpoint. Discriminated by source.type: "file" returns upload instructions for a presigned S3 PUT, "huggingface" and "kaggle" start an async import.
Create a dataset from file upload, HuggingFace, or Kaggle
import Adaption from 'adaption';
const client = new Adaption({
apiKey: process.env['ADAPTION_API_KEY'], // This is the default and can be omitted
});
const dataset = await client.datasets.create({
source: {
file_format: 'csv',
name: 'my-training-data',
type: 'file',
},
});
console.log(dataset.dataset_id);{
"dataset_id": "dataset_id",
"status": "status",
"upload_instructions": {
"method": "PUT",
"s3_key": "s3_key",
"url": "https://s3.amazonaws.com/bucket/key?X-Amz-Signature=..."
}
}Returns Examples
{
"dataset_id": "dataset_id",
"status": "status",
"upload_instructions": {
"method": "PUT",
"s3_key": "s3_key",
"url": "https://s3.amazonaws.com/bucket/key?X-Amz-Signature=..."
}
}