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

# Create Task from Description

> Creates a new task from a natural language description. AI will generate the task definition based on your description.



## OpenAPI

````yaml openapi-v0.1.json post /v0.1/tasks/create
openapi: 3.0.0
info:
  title: API Documentation
  description: API description
  version: '0.1'
  contact: {}
servers:
  - url: https://api.promptloop.com/
    description: Production API v0.1
security: []
tags: []
paths:
  /v0.1/tasks/create:
    post:
      tags:
        - Tasks
      summary: Create Task from Description
      description: >-
        Creates a new task from a natural language description. AI will generate
        the task definition based on your description.
      operationId: TasksController_createTask
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTaskDto'
      responses:
        '200':
          description: Successfully created task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateTaskResponseDto'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - x-api-key: []
components:
  schemas:
    CreateTaskDto:
      type: object
      properties:
        description:
          type: string
          description: Natural language description of what the task should do
          example: Find the company description and CEO name from a website
        name:
          type: string
          description: Optional name for the task (auto-generated if not provided)
          example: Company Info Extractor
      required:
        - description
    CreateTaskResponseDto:
      type: object
      properties:
        task_id:
          type: string
          description: The ID of the created task
          example: abc123-def456-...
        name:
          type: string
          description: The name of the task
          example: Company Info Extractor
        message:
          type: string
          description: Status message
          example: Task created successfully
      required:
        - task_id
        - name
        - message
    ErrorResponseDto:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
            - error
          example: error
        data:
          type: object
        message:
          type: string
        error:
          $ref: '#/components/schemas/ErrorDetailsDto'
      required:
        - status
        - data
        - message
    ErrorDetailsDto:
      type: object
      properties:
        code:
          type: number
        details:
          type: string
      required:
        - code
        - details
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key

````