# Choose what an evaluation judges

Source: https://docs.vlayers.ai/reference/agents/set-evaluation-scoring

`PUT /v1/evaluations/{id}/scoring` · scope `workspace:write`

Chooses whether the evaluation judges finished calls, text conversations or both, and how many of them. Each judgement is charged at its price, so the answer is the quote for the choice: `maxUsd` at most, `typicalUsd` as an estimate. An existing evaluation judges calls only until you turn text on here.

Requires an API key with the `workspace:write` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The evaluation id. Example: `"0192f5f7-b0cf-7a1d-9c6d-7e8f90123456"` |
| `subjects` | body | "call" \| "conversation" \| "run" \| "journey"[] | yes | What to judge: `call`, `conversation`, `run` (a test conversation) or any of them. |
| `sampleRate` | body | number | yes | The share of subjects to judge, above 0 up to 1. |

## Request

cURL:

```bash
curl -X PUT "https://api.vlayers.ai/v1/evaluations/$EVALUATION_ID/scoring" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "subjects": [
      "call",
      "conversation"
    ],
    "sampleRate": 0.5
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { quote } = await voicelayer.agents.setEvaluationScoring('<evaluation-id>', {
  subjects: ['call', 'conversation'],
  sampleRate: 0.5
});
console.log(quote.maxUsd);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.agents.set_evaluation_scoring(
    "<evaluation-id>",
    subjects=["call", "conversation"],
    sample_rate=0.5,
)
print(result.quote.max_usd)
```

## Response `200`

```json
{
  "scoring": {
    "subjects": [
      "call",
      "conversation"
    ],
    "sampleRate": 0.5
  },
  "quote": {
    "maxUsd": 0.0123,
    "typicalUsd": 0.0031,
    "maxScoresPerConversation": 3,
    "sampleRate": 0.5,
    "outcomeIsFree": true
  }
}
```
