This endpoint allows you to add new tasks to a given project. It expects you to provide the necessary parameters to create a new task under the specified project, and will post it immediately. We recommend setting up projects using www.cogmint.com to create the task templates, set project settings (such as minimum number of responses per task and other defaults) and then sharing your project's UUID with the developers to add tasks programmatically.
Field | Type | Description |
---|---|---|
apikey | string | API Key for your account; available under settings. |
Field | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
task | object (map) |
A key-value representation of the task you wish to have created.
Task parameters:
|
{
"task": {
"project_uuid": "1234-123456-123456-1234",
"required_submissions": 3,
"reward": 25,
"callback_url": "https://www.yourwebsite.com/incomingwebhooks",
"substitutions": {
"name": "Matthew",
"key": "value"
}
}
}
{
"data": {
"prompt": "Please confirm George is a developer.",
"task_uuid": "1234-123456-123456-1234",
"reward": 0,
"callback_url": "https://www.example.com/incomingwebhooks",
"required_submissions": 3,
"submission_count": 0,
"checked_out_at": null,
"allowed_completion_time_seconds":3600
"external_image_url": null
"submissions": []
}
}
Retrieve a project.
Field | Type | Description |
---|---|---|
apikey | string | API Key for your account; available under settings. |
Field | Type | Description |
---|---|---|
id | string | ID (UUID) of the project. |
{
"data": {
"uuid": "1234-123456-123456-1234",
"name": "Labeling Cars Project",
"display_name": "Display name visible to workers",
"display_short_description": "Please help us label cars in these images",
"default_required_submissions": 3,
"default_reward": 50,
"average_outstanding_task_reward_cents": 50,
"lifetime_payments_to_workers_cents": 15000,
"has_published_tasks": true,
"allowed_completion_time_seconds": 3600,
"available_task_count": 80
}
}
For projects where the result is a series of annotations; this will return a list of annotations for all tasks that are complete. It will ignore any tasks still in progress so that it does not return partial results.
Field | Type | Description |
---|---|---|
apikey | string | API Key for your account; available under settings. |
Field | Type | Description |
---|---|---|
id | string | ID (UUID) of the project. |
{
"data":[
{
"annotations": [
{
"center_x": 110,
"center_y":65,
"height":50,
"label":"Object",
"width":65
},
{
"center_x": 518,
"center_y":250,
"height":55,
"label":"Object",
"width":70
},
],
"image": "image1.jpg",
"task_id": "1234-1234-1234-1234"
},
{
"annotations": []
"image": "image2.jpg",
"task_id": "4321-4321-4321-4321"
}
]
}
Returns a task by ID.
Field | Type | Description |
---|---|---|
apikey | string | API Key for your account; available under settings. |
Field | Type | Description |
---|---|---|
id | string | ID (UUID) of the task. |
{
"data": {
"allowed_completion_time_seconds": 3600,
"callback_url": "https://callback.com",
"checked_out_at": null,
"external_image_url": "https://some.image.com/image.png",
"prompt": "Please outline the stop signs in this image
",
"required_submissions": 1,
"reward": 0,
"submission_count": 1,
"submissions": [
"object_detection"
],
"task_uuid": "5440ece7-102d-44e5-a85e-b12e5bd507fb"
}
}
Returns the 2D bounding box annotations for the task. If the task is incomplete, the annotations list will be empty until the worktask has all required submissions.
You can check whether the task has all required submissions by comparing required_submissions to submission_count.
Field | Type | Description |
---|---|---|
id | string | ID (UUID) of the task. |
{
"data": {
"annotations": [
{
"center_x": 110,
"center_y": 65,
"height" : 45,
"label" : "Object",
"width": 63
}
],
"image": "https://your.image.host.com/151",
"required_submissions": 1,
"submission_count": 1,
"task_id": "5440ece7-102d-44e5-a85e-b12e5bd507fb"
}
}
Errors are inevitable; Cogmint's error messages provide clear guidance on what went wrong and how to fix it.
Error | Example |
---|---|
Invalid API KeyAll calls to the API require the API key to be set in the HTTP header 'apikey'. You can find both a test key and your live key in settings. |
|
Unprocessable Entity (422) |
If requesting a resource, such as a worktask, and the resource is not found
|
Authenticate calls to the Cogmint API using the HTTP header 'apikey'.
apikey=yourapikeyhere
All API endpoints will respond with validly-shaped but otherwise meaningless data when using a test API key. Calls using test API keys do not make any changes to the database.