> ## 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 of an existing specification (`contradictory`).

This endpoint persists NOTHING: it only returns suggestions. Applying them
(creating, updating, or removing specifications) is a separate, explicit
step the user performs afterwards via the specification endpoints, so
nothing changes without confirmation and unaffected specifications remain
untouched.




## 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 of an existing specification (`contradictory`).


        This endpoint persists NOTHING: it only returns suggestions. Applying
        them

        (creating, updating, or removing specifications) is a separate, explicit

        step the user performs afterwards via the specification endpoints, so

        nothing changes without confirmation and unaffected specifications
        remain

        untouched.
      operationId: regenerateProductConfig
      parameters:
        - name: id
          in: path
          description: Product ID
          required: true
          schema:
            type: string
      requestBody:
        required: true
        description: One or more documents to cross-check, plus optional generation mode
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - productSpecs
              properties:
                useDetailedGeneration:
                  type: string
                  description: Whether to use detailed generation mode (uses heavier model)
                  example: 'true'
                productSpecs:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: Document(s) to cross-check (max 50 files, 10MB total)
      responses:
        '200':
          description: Cross-check suggestions generated successfully
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/SpecificationSuggestion'
        '400':
          description: Bad request - missing required fields or invalid files
          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
      security:
        - bearerAuth: []
components:
  schemas:
    SpecificationSuggestion:
      type: object
      description: >-
        A non-persisted suggestion produced by cross-checking a document against
        a product's existing specifications. `new` candidates match no existing
        specification; `updated` and `contradictory` reference the existing
        specification they relate to. Returned for review only — applying a
        suggestion is a separate, explicit step.
      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.
        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
          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
          description: >-
            The existing specification this suggestion updates or contradicts.
            Null for `new` suggestions.
          properties:
            id:
              type: string
              example: spec_123
            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
              example: RED_TEAMING
            testVariant:
              type: string
              nullable: true
              example: data_leakage
          required:
            - id
            - description
            - type
        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
        - description
        - type
    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-...`.

````