curl --request POST \
--url https://api.openpipe.ai/api/v1/criteria/judge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"criterion_id": "<string>",
"input": {
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"tool_choice": "none",
"tools": [
{
"function": {
"name": "<string>",
"parameters": {},
"description": "<string>",
"strict": true
},
"type": "function"
}
]
},
"output": {
"reasoning_content": "<string>",
"content": null,
"refusal": "<string>",
"role": "assistant",
"function_call": {
"name": "",
"arguments": ""
},
"tool_calls": [
{
"id": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"type": "function"
}
]
}
}'
{
"score": 123,
"explanation": "<string>",
"usage": {
"total_tokens": 123
}
}
Get a judgement of a completion against the specified criterion
curl --request POST \
--url https://api.openpipe.ai/api/v1/criteria/judge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"criterion_id": "<string>",
"input": {
"messages": [
{
"role": "system",
"content": "<string>",
"name": "<string>"
}
],
"tool_choice": "none",
"tools": [
{
"function": {
"name": "<string>",
"parameters": {},
"description": "<string>",
"strict": true
},
"type": "function"
}
]
},
"output": {
"reasoning_content": "<string>",
"content": null,
"refusal": "<string>",
"role": "assistant",
"function_call": {
"name": "",
"arguments": ""
},
"tool_calls": [
{
"id": "<string>",
"function": {
"name": "<string>",
"arguments": "<string>"
},
"type": "function"
}
]
}
}'
{
"score": 123,
"explanation": "<string>",
"usage": {
"total_tokens": 123
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Successful response
The response is of type object
.