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

# Compare Products

> Compare products using LLM analysis.



## OpenAPI

````yaml /openapi.json post /api/v1/shopping/sessions/{session_id}/compare
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/shopping/sessions/{session_id}/compare:
    post:
      tags:
        - Shopping
      summary: Compare Products
      description: Compare products using LLM analysis.
      operationId: compare_products_api_v1_shopping_sessions__session_id__compare_post
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Session Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductComparisonRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductComparisonResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ProductComparisonRequest:
      properties:
        product_urls:
          items:
            type: string
          type: array
          maxItems: 10
          minItems: 2
          title: Product Urls
        requirements:
          anyOf:
            - type: string
              maxLength: 1000
            - type: 'null'
          title: Requirements
          description: User requirements for comparison (e.g. 'best for running')
      type: object
      required:
        - product_urls
      title: ProductComparisonRequest
    ProductComparisonResponse:
      properties:
        summary:
          type: string
          title: Summary
        recommendation:
          anyOf:
            - type: string
            - type: 'null'
          title: Recommendation
        comparison_table:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Comparison Table
          default: []
      type: object
      required:
        - summary
      title: ProductComparisonResponse
    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

````