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

# Actualizar un benchmark

> El diálogo de Configuración: nombre, descripción, idioma, agentes asignados, valores predeterminados de ejecución (`settings`: objetivo, repeticiones, candidatos predeterminados; no se versionan) y configuración de puntuación (`scoring`: máximo de turnos, variables faltantes, umbral por idioma; van al borrador y se aplican en la siguiente publicación). Envía solo los campos que cambian.



## OpenAPI

````yaml /es/docs-openapi.json patch /v1/benchmarks/{id}
openapi: 3.1.0
info:
  title: API REST de Zelto
  version: v1
  description: >-
    Acceso programático a tu organización de Zelto. Cada endpoint está limitado
    a la organización a la que pertenece la clave de API. Crea una clave en
    Configuración → Integraciones → Integración por API.
servers:
  - url: https://api.zelto.ai
    description: Producción
security:
  - bearerAuth: []
tags:
  - name: Monitors
    description: Exportaciones filtradas y asíncronas de resultados guardados de monitores.
  - name: Agentes
    description: >-
      Agentes de IA de voz y texto normalizados mediante el flujo de ingestión
      de Zelto.
  - name: Conversaciones
    description: >-
      Conversaciones de voz y texto (llamadas, chats y mensajes de voz), junto
      con sus transcripciones y grabaciones.
  - name: Métricas del cliente
    description: >-
      Evaluaciones proporcionadas por el cliente y asociadas a una conversación.
      Requiere que las métricas estén habilitadas.
  - name: Revisiones
    description: Estado de revisión humana de las conversaciones.
  - name: Colas de revisión
    description: Agrupa y dirige conversaciones para revisarlas por lotes.
  - name: Empresas
    description: Clientes o marcas para los que trabajan tus agentes, y sus logos.
  - name: Hallazgos
    description: >-
      Problemas estructurados descubiertos durante el análisis, con
      conversaciones y comentarios opcionales.
  - name: Experimentos
    description: >-
      Medición prospectiva de dos versiones de prompt enrutadas externamente
      mediante resultados de monitores independientes.
  - name: Organizaciones
    description: >-
      Aprovisionamiento de organizaciones sin interfaz. Requiere una clave de
      API de administrador o servicio.
  - name: Proveedores de IA
    description: >-
      Las claves propias de tu organización para proveedores de IA (trae tu
      propia clave). Los monitores pueden ejecutarse con ellas en lugar de los
      modelos integrados de Zelto. Solo propietarios o administradores; el
      secreto es de solo escritura.
  - name: Benchmarks
    description: >-
      Evaluaciones repetibles de prompts, modelos y motores de voz a texto de
      tus agentes sobre un conjunto fijo de casos, puntuadas por Judges.
