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

# Extend a generated test with more cases

> Re-run the generator that originally produced this test (scenario, red teaming, or gold standard) and append the new cases to it. Only tests Galtea generated from a specification or ground-truth document can be extended. See [Tests](https://docs.galtea.ai/concepts/product/test).



## OpenAPI

````yaml https://api.galtea.ai/openapi.json post /tests/{id}/extend
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:
  /tests/{id}/extend:
    post:
      tags:
        - tests
      summary: Extend a generated test with more cases
      description: >-
        Re-run the generator that originally produced this test (scenario, red
        teaming, or gold standard) and append the new cases to it. Only tests
        Galtea generated from a specification or ground-truth document can be
        extended. See [Tests](https://docs.galtea.ai/concepts/product/test).
      operationId: extendTest
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: ID of the generated test to extend
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                count:
                  type: integer
                  description: How many extra cases to generate (defaults to 10, max 200)
      responses:
        '202':
          description: Extension task started
        '400':
          description: Bad request (test cannot be extended or insufficient credits)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    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-...`.

````