You can request labeling results from our API via two methods:
- Get results for a single Case (within a Task)
- Get a page of results for a Task
Request parametersYour API request for results must include:
API key: Follow these steps: API Credentialsbearer token: Follow these steps: Initiate API sessiontask_id: Centaur's unique identifier for the Task. This can be retrieved from the portal by examining the URL on the Task View, eg. https://go.centaurlabs.com/task/1234
Task results
You can retrieve labeling results for a Task with a GET request to /results/public/v1/list:
curl --location --request GET 'https://api.centaurlabs.com/results/public/v1/list?task_id={TASK_ID}' \
--header 'X-API-KEY: YOUR_API_KEY_HERE' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json'Your response will be a JSON object containing the results for a page of Cases. For a breakdown of the response, see these docs.
Case results
Labeling results for a single Case may be retrieved by including an additional parameter in a GET request to /results/public/v1/get::
case_id:Centaur's unique identifier for the Case. The can be retrieved from the portal by examining the URL on the Case View, eg. https://go.centaurlabs.com/problem/2345
curl --location --request GET 'https://api.centaurlabs.com/results/public/v1/get?task_id={TASK_ID}&case_id={CASE_ID}' \
--header 'X-API-KEY: YOUR_API_KEY_HERE' \
--header 'Authorization: Bearer YOUR_TOKEN_HERE' \
--header 'Content-Type: application/json'Your response will be a JSON object containing the results for a single Case. For a breakdown of the response, see these docs.
Pages of results
Since tasks may contain hundreds or thousands of cases, we don't return the results to you all at once. Instead, we return a "page" of results. When you request results for a Task, the API response may contain details on how to fetch the subsequent page:
{
"payload": [
labeling results 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 results available. To request the subsequent page, issue another request including the last_sequence_id like this:
curl --location --request GET 'https://api.centaurlabs.com/results/public/v1/list?task_id={TASK_ID}&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'Filtering task results
You can include the following optional parameters with your request to filter your results:
labeling_state: Filter by results for cases having a specific Labeling State. Allowed values areReady,Active,Labeled,Gold Standard,Canceled, andFlagged.updated_after: Filter by cases that were updated after a specific timestamp, eg.2022-07-14T12:00:00last_sequence_id: Filter by results following a specific page offset.
curl --location --request GET 'https://api.centaurlabs.com/results/public/v1/list?task_id={TASK_ID}&labeling_state={labeling_state}&updated_after={updated_after}&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'