How to score text with POST /api/score
Send POST /api/score with { "responseText": "Our API never stores customer data." } and your key. You get back verdict and receipt. Use it when you have the answer but not the prompt.
Last updated
Steps
Send the request
curl -s https://api.clearrun.net/api/score \ -H "Authorization: Bearer $CLEARRUN_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "responseText": "The Eiffel Tower is definitely in Berlin." }'Read the verdict
verdict.score,verdict.risk,verdict.summaryandverdict.verdictId.
Request fields
| Field | Required | Notes |
|---|---|---|
responseText | Yes | The text to score, 10 to 100,000 characters |
modelId | No | A label for the model that wrote it |
workspaceId | No | Which workspace's receipt chain to use |
Errors
- 400
responseText is required - 400
responseText is too short to score(CONTENT_TOO_SHORT) under 10 characters - 400
responseText too long(CONTENT_TOO_LONG, withmaxLength100000 andactualLength) over 100,000 - 400
Request blocked(ACTION_NOT_ALLOWED) - 400
Content blocked(CONTENT_BLOCKED), the same on score, evaluate and chat. See Why am I getting 400 'Request blocked'? - 402
Insufficient credits - 429
Rate limit exceeded
Have the prompt?
Use POST /api/evaluate. See How to score an answer and its prompt with POST /api/evaluate.