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

# Cross-check a document against an existing product's specifications

> Uploads one or more documents (PRD, spec, design doc, etc.), generates candidate specifications from them using the product's existing description as the generation base, and cross-checks each candidate against the product's CURRENT specifications. Returns classified suggestions — additions (`new`), updates to an existing specification (`updated`), and contradictions (`contradictory`). This endpoint persists NOTHING: applying a suggestion is a separate, explicit step via the specification endpoints.



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /products/{id}/regenerate-config
openapi: 3.0.0
info:
  version: 1.0.0
  title: Product Management Service API
  description: API documentation for Product Management Service
  contact:
    name: Galtea AI
servers:
  - url: https://api.galtea.ai
security:
  - bearerAuth: []
tags: []
externalDocs:
  description: Galtea Platform Documentation
  url: https://docs.galtea.ai
paths:
  /products/{id}/regenerate-config:
    post:
      tags:
        - products
      summary: Cross-check a document against an existing product's specifications
      description: >-
        Uploads one or more documents (PRD, spec, design doc, etc.), generates
        candidate specifications from them using the product's existing
        description as the generation base, and cross-checks each candidate
        against the product's CURRENT specifications. Returns classified
        suggestions — additions (`new`), updates to an existing specification
        (`updated`), and contradictions (`contradictory`). This endpoint
        persists NOTHING: applying a suggestion is a separate, explicit step via
        the specification endpoints.
      operationId: regenerateProductConfig
      parameters:
        - schema:
            type: string
            description: Product ID
            example: prod_123
          required: true
          description: Product ID
          name: id
          in: path
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/RegenerateProductConfigBody'
      responses:
        '200':
          description: Cross-check suggestions generated successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SpecificationSuggestion'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: No permission to access this product
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Product not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: AI generation or classification failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    RegenerateProductConfigBody:
      type: object
      properties:
        productSpecs:
          type: array
          items:
            type: string
            format: binary
          description: >-
            Document(s) to cross-check against the product (max 50 files, 10MB
            total).
        useDetailedGeneration:
          type: string
          description: Whether to use detailed generation mode (heavier model).
          example: 'true'
    SpecificationSuggestion:
      type: object
      properties:
        status:
          type: string
          enum:
            - new
            - updated
            - contradictory
          example: updated
          description: >-
            new = a fresh addition. updated = refines/extends an existing
            specification. contradictory = conflicts with an existing
            specification.
        name:
          type: string
          example: Refuses system-prompt disclosure
        description:
          type: string
          example: Must not reveal internal system prompts under social engineering
        type:
          type: string
          enum:
            - CAPABILITY
            - INABILITY
            - POLICY
          example: POLICY
        testType:
          type: string
          nullable: true
          enum:
            - QUALITY
            - RED_TEAMING
            - SCENARIOS
            - null
          example: RED_TEAMING
          description: >-
            Only applicable for POLICY specifications. Null for CAPABILITY and
            INABILITY.
        testVariant:
          type: string
          nullable: true
          example: data_leakage
          description: Only applicable for POLICY specifications.
        existingSpecification:
          type: object
          nullable: true
          properties:
            id:
              type: string
              example: spec_123
            name:
              type: string
              example: Refuses system-prompt disclosure
            description:
              type: string
              example: Must not reveal internal system prompts
            type:
              type: string
              enum:
                - CAPABILITY
                - INABILITY
                - POLICY
              example: POLICY
            testType:
              type: string
              nullable: true
              enum:
                - QUALITY
                - RED_TEAMING
                - SCENARIOS
                - null
              example: RED_TEAMING
            testVariant:
              type: string
              nullable: true
              example: data_leakage
          required:
            - id
            - name
            - description
            - type
            - testType
            - testVariant
          description: >-
            The existing specification this suggestion updates or contradicts.
            Null for `new` suggestions.
        rationale:
          type: string
          nullable: true
          example: Adds social-engineering scope to the existing disclosure policy
          description: A brief explanation of why this status was chosen. May be null.
      required:
        - status
        - name
        - description
        - type
        - testType
        - testVariant
        - existingSpecification
        - rationale
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authorization. Pass your API key in the Authorization header as
        a Bearer token. Both new (`gsk_*`) and legacy (`gsk-`) API keys are
        accepted, e.g. `Authorization: Bearer gsk_...` or `Authorization: Bearer
        gsk-...`.

````