ClearRun API help
Call the hosted API directly: auth, score, evaluate, chat, verify and exports. A verified free account can create one developer key.
Last updated
Start here
How to authenticate ClearRun API requests
Send your API key as Authorization: Bearer crun_.... A verified free account can create one developer key. Paid plans can turn API access off.
How to score text with POST /api/score
Send POST /api/score with the answer as responseText and your key. You get back verdict and receipt. Use it when you have the answer but not the prompt.
How to score an answer and its prompt with POST /api/evaluate
Send POST /api/evaluate with responseText and, if you have it, the prompt that produced it. The answer must be 10 to 100,000 characters. Steps inside.
How to look up a verdict with GET /api/verify/{verdictId}
GET /api/verify/{verdictId} looks up a ClearRun verdict with no key and no credits. It returns verified, the checks, the receipt and the verdict. More inside.
All API articles
How to authenticate ClearRun API requests
Send your API key as Authorization: Bearer crun_.... A verified free account can create one developer key. Paid plans can turn API access off.
How to score text with POST /api/score
Send POST /api/score with the answer as responseText and your key. You get back verdict and receipt. Use it when you have the answer but not the prompt.
How to score an answer and its prompt with POST /api/evaluate
Send POST /api/evaluate with responseText and, if you have it, the prompt that produced it. The answer must be 10 to 100,000 characters. Steps inside.
How to call ClearRun chat with POST /api/chat
Send POST /api/chat with a question as message. ClearRun writes an answer, scores it, and returns responseText, verdict, receipt and a sessionId. Steps inside.
How to continue a ClearRun chat conversation (sessionId and context)
To continue a ClearRun chat, send the sessionId from the last reply with your next message. You can also pass earlier turns in context. ClearRun help.
How to look up a verdict with GET /api/verify/{verdictId}
GET /api/verify/{verdictId} looks up a ClearRun verdict with no key and no credits. It returns verified, the checks, the receipt and the verdict. More inside.
Where are ClearRun's public signing keys? (/.well-known/jwks.json)
ClearRun's public Ed25519 signing keys are at api.clearrun.net/.well-known/jwks.json. Match a receipt's keyId to a key's kid to check the receipt's signature.
How to check a workspace's whole receipt chain (GET /api/verify/chain)
GET /api/verify/chain?workspaceId= checks every receipt link in a ClearRun workspace and returns intact, length, head and links. It needs your key or a session.
How to export a workspace's receipts (GET /api/audit/export)
GET /api/audit/export returns one JSON bundle with a workspace's receipts, chain head and public keys, to check offline. Needs Business or Enterprise.
How to choose which workspace a receipt goes to (workspaceId)
Add workspaceId to a score, evaluate or chat request. The receipt is written to that workspace's chain. Step-by-step help from the ClearRun help center.
What does a ClearRun API response look like?
Score and evaluate return { verdict, receipt }. Chat returns responseText, verdict, receipt and a sessionId. Errors return { error, code }. ClearRun help.
How to call the ClearRun API from Python
Use requests (or any HTTP client) to POST to https://api.clearrun.net/api/score or /api/evaluate with your key in the Authorization header. Steps inside.
Is there an OpenAPI spec for the ClearRun API?
ClearRun has no OpenAPI spec yet. The API is documented at api.clearrun.net/docs and in this help center, and @clearrun/core-types has the types. More inside.
Other topics
- Get started with ClearRun
- What the ClearRun score means
- ClearRun API, CLI, SDK, and MCP
- ClearRun signed receipts
- ClearRun plans and credits
- ClearRun privacy and data
- ClearRun limits and errors
- ClearRun CLI help
- ClearRun SDK help
- ClearRun MCP help
- ClearRun API key help
- Use ClearRun with other tools
- ClearRun best practices