> ## 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 Workflow



## OpenAPI

````yaml /openapi.json post /api/v1/workflows
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/workflows:
    post:
      tags:
        - Workflows
      summary: Create Workflow
      operationId: create_workflow_api_v1_workflows_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WorkflowCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WorkflowCreate:
      properties:
        title:
          type: string
          maxLength: 200
          minLength: 1
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        trigger_type:
          type: string
          title: Trigger Type
          default: manual
        trigger_config:
          additionalProperties: true
          type: object
          title: Trigger Config
        auto_accept:
          type: boolean
          title: Auto Accept
          default: false
        max_budget_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Budget Cents
      type: object
      required:
        - title
      title: WorkflowCreate
    WorkflowResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        user_id:
          type: string
          format: uuid
          title: User Id
        source_project_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source Project Id
        title:
          type: string
          title: Title
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        trigger_type:
          type: string
          title: Trigger Type
        trigger_config:
          additionalProperties: true
          type: object
          title: Trigger Config
        is_template:
          type: boolean
          title: Is Template
          default: false
        template_category:
          anyOf:
            - type: string
            - type: 'null'
          title: Template Category
        auto_accept:
          type: boolean
          title: Auto Accept
          default: false
        auto_accept_preferences:
          additionalProperties: true
          type: object
          title: Auto Accept Preferences
        max_budget_cents:
          anyOf:
            - type: integer
            - type: 'null'
          title: Max Budget Cents
        status:
          type: string
          title: Status
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        nodes:
          items:
            $ref: '#/components/schemas/WorkflowNodeResponse'
          type: array
          title: Nodes
      type: object
      required:
        - id
        - user_id
        - title
        - trigger_type
        - status
        - created_at
        - updated_at
      title: WorkflowResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    WorkflowNodeResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        workflow_id:
          type: string
          format: uuid
          title: Workflow Id
        node_type:
          type: string
          title: Node Type
          default: task
        position:
          type: integer
          title: Position
        parallel_group:
          anyOf:
            - type: integer
            - type: 'null'
          title: Parallel Group
        depends_on:
          items:
            type: string
            format: uuid
          type: array
          title: Depends On
        task_template:
          additionalProperties: true
          type: object
          title: Task Template
        node_config:
          additionalProperties: true
          type: object
          title: Node Config
        input_mapping:
          additionalProperties: true
          type: object
          title: Input Mapping
        retry_count:
          type: integer
          title: Retry Count
          default: 0
        max_retries:
          type: integer
          title: Max Retries
          default: 1
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - id
        - workflow_id
        - position
        - created_at
      title: WorkflowNodeResponse
    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

````