---
title: "Create a custom scenario scorer."
method: POST
path: "/v1/scenarios/scorers"
tags: ["Scenario", "ScenarioScorer"]
---

# Create a custom scenario scorer.

`POST /v1/scenarios/scorers`

Create a custom scenario scorer.

## Request body

- CreateCustomScorerParams
  - `type` string, required — Name of the type of custom scorer.
  - `bash_script` string, required — Bash script for the custom scorer taking context as a json object $RL_SCORER_CONTEXT.

## Response `200`

OK

- ScenarioScorerView — A ScenarioScorerView represents a custom scoring function for a Scenario.
  - `id` string, required — ID for the scenario scorer.
  - `type` string, required — Name of the type of scenario scorer.
  - `bash_script` string, required — Bash script that takes in $RL_SCORER_CONTEXT as env variable and runs scoring.

## Other responses

- `400` — Custom scorer type already exists.

---

[API](https://skmtc.dev/runloopai/apis/runloop-api.md) · [All operations](https://skmtc.dev/runloopai/apis/runloop-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runloopai/runloop-api/revisions/e9dc776053e4/schema)
