# Crucible Code Test Runner

> Crucible Code Test Runner is a paid API for AI agents from crucible-lovat.vercel.app, paid per call via x402, $0.15/call, status unknown (last checked 2026-09-14).

Executes source code against an array of test cases in a specified programming language and returns pass/fail results

## Facts

- Endpoint: POST https://crucible-lovat.vercel.app/api/test
- Price: $0.15/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crucible-code-test-runner-133b96a6
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ApMIus3yC6AvHNCvMQHsT

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability crucible-code-test-runner-133b96a6 -d '<json body>'
```

Example prompt: Run this Python function against these 3 test cases and tell me how many pass: def add(a, b): return a + b — test cases are [{"input": [1, 2], "expected": 3}, {"input": [0, 0], "expected": 0}, {"input": [-1, 5], "expected": 4}].

## When to prefer this

Use this endpoint when you need to execute and test code snippets in any of 60+ supported programming languages against structured test cases, especially in an agent workflow that requires code correctness verification. Prefer this over generic code execution endpoints when you specifically need pass/fail test result aggregation with per-test details.

## Known failure modes

- Unsupported language specified — endpoint supports 60+ languages but not all
- Malformed code causing syntax errors in the sandbox
- Empty or invalid test cases array causing validation failure
- Network or sandbox timeout for long-running code
- Payment failure via x402 on Base chain resulting in 402 response

## How this service works

7 endpoints for code execution in 60+ languages. Pay per request via x402 on Base chain.

## Output

Returns a JSON object with a success boolean and a data object containing: total number of tests, number passed, number failed, per-test result array, and the language used.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "code",
  "tests",
  "language"
 ],
 "properties": {
  "code": {
   "type": "string",
   "description": "Source code to test"
  },
  "tests": {
   "type": "array",
   "description": "Array of test cases"
  },
  "language": {
   "type": "string",
   "description": "Programming language"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "success"
 ],
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "total": {
     "type": "number"
    },
    "failed": {
     "type": "number"
    },
    "passed": {
     "type": "number"
    },
    "results": {
     "type": "array"
    },
    "language": {
     "type": "string"
    }
   }
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crucible-code-test-runner-133b96a6/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crucible-lovat.vercel.app](https://www.zero.xyz/host/crucible-lovat.vercel.app/llms.txt)
