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

# Generate Form

> Generate a form from natural language description using LLM.



## OpenAPI

````yaml /openapi.json post /api/v1/brief-forms/generate
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brief-forms/generate:
    post:
      tags:
        - Brief Forms
      summary: Generate Form
      description: Generate a form from natural language description using LLM.
      operationId: generate_form_api_v1_brief_forms_generate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BriefFormGenerateRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BriefFormDetailResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BriefFormGenerateRequest:
      properties:
        description:
          type: string
          maxLength: 5000
          minLength: 10
          title: Description
          description: Describe what information the form should collect
        task_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Task Type
          description: Target task type
        category:
          anyOf:
            - type: string
            - type: 'null'
          title: Category
          description: Target category
        num_fields:
          anyOf:
            - type: integer
              maximum: 50
              minimum: 1
            - type: 'null'
          title: Num Fields
          description: Approx field count
      type: object
      required:
        - description
      title: BriefFormGenerateRequest
      description: Generate a form via LLM from natural language.
    BriefFormDetailResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        slug:
          type: string
          title: Slug
        user_id:
          type: string
          format: uuid
          title: User Id
        team_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Team Id
        schema_json:
          additionalProperties: true
          type: object
          title: Schema Json
        ui_schema_json:
          additionalProperties: true
          type: object
          title: Ui Schema Json
        source_type:
          type: string
          title: Source Type
        source_file_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Source File Id
        status:
          type: string
          title: Status
        is_template:
          type: boolean
          title: Is Template
        current_version:
          type: integer
          title: Current Version
        field_count:
          type: integer
          title: Field Count
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - slug
        - user_id
        - schema_json
        - ui_schema_json
        - source_type
        - status
        - is_template
        - current_version
        - created_at
        - updated_at
      title: BriefFormDetailResponse
      description: Full form detail including schema.
    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

````