Create a Dataset

Creates a dataset and labels, if they're specified.

🚧

Warning

For better performance, we recommend that you create a dataset by uploading a .zip file. See Create a Dataset From a Zip File Asynchronously.

Request Parameters

Name

Type

Description

Available Version

labels

string

Comma-separated list of labels. Maximum number of labels per dataset is 250.

1.0

language

string

Dataset language. Optional. Default is N/A. Reserved for future use.

2.0

name

string

Name of the dataset. Maximum length is 180 characters.

1.0

type

string

Type of dataset data. Valid values are:

  • image—Classification dataset.
  • image-multi-label—Multi-label classification dataset. Available in Einstein Vision API version 2.0 and later.

2.0

Keep the following points in mind when creating datasets.

  • Only type parameter values of image and image-multi-label are supported. This call can't be used to create a dataset with a type of image-detection.

  • Label names can’t contain a comma.

  • You can’t delete a label. To change the labels in a dataset, recreate the dataset with the correct labels.

  • Label names must be unique within the dataset.

  • A dataset must have a minimum of two labels to create a model.

  • To add examples to a dataset created using this API, use the Create an Example call.

Response Body

Name

Type

Description

Available Version

available

boolean

Specifies whether the dataset is ready to be trained.

1.0

createdAt

date

Date and time that the dataset was created.

1.0

id

long

Dataset ID.

1.0

labelSummary

object

Contains the labels array that contains all the labels for the dataset.

1.0

language

string

Dataset language. Default is N/A.

2.0

name

string

Name of the dataset.

1.0

numOfDuplicates

int

When you create a dataset using this call, this value will always be 0.

2.0

object

string

Object returned; in this case, dataset.

1.0

statusMsg

string

Status of the dataset creation and data upload. Valid values are:

  • FAILED: <message>—Data upload has failed.
  • SUCCEEDED—Data upload is complete.
  • UPLOADING—Data upload is in progress.

1.0

totalExamples

int

Total number of examples in the dataset.

1.0

totalLabels

int

Total number of labels in the dataset.

1.0

type

string

Type of dataset data. Valid values are:

  • image—Classification dataset.
  • image-multi-label—Multi-label classification dataset. Available in Einstein Vision API version 2.0 and later.

1.0

updatedAt

date

Date and time that the dataset was last updated.

1.0

Labels Response Body

Name

Type

Description

Available Version

datasetId

long

ID of the dataset that the label belongs to.

1.0

id

long

ID of the label.

1.0

name

string

Name of the label.

1.0

numExamples

int

Number of examples that have the label.

1.0

Language