# Crucible Code Execution API

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

Executes source code in 60+ programming languages and returns stdout, stderr, and exit code

## Facts

- Endpoint: POST https://crucible-lovat.vercel.app/api/execute
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/crucible-code-execution-api-1cef6f61
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_B2ZhWxRgEee0jTMduixnH

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-execution-api-1cef6f61 -d '<json body>'
```

Example prompt: Run this Python snippet for me and show me what it prints: `import math; print(math.factorial(10))`

## When to prefer this

Choose this endpoint when an AI agent needs to dynamically execute code snippets across a wide variety of programming languages without maintaining local runtimes. Ideal for running user-provided code, verifying algorithmic logic, evaluating expressions, or testing functions in sandboxed environments. Particularly useful when the required language is one of the 60+ supported languages and a pay-per-use model via x402 on Base is acceptable.

## Known failure modes

- Unsupported language returns an error or empty response
- Code with syntax errors returns non-zero exit code with stderr populated
- Infinite loops or long-running code may time out
- Missing required 'code' or 'language' fields returns validation error
- Payment failure on Base chain blocks the request
- Runtime crash returns success:false with error details in stderr

## How this service works

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

## Output

A JSON object with a success boolean and a data object containing stdout, stderr, exit code, the language used, and the runtime version that executed the code.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "code",
  "language"
 ],
 "properties": {
  "code": {
   "type": "string",
   "description": "Source code to execute"
  },
  "stdin": {
   "type": "string",
   "description": "Standard input (optional)"
  },
  "version": {
   "type": "string",
   "description": "Language version (optional, defaults to latest)"
  },
  "language": {
   "type": "string",
   "description": "Programming language (e.g. python, javascript, rust)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "success"
 ],
 "properties": {
  "data": {
   "type": "object",
   "properties": {
    "code": {
     "type": "number"
    },
    "output": {
     "type": "string"
    },
    "stderr": {
     "type": "string"
    },
    "stdout": {
     "type": "string"
    },
    "version": {
     "type": "string"
    },
    "language": {
     "type": "string"
    }
   }
  },
  "success": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/crucible-code-execution-api-1cef6f61/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)
