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

# Run a namespaced evaluator

> Run one evaluator whose id has two segments, such as `ragas/faithfulness` or `langevals/valid_format`. Identical to the single-segment form in every other respect; the id is simply split across two path segments.



## OpenAPI

````yaml POST /api/evaluations/{evaluator}/{subpath}/evaluate
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/evaluations/{evaluator}/{subpath}/evaluate:
    post:
      tags:
        - Evaluations
      summary: Run a namespaced evaluator
      description: >-
        Run one evaluator whose id has two segments, such as
        `ragas/faithfulness` or `langevals/valid_format`. Identical to the
        single-segment form in every other respect; the id is simply split
        across two path segments.
      operationId: postApiEvaluationsByEvaluatorBySubpathEvaluate
      parameters:
        - in: path
          name: evaluator
          required: true
          schema:
            type: string
          description: First segment of the evaluator id, such as `ragas`
        - in: path
          name: subpath
          required: true
          schema:
            type: string
          description: Second segment of the evaluator id, such as `faithfulness`
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  additionalProperties: {}
                  description: >-
                    What the evaluator scores. Which fields are required depends
                    on the evaluator; its own entry under Built-in Evaluators
                    lists them.
                settings:
                  type: object
                  additionalProperties: {}
                  description: >-
                    Per-call overrides of the evaluator's settings. Anything
                    omitted falls back to the saved evaluator or monitor, then
                    to the evaluator's own defaults.
                trace_id:
                  type: string
                  nullable: true
                  description: Attaches the result to a trace you already sent
                evaluation_id:
                  type: string
                  nullable: true
                  description: Supply your own id to make the call idempotent
                evaluator_id:
                  type: string
                  nullable: true
                name:
                  type: string
                  nullable: true
                  description: Overrides the name the result is recorded under
                as_guardrail:
                  type: boolean
                  nullable: true
                  description: >-
                    Evaluate as a guardrail: a skipped or failed evaluation
                    answers `passed` rather than an error, so a caller can gate
                    on one field. The /api/guardrails path sets this for you.
              required:
                - data
              additionalProperties: false
      responses:
        '200':
          description: >-
            The evaluator ran, declined, or failed. Branch on `status`; in
            guardrail mode `passed` is set on all three.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      status:
                        type: string
                        const: processed
                      score:
                        type: number
                      passed:
                        type: boolean
                      label:
                        type: string
                      details:
                        type: string
                      cost:
                        type: object
                        properties:
                          currency:
                            type: string
                          amount:
                            type: number
                        required:
                          - currency
                          - amount
                        description: What running the evaluator cost
                      raw_response:
                        description: The evaluator's own output, unprocessed
                    required:
                      - status
                  - type: object
                    properties:
                      status:
                        type: string
                        const: skipped
                      details:
                        type: string
                        description: Why the evaluator declined to score this input
                      passed:
                        type: boolean
                        description: >-
                          Always true in guardrail mode, so a skip does not
                          block
                    required:
                      - status
                  - type: object
                    properties:
                      status:
                        type: string
                        const: error
                      error_type:
                        type: string
                        const: EVALUATOR_ERROR
                        description: 'Constant: the evaluator''s own type is not exposed'
                      details:
                        type: string
                      passed:
                        type: boolean
                        description: >-
                          Always true in guardrail mode, so a failure does not
                          block
                    required:
                      - status
                      - error_type
                      - details
        '400':
          description: >-
            The body was not valid JSON, failed validation, or omitted a field
            this evaluator requires
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The failure, as a sentence
                  kind:
                    type: string
                    description: Stable failure code, on the failures that carry one
                  meta:
                    type: object
                    additionalProperties: {}
                    description: >-
                      What the code needs to be acted on, such as the missing
                      field
                required:
                  - error
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The failure, as a sentence
                  kind:
                    type: string
                    description: Stable failure code, on the failures that carry one
                  meta:
                    type: object
                    additionalProperties: {}
                    description: >-
                      What the code needs to be acted on, such as the missing
                      field
                required:
                  - error
        '403':
          description: The API key lacks evaluations:manage
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The failure, as a sentence
                  kind:
                    type: string
                    description: Stable failure code, on the failures that carry one
                  meta:
                    type: object
                    additionalProperties: {}
                    description: >-
                      What the code needs to be acted on, such as the missing
                      field
                required:
                  - error
        '404':
          description: No evaluator answers to that id
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    description: The failure, as a sentence
                  kind:
                    type: string
                    description: Stable failure code, on the failures that carry one
                  meta:
                    type: object
                    additionalProperties: {}
                    description: >-
                      What the code needs to be acted on, such as the missing
                      field
                required:
                  - error
components:
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.

````