API

The API is available at https://api.segments.ai/.

To authenticate, add an API key in the header of each request:

curl -H "Authorization: APIKey YOUR_API_KEY"

An API key can be created on your user account page.

Datasets

List datasets

GET /users/:owner/datasets

To get all datasets of the currently logged in users, you can use this shortcut:

GET /user/datasets

Note that this will only return datasets which are public, and datasets which are private but where the logged in user is a collaborator.

Response

Status: 200 OK
[
    {
        "name": "cats",
        "description": "A dataset of cat images.",
        "data_type": "IMAGE",
        "category": "other",
        "public": false,
        "owner": {
            "username": "bert",
            "email": "[email protected]",
            "created_at": "2020-05-11T14:00:53.763278Z"
        },
        "created_at": "2020-04-10T20:09:31Z",
        "collaborators_count": 0,
        "samples_count": 94        
    }
]

Get a dataset

Response

Create a dataset

Input

Name

Type

Description

name

string

Required. The name of the dataset.

category

string

Required. Category of the data, e.g. "other"

task_type

string

Required. The task type of the dataset. Can be one of:

  • segmentation-bitmap: Semantic, panoptic and instance segmentation.

  • vector: Polygons, polylines, bounding boxes, points.

  • bboxes: Bounding boxes only.

task_attributes

dict

Required. The task attributes. See Configuring the label editor.

description

string

The description of the dataset.

public

boolean

Sets the visibility of a dataset. Can be one of:

  • true - Anyone can see the dataset.

  • false - Only the owner and collaborators can view the dataset.

readme

string

The readme of the dataset, displayed on the overview tab.

enable_skip_labeling

boolean

Enable the skip button in the labeling workflow. Defaults to True.

enable_skip_reviewing

boolean

Enable the skip button in the reviewing workflow. Defaults to False.

enable_ratings

boolean

Enable star-ratings for labeled images. Defaults to False.

Example

Response

Update a dataset

Same fields as previous.

Delete a dataset

Add a collaborator to a dataset

Input

Name

Type

Description

user

string

Required. The username of the collaborator to be added.

role

string

The role of the collaborator. Can be one of: labeler, reviewer, admin

Example

Response

Samples

List samples

Response

Get a sample

Response

Create a sample

Input

Name

Type

Description

name

string

Required. The name of the sample.

attributes

object

Sample data.

metadata

object

User-defined metadata.

priority

float

Priority in the labeling queue. Samples with higher values will be labeled first. Default is 0.

Example

Response

Update a sample

Same fields as previous.

Delete a sample

Labels

Get a label

Response

Create or update a label

Input

Name

Type

Description

attributes

object

Label data. Format depends on the label type, see label formats.

label_status

string

Status of the label.

Can be one of: LABELED, REVIEWED, REJECTED, PRELABELED, SKIPPED

score

float

Prediction score.

Example

Response

Delete a label

Releases

List releases

Response

Get a release

Response

Create a release

Input

Name

Type

Description

name

string

Required. The name of the release.

description

string

The description of the release.

Example

Response

Delete a release

Last updated

Was this helpful?