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

# Run a RAGAS evaluation



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/evaluations/{evaluation_id}/run-ragas
openapi: 3.1.0
info:
  title: 4MINDS API
  version: v1
  description: >-
    OpenAPI spec for the 4MINDS-native API (`/api/v1`), generated from the
    Python client's request/response definitions. Successful responses use the
    envelope `{"status":"success","data": ...}`; errors use
    `{"status":"error","message": ...}`.
servers:
  - url: https://api.4minds.ai
security:
  - bearerAuth: []
tags:
  - name: Models
  - name: Conversations
  - name: Datasets
  - name: Evaluations
  - name: Inference
paths:
  /api/v1/evaluations/{evaluation_id}/run-ragas:
    parameters:
      - name: evaluation_id
        in: path
        required: true
        schema:
          type: string
        description: ''
    post:
      tags:
        - Evaluations
      summary: Run a RAGAS evaluation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RunRagasRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - status
                  - data
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    $ref: '#/components/schemas/Evaluation'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limited
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    RunRagasRequest:
      type: object
      properties:
        samples:
          type: array
          items:
            type: object
          default: []
        selected_questions:
          type: array
          items: {}
          default: []
    Evaluation:
      additionalProperties: true
      description: Represents a model benchmarking evaluation run metadata configuration.
      properties:
        id:
          description: The unique database identifier index.
          exclusiveMinimum: 0
          title: Id
          type: integer
        name:
          description: The tracking name designation string.
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: A localized optional description summary line.
          title: Description
        type:
          description: The framework runner engine type identifier (e.g. 'ragas').
          minLength: 1
          title: Type
          type: string
        model_id:
          description: The integer ID of the model being benchmarked.
          title: Model Id
          type: integer
        benchmark_type:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          description: The testing suite data matrix benchmark tier.
          title: Benchmark Type
        question_count:
          description: Total diagnostic queries executed during evaluation.
          title: Question Count
          type: integer
        status:
          default: pending
          description: Processing execution status tracker track.
          title: Status
          type: string
        model:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          default: null
          title: Model
        user_model:
          anyOf:
            - {}
            - type: 'null'
          default: null
          title: User Model
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          default: null
          title: Created At
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          default: null
          title: Updated At
      required:
        - id
        - name
        - type
        - model_id
        - question_count
      title: Evaluation
      type: object
    ErrorEnvelope:
      type: object
      required:
        - status
        - message
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Static, non-expiring API key: `Authorization: Bearer
        <FOURMINDS_API_KEY>`.

````