paths:
  /v1/benchmarks/{id}:
    patch:
      tags:
        - Benchmarks
      summary: Actualizar un benchmark
      description: >-
        El diálogo de Configuración: nombre, descripción, idioma, agentes
        asignados, valores predeterminados de ejecución (`settings`: objetivo,
        repeticiones, candidatos predeterminados; no se versionan) y
        configuración de puntuación (`scoring`: máximo de turnos, variables
        faltantes, umbral por idioma; van al borrador y se aplican en la
        siguiente publicación). Envía solo los campos que cambian.
      operationId: updateBenchmark
      parameters:
        - name: id
          in: path
          required: true
          description: Id del benchmark.
          schema:
            type: string
            format: uuid
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 120
                description:
                  anyOf:
                    - type: string
                      maxLength: 500
                    - type: 'null'
                language:
                  anyOf:
                    - type: string
                      minLength: 2
                      maxLength: 16
                    - type: 'null'
                agentIds:
                  minItems: 1
                  maxItems: 20
                  type: array
                  items:
                    type: string
                    format: uuid
                  description: >-
                    Agentes a los que está asignado el benchmark (1-20). En v1
                    solo agentes de un único prompt.
                settings:
                  type: object
                  properties:
                    passBar:
                      anyOf:
                        - type: number
                          minimum: 0
                          maximum: 1
                        - type: 'null'
                      description: >-
                        El objetivo: tasa mínima de aprobación (LLM), WER máximo
                        (STT) (ambos 0..1). Nulo = sin objetivo.
                    defaultRepeats:
                      type: integer
                      minimum: 1
                      maximum: 3
                      description: >-
                        Repeticiones con las que empieza una ejecución nueva
                        (solo LLM).
                    defaultCandidates:
                      maxItems: 10
                      type: array
                      items:
                        type: object
                        properties:
                          model:
                            type: string
                            minLength: 1
                            maxLength: 200
                          agentVersionId:
                            anyOf:
                              - type: string
                                minLength: 1
                                maxLength: 100
                              - type: 'null'
                        required:
                          - model
                          - agentVersionId
                scoring:
                  description: >-
                    Configuración de puntuación, versionada a través del
                    borrador.
                  type: object
                  properties:
                    maxTurns:
                      type: integer
                      minimum: 1
                      maximum: 30
                    missingVariable:
                      type: string
                      enum:
                        - error
                        - placeholder
                    gatePerLanguage:
                      type: boolean
      responses:
        '200':
          description: Respuesta correcta.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkDetail'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: '`conflict`: El recurso no está en un estado que permita esto.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkError'
