> ## 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 specification configuration

> Uses AI to rewrite a rough or brief note into a properly written specification description and suggest its classification (type, test type, test variant) in a single request. Nothing is persisted — the caller decides which fields to apply and creates the specification explicitly. See [Specifications](https://docs.galtea.ai/concepts/product/specification).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /specifications/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:
  /specifications/generate-config:
    post:
      tags:
        - specifications
      summary: Generate specification configuration
      description: >-
        Uses AI to rewrite a rough or brief note into a properly written
        specification description and suggest its classification (type, test
        type, test variant) in a single request. Nothing is persisted — the
        caller decides which fields to apply and creates the specification
        explicitly. See
        [Specifications](https://docs.galtea.ai/concepts/product/specification).
      operationId: generateSpecificationConfig
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateSpecConfigBody'
      responses:
        '200':
          description: Generated specification configuration returned successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SpecConfigResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    GenerateSpecConfigBody:
      type: object
      properties:
        description:
          type: string
          minLength: 1
          maxLength: 5000
          example: no swearing pls
          description: >-
            The rough, brief, or already-written specification description (max
            5000 characters)
        productId:
          type: string
          example: prod_123
          description: Optional product ID for additional context
      required:
        - 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
    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-...`.

````