---
title: "Test-run a scorer"
method: POST
path: "/api/{org_id}/scorers/test"
tags: ["Scorers"]
---

# Test-run a scorer

`POST /api/{org_id}/scorers/test`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/scorers/test`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/scorers/test/post.ts> (a function with typed inputs; its response is checked against the schema)

Tests an inline scorer config with provided input variable values. Runs the scorer synchronously and returns the evaluation result.

## Path parameters

- `org_id` string, required

## Request body

- object: HTTP request body for testing a scorer.
  - `description` string, nullable
  - `inputVariables` unknown, required
  - `name` string, required
  - `scorer` union, required
    - object
      - `outputSchema` unknown
      - `params` LlmJudgeScorerParams, required
        - `extra_metadata_fields` ExtraMetadataField[], nullable
          - `description` string, nullable
          - `name` string, required
          - `type` 'string' | 'number' | 'boolean', required
        - `include_reasoning` boolean, nullable
        - `max_tokens` integer, nullable
        - `model` string, nullable
        - `output_parsing` string, nullable
        - `provider_id` string, required
        - `temperature` number, double, nullable
        - `timeout_ms` integer, nullable
      - `producesScoreConfigId` string, nullable
      - `producesScoreConfigVersion` integer, nullable
      - `template` string, required
      - `type` 'llm_judge', required
    - object
      - `params` RemoteScorerParams, required
        - `auth` union
          - object
            - `type` 'none', required
          - object
            - `token` string, required
            - `type` 'bearer', required
          - object
            - `password` string, required
            - `type` 'basic', required
            - `username` string, required
          - object
            - `header_name` string, required
            - `token` string, required
            - `type` 'api_key', required
        - `content_type` string, nullable
        - `custom_headers` RemoteScorerHeader[], nullable
          - `key` string, required
          - `value` string, required
        - `endpoint` string, required
        - `http_method` string, nullable
        - `max_retries` integer, nullable
        - `timeout_ms` integer, nullable
      - `producesScoreConfigId` string, nullable
      - `producesScoreConfigVersion` integer, nullable
      - `template` string, required
      - `type` 'remote', required

## Response `200`

- object: HTTP response body for scorer test results.
  - `completionTokens` integer, nullable
  - `error` string, nullable
  - `latencyMs` integer, required
  - `metadata` unknown
  - `modelUsed` string, nullable
  - `promptTokens` integer, nullable
  - `rawResponse` string, nullable
  - `reasoning` string, nullable
  - `success` boolean, required
  - `totalTokens` integer, nullable
  - `valueBoolean` boolean, nullable
  - `valueCategorical` string, nullable
  - `valueNumeric` number, double, nullable

## Other responses

- `400`: Bad Request
- `403`: Provider not accessible
- `404`: Not Found

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
