# See what scoring a goal costs

Source: https://docs.vlayers.ai/reference/agents/get-agent-goal-quote

`GET /v1/agents/{id}/goal/quote` · scope `workspace:read`

Prices scoring before you turn it on: `maxUsd` is the most one judgement can cost (a hard ceiling), `typicalUsd` is an estimate of a usual one. A conversation is judged at most `maxScoresPerConversation` times, and a goal read from a known outcome costs nothing (`outcomeIsFree`). Pass `sampleRate` to price a share of conversations. The ceiling is the longest goal text allowed; pass `criteriaBytes` (the UTF-8 size of a goal being edited) to price that text.

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

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | The agent id. Example: `"0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78"` |
| `sampleRate` | query | number | no | The share of conversations to score, above 0 up to 1. Default: the goal's own. Example: `0.5` |
| `criteriaBytes` | query | integer | no | The UTF-8 byte size of the goal text being edited, at most 2000. Default: the longest a goal may be. Example: `120` |

## Request

cURL:

```bash
curl "https://api.vlayers.ai/v1/agents/$AGENT_ID/goal/quote?sampleRate=0.5" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY"
```

TypeScript:

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

const voicelayer = new VoiceLayer();

const { maxUsd } = await voicelayer.agents.getGoalQuote('<agent-id>', { sampleRate: 0.5 });
console.log(maxUsd);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.agents.get_goal_quote("<agent-id>", sample_rate=0.5)
print(result.max_usd)
```

## Response `200`

```json
{
  "maxUsd": 0.0123,
  "typicalUsd": 0.0031,
  "maxScoresPerConversation": 3,
  "sampleRate": 1,
  "outcomeIsFree": true
}
```
