---
updatedAt: 2026-09-25T18:34:03.000Z
agentTools:
  projectIndex: https://docs.centaurlabs.com/llms.txt
---

# Create a new task

Creates a new task in the specified project with the given type, prompt, and answer classes.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Ingest API",
    "description": "Public API for importing data and managing labeling tasks, cases, projects, and assets.",
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://api.centaurlabs.com"
    }
  ],
  "paths": {
    "/tasks/public/v1/add": {
      "post": {
        "tags": [
          "Add and Manage Tasks"
        ],
        "summary": "Create a new task",
        "description": "Creates a new task in the specified project with the given type, prompt, and answer classes.",
        "operationId": "task_add_public_tasks_public_v1_add_post",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/TaskClassification"
                  },
                  {
                    "$ref": "#/components/schemas/TaskSegmentation"
                  },
                  {
                    "$ref": "#/components/schemas/TaskRange"
                  }
                ],
                "title": "Body",
                "examples": [
                  {
                    "task_name": "Image Classification",
                    "project_id": 123,
                    "task_prompt": "Classify the medical condition in this image",
                    "task_type": "classification",
                    "multi_answer": false,
                    "answer_classes": [
                      "normal",
                      "abnormal",
                      "uncertain"
                    ],
                    "task_description": "This task involves segmenting the liver, kidney, and heart."
                  }
                ]
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/ExistingTaskClassification"
                    },
                    {
                      "$ref": "#/components/schemas/ExistingTaskSegmentation"
                    },
                    {
                      "$ref": "#/components/schemas/ExistingTaskRange"
                    }
                  ],
                  "title": "Response Task Add Public Tasks Public V1 Add Post"
                }
              }
            }
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        },
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "BearerToken": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ExistingTaskClassification": {
        "properties": {
          "task_type": {
            "$ref": "#/components/schemas/TaskTypeClassification"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "title": "Title"
          },
          "prompt": {
            "type": "string",
            "maxLength": 52,
            "minLength": 1,
            "title": "Prompt"
          },
          "answers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Answers",
            "unique_items": true
          },
          "is_variable_answer_choice": {
            "type": "boolean",
            "title": "Is Variable Answer Choice",
            "default": false
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "n_contexts_per_problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "title": "N Contexts Per Problem"
          },
          "n_targets_per_problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "title": "N Targets Per Problem"
          },
          "view_mapping": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ViewMapping"
                },
                "type": "array",
                "maxLength": 10,
                "minLength": 1,
                "unique_items": true
              },
              {
                "type": "null"
              }
            ],
            "title": "View Mapping"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Project Id"
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/TaskPlatform"
            },
            "type": "array",
            "title": "Platforms"
          },
          "audiences": {
            "items": {
              "$ref": "#/components/schemas/TaskAudience"
            },
            "type": "array",
            "title": "Audiences"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "is_multi_answer": {
            "type": "boolean",
            "title": "Is Multi Answer",
            "default": false
          },
          "n_levels_per_problem": {
            "type": "integer",
            "title": "N Levels Per Problem",
            "readOnly": true
          },
          "is_multiple_assets": {
            "type": "boolean",
            "title": "Is Multiple Assets",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "task_type",
          "title",
          "prompt",
          "answers",
          "project_id",
          "id",
          "created_at",
          "updated_at",
          "n_levels_per_problem",
          "is_multiple_assets"
        ],
        "title": "ExistingTaskClassification"
      },
      "ExistingTaskRange": {
        "properties": {
          "task_type": {
            "$ref": "#/components/schemas/TaskTypeRange"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "title": "Title"
          },
          "prompt": {
            "type": "string",
            "maxLength": 52,
            "minLength": 1,
            "title": "Prompt"
          },
          "answers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Answers",
            "unique_items": true
          },
          "is_variable_answer_choice": {
            "type": "boolean",
            "const": false,
            "title": "Is Variable Answer Choice",
            "default": false
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "n_contexts_per_problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "title": "N Contexts Per Problem"
          },
          "n_targets_per_problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "title": "N Targets Per Problem"
          },
          "view_mapping": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ViewMapping"
                },
                "type": "array",
                "maxLength": 10,
                "minLength": 1,
                "unique_items": true
              },
              {
                "type": "null"
              }
            ],
            "title": "View Mapping"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Project Id"
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/TaskPlatform"
            },
            "type": "array",
            "title": "Platforms"
          },
          "audiences": {
            "items": {
              "$ref": "#/components/schemas/TaskAudience"
            },
            "type": "array",
            "title": "Audiences"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "is_multi_answer": {
            "type": "boolean",
            "const": true,
            "title": "Is Multi Answer",
            "default": true
          },
          "n_levels_per_problem": {
            "type": "integer",
            "title": "N Levels Per Problem",
            "readOnly": true
          },
          "is_multiple_assets": {
            "type": "boolean",
            "title": "Is Multiple Assets",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "task_type",
          "title",
          "prompt",
          "answers",
          "project_id",
          "id",
          "created_at",
          "updated_at",
          "n_levels_per_problem",
          "is_multiple_assets"
        ],
        "title": "ExistingTaskRange"
      },
      "ExistingTaskSegmentation": {
        "properties": {
          "task_type": {
            "$ref": "#/components/schemas/TaskTypeSegmentation"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "title": "Title"
          },
          "prompt": {
            "type": "string",
            "maxLength": 52,
            "minLength": 1,
            "title": "Prompt"
          },
          "answers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Answers",
            "unique_items": true
          },
          "is_variable_answer_choice": {
            "type": "boolean",
            "const": false,
            "title": "Is Variable Answer Choice",
            "default": false
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "n_contexts_per_problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "title": "N Contexts Per Problem"
          },
          "n_targets_per_problem": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              }
            ],
            "title": "N Targets Per Problem"
          },
          "view_mapping": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ViewMapping"
                },
                "type": "array",
                "maxLength": 10,
                "minLength": 1,
                "unique_items": true
              },
              {
                "type": "null"
              }
            ],
            "title": "View Mapping"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Project Id"
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/TaskPlatform"
            },
            "type": "array",
            "title": "Platforms"
          },
          "audiences": {
            "items": {
              "$ref": "#/components/schemas/TaskAudience"
            },
            "type": "array",
            "title": "Audiences"
          },
          "id": {
            "type": "integer",
            "title": "Id"
          },
          "created_at": {
            "type": "string",
            "title": "Created At"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At"
          },
          "is_multi_answer": {
            "type": "boolean",
            "const": true,
            "title": "Is Multi Answer",
            "default": true
          },
          "n_levels_per_problem": {
            "type": "integer",
            "title": "N Levels Per Problem",
            "readOnly": true
          },
          "is_multiple_assets": {
            "type": "boolean",
            "title": "Is Multiple Assets",
            "readOnly": true
          }
        },
        "type": "object",
        "required": [
          "task_type",
          "title",
          "prompt",
          "answers",
          "project_id",
          "id",
          "created_at",
          "updated_at",
          "n_levels_per_problem",
          "is_multiple_assets"
        ],
        "title": "ExistingTaskSegmentation"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "TaskAudience": {
        "type": "string",
        "enum": [
          "crowd",
          "expert"
        ],
        "title": "TaskAudience"
      },
      "TaskClassification": {
        "properties": {
          "task_type": {
            "$ref": "#/components/schemas/TaskTypeClassification"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "title": "Title"
          },
          "prompt": {
            "type": "string",
            "maxLength": 52,
            "minLength": 1,
            "title": "Prompt"
          },
          "answers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Answers",
            "unique_items": true
          },
          "is_variable_answer_choice": {
            "type": "boolean",
            "title": "Is Variable Answer Choice",
            "default": false
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "n_contexts_per_problem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer",
                "multipleOf": 2,
                "minimum": 0
              }
            ],
            "title": "N Contexts Per Problem",
            "default": 0
          },
          "n_targets_per_problem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            ],
            "title": "N Targets Per Problem",
            "default": 1
          },
          "view_mapping": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ViewMapping"
                },
                "type": "array",
                "maxLength": 10,
                "minLength": 1,
                "unique_items": true
              },
              {
                "type": "null"
              }
            ],
            "title": "View Mapping"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Project Id"
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/TaskPlatform"
            },
            "type": "array",
            "title": "Platforms"
          },
          "audiences": {
            "items": {
              "$ref": "#/components/schemas/TaskAudience"
            },
            "type": "array",
            "title": "Audiences"
          },
          "is_multi_answer": {
            "type": "boolean",
            "title": "Is Multi Answer",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_type",
          "title",
          "prompt",
          "answers",
          "project_id"
        ],
        "title": "TaskClassification"
      },
      "TaskPlatform": {
        "type": "string",
        "enum": [
          "web",
          "ios"
        ],
        "title": "TaskPlatform"
      },
      "TaskRange": {
        "properties": {
          "task_type": {
            "$ref": "#/components/schemas/TaskTypeRange"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "title": "Title"
          },
          "prompt": {
            "type": "string",
            "maxLength": 52,
            "minLength": 1,
            "title": "Prompt"
          },
          "answers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Answers",
            "unique_items": true
          },
          "is_variable_answer_choice": {
            "type": "boolean",
            "const": false,
            "title": "Is Variable Answer Choice",
            "default": false
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "n_contexts_per_problem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer",
                "multipleOf": 2,
                "minimum": 0
              }
            ],
            "title": "N Contexts Per Problem",
            "default": 0
          },
          "n_targets_per_problem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            ],
            "title": "N Targets Per Problem",
            "default": 1
          },
          "view_mapping": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ViewMapping"
                },
                "type": "array",
                "maxLength": 10,
                "minLength": 1,
                "unique_items": true
              },
              {
                "type": "null"
              }
            ],
            "title": "View Mapping"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Project Id"
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/TaskPlatform"
            },
            "type": "array",
            "title": "Platforms"
          },
          "audiences": {
            "items": {
              "$ref": "#/components/schemas/TaskAudience"
            },
            "type": "array",
            "title": "Audiences"
          },
          "is_multi_answer": {
            "type": "boolean",
            "const": true,
            "title": "Is Multi Answer",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_type",
          "title",
          "prompt",
          "answers",
          "project_id"
        ],
        "title": "TaskRange"
      },
      "TaskSegmentation": {
        "properties": {
          "task_type": {
            "$ref": "#/components/schemas/TaskTypeSegmentation"
          },
          "title": {
            "type": "string",
            "minLength": 1,
            "title": "Title"
          },
          "prompt": {
            "type": "string",
            "maxLength": 52,
            "minLength": 1,
            "title": "Prompt"
          },
          "answers": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "minItems": 1,
            "title": "Answers",
            "unique_items": true
          },
          "is_variable_answer_choice": {
            "type": "boolean",
            "const": false,
            "title": "Is Variable Answer Choice",
            "default": false
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 1024,
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "n_contexts_per_problem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer",
                "multipleOf": 2,
                "minimum": 0
              }
            ],
            "title": "N Contexts Per Problem",
            "default": 0
          },
          "n_targets_per_problem": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "integer",
                "exclusiveMinimum": 0
              }
            ],
            "title": "N Targets Per Problem",
            "default": 1
          },
          "view_mapping": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/ViewMapping"
                },
                "type": "array",
                "maxLength": 10,
                "minLength": 1,
                "unique_items": true
              },
              {
                "type": "null"
              }
            ],
            "title": "View Mapping"
          },
          "organization_id": {
            "anyOf": [
              {
                "type": "integer",
                "exclusiveMinimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Organization Id"
          },
          "project_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Project Id"
          },
          "platforms": {
            "items": {
              "$ref": "#/components/schemas/TaskPlatform"
            },
            "type": "array",
            "title": "Platforms"
          },
          "audiences": {
            "items": {
              "$ref": "#/components/schemas/TaskAudience"
            },
            "type": "array",
            "title": "Audiences"
          },
          "is_multi_answer": {
            "type": "boolean",
            "const": true,
            "title": "Is Multi Answer",
            "default": true
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "task_type",
          "title",
          "prompt",
          "answers",
          "project_id"
        ],
        "title": "TaskSegmentation"
      },
      "TaskTypeClassification": {
        "type": "string",
        "enum": [
          "classification"
        ],
        "title": "TaskTypeClassification"
      },
      "TaskTypeRange": {
        "type": "string",
        "enum": [
          "range",
          "named_entity_recognition",
          "range_selection_time"
        ],
        "title": "TaskTypeRange"
      },
      "TaskTypeSegmentation": {
        "type": "string",
        "enum": [
          "circle",
          "box",
          "line",
          "polygon",
          "cuboid",
          "pixel_seg",
          "point2d"
        ],
        "title": "TaskTypeSegmentation"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          },
          "input": {
            "title": "Input"
          },
          "ctx": {
            "type": "object",
            "title": "Context"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      },
      "ViewMapping": {
        "properties": {
          "view": {
            "type": "string",
            "maxLength": 20,
            "minLength": 1,
            "title": "View"
          },
          "index": {
            "type": "integer",
            "title": "Index"
          }
        },
        "type": "object",
        "required": [
          "view",
          "index"
        ],
        "title": "ViewMapping"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "description": "Your Centaur API key",
        "in": "header",
        "name": "X-API-KEY"
      },
      "BearerToken": {
        "type": "http",
        "description": "Bearer token obtained from authentication endpoint",
        "scheme": "bearer"
      }
    }
  },
  "tags": [
    {
      "name": "Add and Manage Tasks",
      "description": "Create and configure labeling tasks, including their answer classes, label class groups, and instructions."
    }
  ],
  "x-readme": {
    "apply-tag-changes": true
  }
}
```