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

# Create Autogenerated Draft Test Case

> ### Description
Creates a autogenerated draft test case

### Details
This API can be used to create a autogenerated draft test case. To use this API, review the request schema and pass in all fields that are required to create a autogenerated draft test case.



## OpenAPI

````yaml /openapi/v4.yaml post /v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases
openapi: 3.1.0
info:
  title: EGP API V4
  description: >-
    This is the parent API for all EGP APIs. If you are looking for the EGP API,
    please go to https://api.egp.scale.com/docs.
  contact:
    name: Scale Generative AI Platform
    url: https://scale.com/genai-platform
  version: 0.1.0
servers:
  - url: https://api.egp.scale.com
security: []
tags:
  - name: Models
    description: Model API.
paths:
  /v4/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases:
    post:
      tags:
        - Evaluation Datasets
      summary: Create Autogenerated Draft Test Case
      description: >-
        ### Description

        Creates a autogenerated draft test case


        ### Details

        This API can be used to create a autogenerated draft test case. To use
        this API, review the request schema and pass in all fields that are
        required to create a autogenerated draft test case.
      operationId: >-
        POST-V4-/evaluation-datasets/{evaluation_dataset_id}/autogenerated-draft-test-cases
      parameters:
        - name: evaluation_dataset_id
          in: path
          required: true
          schema:
            type: string
            title: Evaluation Dataset Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoGeneratedDraftTestCaseRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutoGeneratedDraftTestCaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AutoGeneratedDraftTestCaseRequest:
      properties:
        schema_type:
          type: string
          const: GENERATION
          title: Schema Type
          default: GENERATION
        test_case_data:
          anyOf:
            - $ref: '#/components/schemas/ArtifactSchemaGeneration'
            - $ref: '#/components/schemas/SchemaGenerationBase'
          title: Test Case Data
          description: >-
            The data for the test case in a format matching the provided
            schema_type
        approved:
          type: boolean
          title: Approved
          description: Boolean to track whether or not the draft test case is approved
        topic_str:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic Str
          can_patch: false
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
      type: object
      required:
        - test_case_data
        - approved
        - account_id
      title: AutoGeneratedDraftTestCaseRequest
    AutoGeneratedDraftTestCaseResponse:
      properties:
        evaluation_dataset_id:
          type: string
          title: Evaluation Dataset Id
          description: The ID of the associated evaluation dataset.
          can_patch: false
        schema_type:
          type: string
          const: GENERATION
          title: Schema Type
          default: GENERATION
        test_case_data:
          anyOf:
            - $ref: '#/components/schemas/ArtifactSchemaGeneration'
            - $ref: '#/components/schemas/SchemaGenerationBase'
          title: Test Case Data
          description: >-
            The data for the test case in a format matching the provided
            schema_type
        approved:
          type: boolean
          title: Approved
          description: Boolean to track whether or not the draft test case is approved
        topic_str:
          anyOf:
            - type: string
            - type: 'null'
          title: Topic Str
          can_patch: false
        content_metadata:
          additionalProperties: true
          type: object
          title: Content Metadata
          description: >-
            Metadata for the chunks and artifacts that were used to generate
            this draft test case.
          can_patch: false
        id:
          type: string
          title: Id
          description: The unique identifier of the entity.
        account_id:
          type: string
          title: Account Id
          description: The ID of the account that owns the given entity.
          can_patch: false
        created_at:
          type: string
          format: date-time
          title: Created At
          description: The date and time when the entity was created in ISO format.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: The date and time when the entity was last updated in ISO format.
        created_by_user_id:
          type: string
          title: Created By User Id
          description: The user who originally created the entity.
        created_by_identity_type:
          $ref: '#/components/schemas/IdentifierTypeEnum'
          description: The type of identity that created the entity.
      type: object
      required:
        - evaluation_dataset_id
        - test_case_data
        - approved
        - content_metadata
        - id
        - account_id
        - created_at
        - updated_at
        - created_by_user_id
        - created_by_identity_type
      title: AutoGeneratedDraftTestCaseResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ArtifactSchemaGeneration:
      properties:
        input:
          type: string
          title: Input
        expected_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Output
        expected_extra_info:
          anyOf:
            - $ref: '#/components/schemas/ExtraInfoSchema'
            - type: 'null'
        artifact_ids_filter:
          items:
            type: string
          type: array
          title: Artifact Ids Filter
      type: object
      required:
        - input
        - artifact_ids_filter
      title: ArtifactSchemaGeneration
    SchemaGenerationBase:
      properties:
        input:
          type: string
          title: Input
        expected_output:
          anyOf:
            - type: string
            - type: 'null'
          title: Expected Output
        expected_extra_info:
          anyOf:
            - $ref: '#/components/schemas/ExtraInfoSchema'
            - type: 'null'
      type: object
      required:
        - input
      title: SchemaGenerationBase
    IdentifierTypeEnum:
      type: string
      enum:
        - user
        - service_account
      title: IdentifierTypeEnum
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
          additionalProperties: true
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ExtraInfoSchema:
      oneOf:
        - $ref: '#/components/schemas/ChunkExtraInfoSchema'
        - $ref: '#/components/schemas/StringExtraInfoSchema'
      title: ExtraInfoSchema
      discriminator:
        propertyName: schema_type
        mapping:
          CHUNKS: '#/components/schemas/ChunkExtraInfoSchema'
          STRING: '#/components/schemas/StringExtraInfoSchema'
    ChunkExtraInfoSchema:
      properties:
        schema_type:
          type: string
          const: CHUNKS
          title: Schema Type
          default: CHUNKS
        chunks:
          items:
            $ref: '#/components/schemas/ChunkData'
          type: array
          title: Chunks
      type: object
      required:
        - chunks
      title: ChunkExtraInfoSchema
    StringExtraInfoSchema:
      properties:
        schema_type:
          type: string
          const: STRING
          title: Schema Type
          default: STRING
        info:
          type: string
          title: Info
      type: object
      required:
        - info
      title: StringExtraInfoSchema
    ChunkData:
      properties:
        text:
          type: string
          title: Text
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
      type: object
      required:
        - text
      title: ChunkData

````