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

# Generate product configuration using AI

> Uses AI to generate a refined product description and testable specifications from a product name and user description. Optionally accepts product specification files (documents, images, audio, video, code) to enrich the generation. See [Products](https://docs.galtea.ai/concepts/product).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /products/generate-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/generate-config:
    post:
      tags:
        - products
      summary: Generate product configuration using AI
      description: >-
        Uses AI to generate a refined product description and testable
        specifications from a product name and user description. Optionally
        accepts product specification files (documents, images, audio, video,
        code) to enrich the generation. See
        [Products](https://docs.galtea.ai/concepts/product).
      operationId: generateProductConfig
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/GenerateProductConfigBody'
      responses:
        '200':
          description: Product configuration generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateProductConfigResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: AI generation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    GenerateProductConfigBody:
      type: object
      properties:
        productSpecs:
          type: array
          items:
            type: string
            format: binary
          description: >-
            Optional product specification files (documents, images, audio,
            video, code). Max 50 files, 10MB total.
        productName:
          type: string
          nullable: true
          description: The name of the product.
          example: Mobile Sales Assistant
        userDescription:
          type: string
          minLength: 1
          description: A brief description of what the product does.
          example: A mobile sales assistant for smartphones.
        useDetailedGeneration:
          type: string
          description: Whether to use detailed generation mode (heavier model).
          example: 'true'
      required:
        - userDescription
    GenerateProductConfigResponse:
      type: object
      properties:
        name:
          type: string
          description: The AI-refined product name.
        description:
          type: string
          description: The AI-refined product description.
        specifications:
          type: array
          items:
            $ref: '#/components/schemas/SpecConfigResponse'
          description: The generated testable specifications.
      required:
        - name
        - description
        - specifications
    Error:
      type: object
      properties:
        error:
          type: string
          example: Error type
        message:
          type: string
          example: Error message description
    SpecConfigResponse:
      type: object
      properties:
        description:
          type: string
          description: The AI-written specification description, rewritten from the input
        type:
          type: string
          enum:
            - CAPABILITY
            - INABILITY
            - POLICY
          description: Suggested specification type
        testType:
          type: string
          nullable: true
          enum:
            - QUALITY
            - RED_TEAMING
            - SCENARIOS
            - null
          description: Suggested test type (POLICY only; null otherwise)
        testVariant:
          type: string
          nullable: true
          description: >-
            Suggested test variant (QUALITY and RED_TEAMING test types only;
            null otherwise)
      required:
        - description
        - type
        - testType
        - testVariant
  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-...`.

````