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

# Create Benchmark Task

> Create a new benchmark generation task from documents.


This endpoint starts a process to automatically generate benchmark questions from specified documents using AI. The generated questions can be used for model evaluation and testing.


**Request Body:**

- `documents`: List of document IDs to generate benchmarks from (required)
- `num_questions`: Number of benchmark questions to generate (required)


**Returns:**

- `id`: Unique task identifier for tracking generation progress
- `status`: Initial task status (always `PROCESSING`)


**Raises:**

- `400`: If no documents provided
- `400`: If document validation fails (missing documents or unauthorized access)


**Example Request:**

```json
POST /api/v3/benchmark/create
Headers: {"Authorization": "Bearer <api_key>"}

{
  "documents": ["doc-abc123", "doc-xyz456", "doc-def789"],
  "num_questions": 10
}
```


**Example Response:**

```json
{
  "id": "task-abc123-def456",
  "status": "PROCESSING"
}
```


**Notes:**

- All document IDs are validated before task creation to ensure they exist and belong to the user
- Use the returned task ID with `/benchmark/status/{id}` endpoint to track generation progress
- Once completed, the benchmark will be available for use in model evaluations



## OpenAPI

````yaml https://api.nugen.in/openapi-public.json post /api/v3/benchmark/create
openapi: 3.1.0
info:
  title: Nugen Intelligence API
  description: 'Nugen Intelligence : Powering Specialized Intelligence At Scale'
  version: 25.4.20
servers: []
security: []
paths:
  /api/v3/benchmark/create:
    post:
      tags:
        - Benchmark
      summary: Create Benchmark Task
      description: >-
        Create a new benchmark generation task from documents.



        This endpoint starts a process to automatically generate benchmark
        questions from specified documents using AI. The generated questions can
        be used for model evaluation and testing.



        **Request Body:**


        - `documents`: List of document IDs to generate benchmarks from
        (required)

        - `num_questions`: Number of benchmark questions to generate (required)



        **Returns:**


        - `id`: Unique task identifier for tracking generation progress

        - `status`: Initial task status (always `PROCESSING`)



        **Raises:**


        - `400`: If no documents provided

        - `400`: If document validation fails (missing documents or unauthorized
        access)



        **Example Request:**


        ```json

        POST /api/v3/benchmark/create

        Headers: {"Authorization": "Bearer <api_key>"}


        {
          "documents": ["doc-abc123", "doc-xyz456", "doc-def789"],
          "num_questions": 10
        }

        ```



        **Example Response:**


        ```json

        {
          "id": "task-abc123-def456",
          "status": "PROCESSING"
        }

        ```



        **Notes:**


        - All document IDs are validated before task creation to ensure they
        exist and belong to the user

        - Use the returned task ID with `/benchmark/status/{id}` endpoint to
        track generation progress

        - Once completed, the benchmark will be available for use in model
        evaluations
      operationId: create_benchmark_task
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GenerateBenchmarkRequest'
        required: true
      responses:
        '200':
          description: >-
            Returns a unique task identifier and initial status for the
            benchmark generation process initiated from specified documents
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateBenchmarkResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    GenerateBenchmarkRequest:
      properties:
        documents:
          items:
            type: string
          type: array
          title: Documents
          description: List of document IDs to generate benchmark from
          example:
            - doc-abc123
            - doc-def456
        num_questions:
          anyOf:
            - type: integer
              maximum: 100
              minimum: 1
            - type: 'null'
          title: Num Questions
          description: >-
            Number of questions to generate (if None, DeepEval decides based on
            content)
          default: 20
          example: 10
      type: object
      required:
        - documents
      title: GenerateBenchmarkRequest
    CreateBenchmarkResponse:
      properties:
        benchmark_id:
          type: string
          title: Benchmark Id
          description: Created benchmark task identifier
          example: benchmark-123
        status:
          type: string
          title: Status
          description: Initial benchmark generation status
          default: PROCESSING
          example: PROCESSING
      type: object
      required:
        - benchmark_id
      title: CreateBenchmarkResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````