How to use ClearRun
Use the free npm packages to build ClearRun into your app or tests. Use the hosted API to score answers you already have. Use chat to get an answer and its score in one step. Real scores come only from the hosted service.
Last updated
Pick a path
| npm packages | Hosted API | Chat | |
|---|---|---|---|
| What it is | @clearrun/sdk, @clearrun/cli and @clearrun/mcp | api.clearrun.net scores text you send | ClearRun asks a model, then scores the answer |
| Cost | Free | At least 3 credits | At most 4 credits per turn |
| What you need | Nothing for mock mode | An account and an API key. A verified free account can create one | An account. Site chat is any plan. API chat can use that key |
| Real scores | No. Mock mode returns local test values | Yes | Yes |
| Signed and receipted | No. Mock verdicts are unsigned | Yes, each successful call | Yes, each successful call |
The SDK and CLI are the usual way to call the hosted API. Current prices are on the pricing page.
Which one should I use?
- Building ClearRun into an app or tests: start with the SDK in mock mode. Add an API key when you need real scores.
- You already have answers: send them to
POST /api/score, or toPOST /api/evaluatewith the question that produced them. - You want an answer and a score in one step: use chat.
Score or look up
Scoring sends text and returns a new score. Looking up takes a verdict id you already have and checks its record. A lookup does not score anything.
On the command line, clearrun score scores text and clearrun verify looks up a verdict id. Install it with npm install -g @clearrun/cli.