# Evaluate

Typed decisions from an evaluation model.

`POST /api/v1/evaluate`

## Overview

Evaluation models return choices, scores, and boolean probabilities instead of generated text. Send the shared `state` plus a map of typed `questions`; every question is evaluated independently and returned under its own id. The upstream path is configured on the channel and defaults to /evaluate, so providers that expose a different path keep working.

## Parameters

- `model` (string) — required: An enabled evaluation model ID, e.g. typesafe-ai/jev.
- `state` (string | object | array) — required: The shared input every question is evaluated against.
- `questions` (object) — required: Map of question id to a question of type boolean, choice, or score. Up to 20 per request.

## Example

```bash
curl -X POST https://capi.ai/api/v1/evaluate \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"model":"typesafe-ai/jev","state":"I was charged twice for my subscription.","questions":{"refund":{"type":"boolean","instructions":"Is the customer asking for money back?"}}}'
```

## Response

```json
{
  "model": "typesafe-ai/jev",
  "answers": {
    "refund": { "type": "boolean", "probability": 0.98 },
    "urgency": { "type": "score", "score": 2.1, "probabilities": { "0": 0.05, "1": 0.2, "2": 0.75 } }
  },
  "usage": { "inputTokens": 275, "outputTokens": 20 },
  "cost": { "amount": 0.0001, "currency": "USD" }
}
```
