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

# Agregar un Judge

> Agrega al borrador un Judge LLM, de código o integrado. Por MCP, pasa `judgeId` para actualizar un Judge existente.



## OpenAPI

````yaml /es/docs-openapi.json post /v1/benchmarks/{id}/judges
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}/judges:
    post:
      tags:
        - Benchmarks
      summary: Agregar un Judge
      description: >-
        Agrega al borrador un Judge LLM, de código o integrado. Por MCP, pasa
        `judgeId` para actualizar un Judge existente.
      operationId: createBenchmarkJudge
      parameters:
        - name: id
          in: path
          required: true
          description: Id del benchmark.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  minLength: 1
                  maxLength: 120
                labelTemplate:
                  type: string
                  maxLength: 200
                kind:
                  type: string
                  enum:
                    - judge
                    - code
                    - builtin
                required:
                  default: true
                  type: boolean
                weight:
                  default: 1
                  type: number
                  minimum: 0.1
                  maximum: 10
                checkGroupId:
                  default: null
                  anyOf:
                    - type: string
                      format: uuid
                    - type: 'null'
                appliesTo:
                  default: {}
                  type: object
                  properties:
                    caseTypes:
                      type: array
                      items:
                        type: string
                        enum:
                          - turn
                          - conversation
                          - audio
                    tags:
                      maxItems: 20
                      type: array
                      items:
                        type: string
                        maxLength: 40
                params:
                  default: []
                  maxItems: 10
                  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
                config:
                  $ref: '#/components/schemas/BenchmarkJudgeConfig'
                toolCheck:
                  type: string
                  enum:
                    - tool_call_match
                    - tool_args_schema
                    - tool_args_match
              required:
                - label
                - kind
                - config
      responses:
        '201':
          description: Respuesta correcta.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkJudge'
        '400':
          $ref: '#/components/responses/ValidationFailed'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: >-
            `phi_mode_blocked`: La organización está en modo PHI, que solo
            permite modelos enrutados por Bedrock y AWS Transcribe.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BenchmarkError'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    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.
    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.
    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`.
    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
  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.