How to call ClearRun from n8n (HTTP Request node)
Add an HTTP Request node that sends POST https://api.clearrun.net/api/evaluate with an Authorization: Bearer header and a JSON body with responseText. The score is at verdict.score in the output.
Last updated
Steps
Add an HTTP Request node
Method
POST, URLhttps://api.clearrun.net/api/evaluate.Set the key
Use a Header Auth credential with name
Authorizationand valueBearer YOUR_CLEARRUN_API_KEY. Keep it in n8n credentials, not in the node.Send the body
Turn on Send Body, choose JSON, and add two fields:
promptandresponseText. Map each to the field in your data that holds the question and the answer.Use the result
Next nodes can read
{{ $json.verdict.score }}and{{ $json.verdict.verdictId }}.
Rate limits
On 429, turn on the node's retry option with a wait, or add a Wait node. See How to retry when ClearRun returns 429.