Skip to main content
POST
/
api
/
v1
/
evals
/
reward
Reward
curl --request POST \
  --url https://platform.composo.ai/api/v1/evals/reward \
  --header 'API-Key: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "evaluation_criteria": "<string>",
  "model_core": "align-20250529",
  "messages": [
    {}
  ],
  "system": "<string>",
  "tools": [
    {}
  ],
  "evaluate_latest": true
}'
{
  "score": 123,
  "explanation": "<string>"
}

Authorizations

API-Key
string
header
required

Body

application/json

Request model for reward score evaluation of LLM responses against specified criteria.

evaluation_criteria
string
required

Criteria used for evaluation. Begins with one of the following: Reward, Penalize, Passes if, Fails if

messages
Messages · object[]
required

A list of chat messages in OpenAI or Anthropic messages format

Minimum length: 2
model_core
enum<string>

The model core for reward evaluation. Defaults to align-20250503 if not specified.

Available options:
align-20251111,
align-20250529,
align-lightning-20250731
system
string | null

System message is separate for Anthropic-style LLM calls. Optional.

tools
Tools · object[] | null

List of tools available for the assistant to call in OpenAI or Anthropic format. Optional.

evaluate_latest
boolean
default:true

Whether to evaluate only the latest response or all responses.

Response

Successful Response

Response model for evaluation scores.

explanation
string
required

Explanation of the evaluation score

score
number | null

Evaluation score between 0 and 1. If null, the criteria was deemed not applicable.