> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aitasker.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Task

> Create a new task and trigger the triage pipeline.

Category and task_type are validated at the schema level
(see TaskCreate validators in schemas.py). Invalid values
will return a 422 with descriptive error messages before
this handler runs.



## OpenAPI

````yaml /openapi.json post /api/v1/tasks
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/tasks:
    post:
      tags:
        - Tasks
      summary: Create Task
      description: |-
        Create a new task and trigger the triage pipeline.

        Category and task_type are validated at the schema level
        (see TaskCreate validators in schemas.py). Invalid values
        will return a 422 with descriptive error messages before
        this handler runs.
      operationId: create_task_api_v1_tasks_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TaskCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    TaskCreate:
      properties:
        title:
          anyOf:
            - type: string
              maxLength: 200
            - type: 'null'
          title: Title
        description:
          type: string
          maxLength: 5000
          title: Description
          default: ''
        category:
          type: string
          title: Category
          description: Task category from the taxonomy
        task_type:
          type: string
          title: Task Type
          description: Specific task type within category
        requirements:
          additionalProperties: true
          type: object
          title: Requirements
        budget_usd:
          type: number
          maximum: 300
          minimum: 3
          title: Budget Usd
        experimentation:
          type: number
          maximum: 1
          minimum: 0
          title: Experimentation
          default: 0.3
        brand_kit_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Brand Kit Id
      type: object
      required:
        - category
        - task_type
        - budget_usd
      title: TaskCreate
    TaskResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          type: string
          format: uuid
          title: User Id
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        category:
          type: string
          title: Category
        task_type:
          type: string
          title: Task Type
        requirements:
          additionalProperties: true
          type: object
          title: Requirements
        budget_usd:
          type: number
          title: Budget Usd
        compute_budget:
          anyOf:
            - type: number
            - type: 'null'
          title: Compute Budget
        status:
          type: string
          title: Status
        experimentation:
          type: number
          title: Experimentation
        attachments:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Attachments
        brand_kit_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Brand Kit Id
        prototype_tier:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prototype Tier
        created_at:
          type: string
          format: date-time
          title: Created At
        expires_at:
          type: string
          format: date-time
          title: Expires At
      type: object
      required:
        - id
        - user_id
        - title
        - description
        - category
        - task_type
        - requirements
        - budget_usd
        - compute_budget
        - status
        - experimentation
        - created_at
        - expires_at
      title: TaskResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````