Manage labeling projects

Your files are organized into Projects on the Centaur portal. A project contains files of a single data type (text, images, or videos). Labeling tasks are defined within a project - more data can always be added to a project and these tasks.

📘

API Credentials

The examples in this guide require having API credentials set up. If you haven't done so already, please follow the instructions in API credentials and Initiate API session..

Create project

To create a new project, issue a POST request to /projects/public/v1/add. You will need to select the content_type of your project (the format in which your data will be displayed for labeling). The options for this field are video, image, text, or html:

curl --location --request POST 'https://api.centaurlabs.com/projects/public/v1/add' \
--header 'X-API-KEY: YOUR_API_KEY_HERE' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
  "name": "Hello World",
  "description": "My first project",
  "content_type": "image"
}'
🚧

Escaping single quotes in cURL data

If you need to pass data containing an apostrophe (single quote) via cURL, eg. My Team's First Project, you'll need to escape the apostrophe using special syntax:

--data '{
  "name": "My Team'\''s First Project"
}'

Update project

You can update the name and description of an existing project. To do so, issue a PATCH request to /projects/public/v1/set. You will need the project's unique identifier:

curl --location --request PATCH 'https://api.centaurlabs.com/projects/public/v1/set?project_id={PROJECT_ID}' \
--header 'X-API-KEY: YOUR_API_KEY_HERE' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json' \
--data '{
  "name": "My Project Updated Name",
  "description": "My project updated description"
}'
📘

Project content_type is static

Note: you cannot change the content_type of an existing project. To upload data of a different type, please create a new project.

List projects

To view a list of your existing labeling projects, issue a GET request to /projects/public/v1/list:

curl --location --request GET 'https://api.centaurlabs.com/projects/public/v1/list' \
--header 'X-API-KEY: YOUR_API_KEY_HERE' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json'

Pages of projects

We return a "page" of projects instead of all projects. By default, a page contains up to 100 projects. When you request a list of projects, the API response may contain details on how to fetch the subsequent page:

{
  "payload": [
    projects here...
  ],
  "has_next": true,
  "last_sequence_id": 6837202,
  "limit": 100
}

If your API response contains the fields has_next and last_sequence_id, this is an indication that there are additional pages of projects available. To request the subsequent page, issue another request including the last_sequence_id like this:

curl --location --request GET 'https://api.centaurlabs.com/projects/public/v1/list?last_sequence_id={LAST_SEQUENCE_ID}' \
--header 'X-API-KEY: YOUR_API_KEY_HERE' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json'