Create an Example

Adds an example with the specified label to a dataset.

Request Parameters

Name

Type

Description

Available Version

data

string

Location of the local image file to upload.

1.0

labelId

long

ID of the label to add to the example.

1.0

name

string

Name of the example. Maximum length is 180 characters.

1.0

Keep the following points in mind when creating examples.

  • This call supports only datasets that have a type of image.

  • After you add an example, you can return information about it, along with a URL to access the image. The URL expires in 30 minutes.

  • Add an example to only one label.

  • The maximum image file size is 1 MB.

  • The maximum total dataset size is 2 GB.

  • We recommend a minimum of 100 examples per label.

  • The supported image file types are PNG, JPG, and JPEG.

Response Body

Name

Type

Description

Available Version

createdAt

date

Date and time that the example was created.

1.0

id

long

ID of the example.

1.0

label

object

Contains information about the label with which the example is associated.

1.0

location

string

URL of the image in the dataset. This is a temporary URL that expires in 30 minutes. This URL can be used to display images that were uploaded to a dataset in a UI.

1.0

name

string

Name of the example.

1.0

object

string

Object returned; in this case, example.

1.0

Label Response Body

Name

Type

Description

Available Version

datasetId

long

ID of the dataset that the example’s label belongs to.

1.0

id

long

ID of the example’s label.

1.0

name

string

Name of the example’s label.

1.0

numExamples

int

Number of examples that have the label.

1.0

Language