components:
  schemas:
    BenchmarkDetail:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        kind:
          type: string
          enum:
            - llm
            - stt
        agents:
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkAgentRef'
        draftCaseCount:
          description: >-
            Casos que publicaría el borrador abierto; null si el benchmark no
            tiene borrador.
          anyOf:
            - type: integer
            - type: 'null'
        createdAt:
          type: string
          description: Marca de tiempo ISO 8601.
        updatedAt:
          type: string
          description: Marca de tiempo ISO 8601.
        archivedAt:
          anyOf:
            - type: string
              description: Marca de tiempo ISO 8601.
            - type: 'null'
        settings:
          $ref: '#/components/schemas/BenchmarkSettings'
        language:
          type:
            - string
            - 'null'
        currentVersion:
          anyOf:
            - type: integer
            - type: 'null'
        hasDraftChanges:
          type: boolean
        versions:
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkVersion'
          description: La más nueva primero; el borrador (si lo hay) va primero.
        checkGroups:
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkCheckGroup'
        judges:
          type: array
          items:
            $ref: '#/components/schemas/BenchmarkJudge'
        caseCounts:
          type: object
          properties:
            total:
              type: integer
            turn:
              type: integer
            conversation:
              type: integer
            audio:
              type: integer
            retired:
              type: integer
            draft:
              type: integer
            draftTotal:
              anyOf:
                - type: integer
                - type: 'null'
            workingTotal:
              type: integer
          required:
            - total
            - turn
            - conversation
            - audio
            - retired
            - draft
        scoring:
          type: object
          properties:
            normalizationVersion:
              type:
                - string
                - 'null'
            defaultRepeats:
              type: integer
            gatePerLanguage:
              type: boolean
          required:
            - normalizationVersion
            - defaultRepeats
            - gatePerLanguage
        validatorKinds:
          type: array
          items:
            type: string
            enum:
              - judge
              - code
              - builtin
      required:
        - id
        - name
        - description
        - kind
        - agents
        - createdAt
        - updatedAt
        - currentVersion
        - hasDraftChanges
        - versions
        - checkGroups
        - judges
        - caseCounts
      description: >-
        Un benchmark con sus versiones, Judges, grupos y conteos de casos
        (ejecuciones: los endpoints de ejecuciones).
    BenchmarkError:
      type: object
      required:
        - error
        - code
        - message
      properties:
        error:
          type: string
          enum:
            - validation_failed
            - invalid_parameter
            - approval_required
            - plan_limit
            - phi_mode_blocked
            - owner_required
            - not_entitled
            - forbidden
            - not_found
            - payload_too_large
            - estimate_stale
            - pointer_moved
            - no_draft_changes
            - conflict
            - idempotency_key_reused
            - rate_limited
            - model_unavailable
          description: Código de error estable (mismo valor que `code`).
        code:
          type: string
          enum:
            - validation_failed
            - invalid_parameter
            - approval_required
            - plan_limit
            - phi_mode_blocked
            - owner_required
            - not_entitled
            - forbidden
            - not_found
            - payload_too_large
            - estimate_stale
            - pointer_moved
            - no_draft_changes
            - conflict
            - idempotency_key_reused
            - rate_limited
            - model_unavailable
          description: Causa estable y legible por máquinas; compara con este campo.
        message:
          type: string
          description: Una frase en lenguaje claro que explica qué está mal.
        hint:
          type: string
          description: El siguiente paso que conviene probar.
        details:
          type: object
          additionalProperties: true
          description: >-
            Contexto propio de cada código, por ejemplo `approvalRequestId` con
            `approval_required` o `cap` con `plan_limit`.
    BenchmarkAgentRef:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      description: Un agente al que está asignado el benchmark.
    BenchmarkSettings:
      type: object
      properties:
        passBar:
          anyOf:
            - type: number
              minimum: 0
              maximum: 1
            - type: 'null'
          description: >-
            El objetivo: tasa mínima de aprobación (LLM), WER máximo (STT)
            (ambos 0..1). Nulo = sin objetivo.
        defaultRepeats:
          type: integer
          minimum: 1
          maximum: 3
          description: Repeticiones con las que empieza una ejecución nueva (solo LLM).
        defaultCandidates:
          maxItems: 10
          type: array
          items:
            type: object
            properties:
              model:
                type: string
                minLength: 1
                maxLength: 200
              agentVersionId:
                anyOf:
                  - type: string
                    minLength: 1
                    maxLength: 100
                  - type: 'null'
            required:
              - model
              - agentVersionId
      required:
        - passBar
        - defaultRepeats
        - defaultCandidates
      description: Valores predeterminados de ejecución del benchmark. No se versionan.
    BenchmarkVersion:
      type: object
      properties:
        id:
          type: string
        number:
          anyOf:
            - type: integer
            - type: 'null'
          description: Empieza en 1. Nulo para el borrador.
        status:
          type: string
          enum:
            - published
            - draft
        note:
          type:
            - string
            - 'null'
        caseCount:
          type: integer
        judgeCount:
          type: integer
        changes:
          type: array
          items:
            type: object
            properties:
              kind:
                type: string
                enum:
                  - cases_added
                  - cases_retired
                  - cases_deleted
                  - cases_edited
                  - cases_relabelled
                  - check_groups_changed
                  - judge_added
                  - judge_removed
                  - judge_edited
                  - settings_changed
              count:
                type: integer
              label:
                type: string
            required:
              - kind
        author:
          $ref: '#/components/schemas/BenchmarkRunAuthor'
        createdAt:
          type: string
          description: Marca de tiempo ISO 8601.
        publishedAt:
          anyOf:
            - type: string
              description: Marca de tiempo ISO 8601.
            - type: 'null'
        items:
          $ref: '#/components/schemas/BenchmarkVersionItems'
        caseSetHash:
          type:
            - string
            - 'null'
        contentHash:
          type:
            - string
            - 'null'
      required:
        - number
        - status
        - note
        - caseCount
        - judgeCount
        - changes
        - author
        - createdAt
        - publishedAt
      description: Una versión publicada (inmutable) o el borrador abierto.
    BenchmarkCheckGroup:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        why:
          type:
            - string
            - 'null'
        severity:
          type: string
          enum:
            - critical
            - major
            - minor
        passRule:
          $ref: '#/components/schemas/BenchmarkCheckGroupPassRule'
        caseCount:
          type: integer
      required:
        - id
        - title
        - why
        - severity
      description: Un grupo de casos con nombre, una severidad y una regla de aprobación.
    BenchmarkJudge:
      type: object
      properties:
        id:
          type: string
        label:
          type: string
        kind:
          type: string
          enum:
            - judge
            - code
            - builtin
        required:
          type: boolean
        weight:
          type: number
        summary:
          type: string
        recentPassRate:
          type:
            - number
            - 'null'
        revision:
          type: integer
        costPer1kUsd:
          type:
            - number
            - 'null'
        params:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
                minLength: 1
                maxLength: 40
              label:
                type: string
                maxLength: 60
              type:
                type: string
                enum:
                  - number
                  - text
                  - percent
              default:
                anyOf:
                  - type: number
                  - type: string
                    maxLength: 500
              unit:
                type: string
                maxLength: 20
              min:
                type: number
              max:
                type: number
            required:
              - key
              - label
              - type
              - default
        labelTemplate:
          type: string
        toolCheck:
          type: string
          enum:
            - tool_call_match
            - tool_args_schema
            - tool_args_match
        config:
          $ref: '#/components/schemas/BenchmarkJudgeConfig'
        checkGroupId:
          type:
            - string
            - 'null'
        appliesTo:
          type: object
          properties:
            caseTypes:
              type: array
              items:
                type: string
                enum:
                  - turn
                  - conversation
                  - audio
            tags:
              maxItems: 20
              type: array
              items:
                type: string
                maxLength: 40
      required:
        - id
        - label
        - kind
        - required
        - weight
        - summary
        - recentPassRate
        - revision
      description: Un Judge (validador) que puntúa cada caso.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: >-
            Nombre corto del error: `Unauthorized`, `Validation failed`, `Not
            found` o un código estable en snake_case que puedes comparar en tu
            código, como `unknown_query_parameter`, `invalid_parameter`,
            `payload_too_large` o `not_found`.
        message:
          type: string
          description: Una frase en lenguaje claro que explica qué falla y cómo corregirlo.
        code:
          type: string
          description: >-
            Causa estable y legible por máquina; compara con este valor y no con
            `error` ni `message`. En un 401: `missing_credentials`,
            `malformed_credentials`, `ingest_key_not_allowed` (se usó una clave
            de ingesta de observabilidad, solo de escritura, en un endpoint que
            requiere una clave API), `key_expired` o `invalid_credentials`. En
            otros casos, por ejemplo: `not_found`, `invalid_parameter`,
            `unknown_query_parameter`, `missing_parameter`, `validation_failed`,
            `invalid_json`, `payload_too_large`, `conversation_not_found`,
            `plan_required`.
        hint:
          type: string
          description: >-
            El siguiente paso a probar: dónde encontrar el id correcto, qué
            parámetros acepta el endpoint, cómo mejorar el plan o cómo
            autenticarte.
        parameter:
          type: string
          description: 'Con `invalid_parameter`: el parámetro de consulta rechazado.'
        unknown:
          type: array
          items:
            type: string
          description: >-
            Con `unknown_query_parameter`: los parámetros enviados que este
            endpoint no acepta.
        valid:
          type: array
          items:
            type: string
          description: >-
            Con `unknown_query_parameter`: los parámetros que acepta este
            endpoint.
        details:
          type: object
          additionalProperties: true
    BenchmarkRunAuthor:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        image:
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - image
      description: Un miembro de la organización.
    BenchmarkVersionItems:
      type: object
      properties:
        cases:
          type: array
          items:
            type: object
            properties:
              caseId:
                type: string
              title:
                type: string
              change:
                type: string
                enum:
                  - added
                  - retired
                  - deleted
                  - edited
                  - relabelled
                description: >-
                  `deleted`: el caso se eliminó de forma permanente (no se
                  retiró), así que no se puede restaurar. `relabelled`: misma
                  revisión, pero cambió su grupo o sus etiquetas.
              fromRevision:
                anyOf:
                  - type: integer
                  - type: 'null'
              toRevision:
                anyOf:
                  - type: integer
                  - type: 'null'
            required:
              - caseId
              - title
              - change
              - fromRevision
              - toRevision
        judges:
          type: array
          items:
            type: object
            properties:
              judgeId:
                type: string
              label:
                type: string
              change:
                type: string
                enum:
                  - added
                  - removed
                  - edited
              before:
                type:
                  - string
                  - 'null'
              after:
                type:
                  - string
                  - 'null'
            required:
              - judgeId
              - label
              - change
              - before
              - after
        settings:
          type: array
          items:
            type: object
            properties:
              key:
                type: string
              label:
                type: string
              before:
                type:
                  - string
                  - 'null'
              after:
                type:
                  - string
                  - 'null'
            required:
              - key
              - label
              - before
              - after
      required:
        - cases
        - judges
        - settings
      description: Cambios por elemento entre dos versiones.
    BenchmarkCheckGroupPassRule:
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              const: all
          required:
            - kind
        - type: object
          properties:
            kind:
              type: string
              const: majority
          required:
            - kind
        - type: object
          properties:
            kind:
              type: string
              const: at_least_n
            'n':
              type: integer
              minimum: 1
              maximum: 10000
          required:
            - kind
            - 'n'
      description: Cómo se obtiene el veredicto de un grupo a partir de sus casos.
    BenchmarkJudgeConfig:
      oneOf:
        - type: object
          properties:
            kind:
              type: string
              const: judge
            rubric:
              type: string
              maxLength: 8000
            model:
              type: object
              properties:
                provider:
                  type: string
                  enum:
                    - platform
                    - openai
                    - anthropic
                    - openrouter
                    - vercel_gateway
                modelId:
                  type: string
                  minLength: 1
                  maxLength: 200
                aiKeyId:
                  type:
                    - string
                    - 'null'
              required:
                - provider
                - modelId
            scale:
              oneOf:
                - type: object
                  properties:
                    type:
                      type: string
                      const: pass_fail
                  required:
                    - type
                - type: object
                  properties:
                    type:
                      type: string
                      const: score_1_5
                    threshold:
                      type: integer
                      minimum: 1
                      maximum: 5
                  required:
                    - type
                    - threshold
          required:
            - kind
            - rubric
            - model
            - scale
        - type: object
          properties:
            kind:
              type: string
              const: code
            code:
              type: string
              maxLength: 20000
          required:
            - kind
            - code
        - type: object
          properties:
            kind:
              type: string
              const: builtin
            rule:
              type: string
              enum:
                - reply_length
                - contains
                - regex_match
                - exact_match
                - wer_max
                - key_terms
                - tool_call_match
                - tool_args_schema
                - tool_args_match
                - transition_match
                - goal_reached
                - max_turns
                - path_includes
          required:
            - kind
            - rule
      description: >-
        Configuración del Judge según su tipo: rúbrica LLM + modelo + escala,
        código o una regla integrada.
  responses:
    ValidationFailed:
      description: >-
        El cuerpo o la cadena de consulta de la solicitud han fallado en la
        validación. `code` indica el tipo (`validation_failed`, `invalid_json`,
        `invalid_parameter`, `unknown_query_parameter`, `missing_parameter`) y
        un filtro con valores fijos lista los permitidos en `valid` (se
        comprueba cada valor repetido: `?status=open&status=zz` es un 400). Un
        cuerpo `validation_failed` incluye además `message` (los primeros campos
        que fallan), `hint` (cómo corregirlo, por ejemplo que la `description`
        de un hallazgo es un documento JSON de TipTap y no una cadena) y
        `details` (nombre del campo y mensajes).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Clave API faltante o no válida. El cuerpo indica la causa en `code` (por
        ejemplo `ingest_key_not_allowed` cuando se usa aquí una clave de
        ingesta, solo de escritura), con un `message` y un `hint`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: >-
        Recurso no encontrado en tu organización. También se devuelve cuando un
        id de la ruta no es un UUID, y `{ "error": "not_found" }` para una ruta
        que esta API no tiene. El cuerpo conserva `error: "Not found"` y añade
        `code: "not_found"` y un `hint`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Envía `Authorization: Bearer YOUR_API_KEY`. La clave corresponde a una
        sola organización.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.