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

  1. Add an HTTP Request node

    Method POST, URL https://api.clearrun.net/api/evaluate.

  2. Set the key

    Use a Header Auth credential with name Authorization and value Bearer YOUR_CLEARRUN_API_KEY. Keep it in n8n credentials, not in the node.

  3. Send the body

    Turn on Send Body, choose JSON, and add two fields: prompt and responseText. Map each to the field in your data that holds the question and the answer.

  4. 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.