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

# Create vehicle comparison

> Creates a vehicle comparison comparing 2-5 vehicles side-by-side.
The comparison is generated asynchronously. Use the returned `id` with
`GET /content/{id}` to check status and retrieve the result.




## OpenAPI

````yaml /openapi.yaml post /comparisons
openapi: 3.1.0
info:
  title: Hrizn Public API
  version: 1.2.0
  description: >
    The Hrizn Public API allows partners to programmatically create content,
    manage inventory descriptions, and integrate with the Hrizn platform.


    All endpoints are prefixed with `/public` and require an API key passed via
    the `X-API-Key` header (except the health check).
  contact:
    email: support@hrizn.io
servers:
  - url: https://api.app.hrizn.io/v1/public
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: IdeaClouds
    description: Create and manage AI-powered keyword research
  - name: Content Intelligence
    description: AI-powered content gap analysis and recommendations
  - name: Content
    description: Generate content from IdeaClouds
  - name: Compliance
    description: Run OEM compliance checks on content
  - name: Content Tools
    description: Generate SEO metadata, schemas, and social snippets
  - name: Inventory
    description: Access vehicle data and AI descriptions
  - name: Site
    description: View dealership details and configuration
  - name: Webhooks
    description: Manage webhook subscriptions for real-time events
  - name: Reference
    description: Look up available types, scopes, and events
  - name: Social
    description: >-
      Zernio-backed social posting and reviews across all connected platforms
      (X, Facebook, Instagram, LinkedIn, Google Business Profile)
  - name: Health
    description: Health check (no authentication)
paths:
  /comparisons:
    post:
      tags:
        - Content
      summary: Create vehicle comparison
      description: |
        Creates a vehicle comparison comparing 2-5 vehicles side-by-side.
        The comparison is generated asynchronously. Use the returned `id` with
        `GET /content/{id}` to check status and retrieve the result.
      operationId: createComparison
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateComparisonInput'
      responses:
        '202':
          description: Comparison generation started
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComparisonCreatedResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  schemas:
    CreateComparisonInput:
      type: object
      required:
        - vehicles
      properties:
        vehicles:
          type: array
          minItems: 2
          maxItems: 5
          items:
            $ref: '#/components/schemas/ComparisonVehicle'
        brand_voice_id:
          type: string
          description: ID of a brand voice profile to use for tone and style
        language:
          type: string
          enum:
            - English
            - Spanish
            - Mandarin Chinese
            - Japanese
            - Korean
            - Arabic
            - Farsi
            - Hebrew
            - French
            - Tagalog
            - Vietnamese
            - Portuguese
            - Russian
          default: English
        title:
          type: string
          maxLength: 500
          description: Custom title. Defaults to "Vehicle A vs Vehicle B vs ..."
        content_length:
          type: integer
          minimum: 200
          maximum: 5000
          deprecated: true
          description: >
            **Deprecated.** Article length is now driven by `content_depth`;
            this field is accepted for backward compatibility but has no effect.
            Comparison articles always include data tables.
        content_depth:
          type: string
          enum:
            - concise
            - steady
            - balanced
            - substantial
            - in-depth
          description: >
            Content depth preset that drives the article body. Defaults to
            `balanced`. Replaces the legacy `content_length` field.
        featured_vehicle_index:
          type: integer
          minimum: 0
          maximum: 2
          description: >
            Zero-based index of the vehicle to favor in the comparison. Omit for
            neutral/equal treatment of all vehicles.
        bias_level:
          type: integer
          minimum: 0
          maximum: 100
          description: >
            Bias intensity toward the featured vehicle (0-100). 0 = Neutral, 25
            = Subtle, 50 = Moderate (default), 75 = Strong, 100 = Maximum. Only
            applies when featured_vehicle_index is set.
    ComparisonCreatedResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
              format: uuid
            status:
              $ref: '#/components/schemas/ContentStatus'
            article_type:
              type: string
              example: comparison
            title:
              type: string
            vehicles:
              type: array
              items:
                $ref: '#/components/schemas/ComparisonVehicle'
            featured_vehicle_index:
              type: integer
              nullable: true
              description: Index of the featured vehicle, or null if neutral
            bias_level:
              type: integer
              nullable: true
              description: Bias intensity (0-100), or null if not set
            created_at:
              type: string
              format: date-time
            message:
              type: string
              description: >-
                Informational message about async processing and webhook
                configuration
    ComparisonVehicle:
      type: object
      required:
        - year
        - make
        - model
      properties:
        year:
          type: integer
          minimum: 1900
          maximum: 2100
          example: 2026
        make:
          type: string
          minLength: 1
          maxLength: 100
          example: Toyota
        model:
          type: string
          minLength: 1
          maxLength: 100
          example: Camry
        trim:
          type: string
          maxLength: 200
          example: XSE
    ContentStatus:
      type: string
      enum:
        - generating
        - complete
        - failed
      description: Content generation status
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              example: validation_error
            message:
              type: string
              example: 'keyword: Required'
            details:
              type: object
            request_id:
              type: string
  responses:
    BadRequest:
      description: Validation error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: API key lacks required scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Hrizn API key (prefix hzk_)

````