# whatchuneed Code Execution API

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

Executes source code in a specified programming language (Python, JavaScript, Rust, etc.) and returns stdout, stderr, and exit code

## Facts

- Endpoint: POST https://whatchuneed.vercel.app/api/code/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/whatchuneed-code-execution-api-905bdd21
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HpRmmJZTZyXTxgOFWMz5m

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 whatchuneed-code-execution-api-905bdd21 -d '<json body>'
```

Example prompt: Run this Python script for me and tell 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 untrusted or generated code in a sandboxed remote environment without provisioning local compute. It is well-suited for agent workflows that need to evaluate mathematical expressions, test code snippets, or run scripts across multiple languages (Python, JavaScript, Rust, etc.) on a pay-per-call basis with no setup overhead.

## Known failure modes

- Unsupported language name returns an error or non-zero exit code
- Syntax errors in code surface in stderr with non-zero exitCode
- Infinite loops or long-running code may time out
- Missing required fields (code or language) return a 4xx error
- Runtime exceptions appear in stderr with non-zero exitCode

## How this service works

320+ pay-per-call API endpoints across accommodation, LLM, code execution, crypto, medical, finance, and more. One API, one payment. Powered by x402 protocol.

## Output

Returns an object with stdout (standard output string), stderr (standard error string), exitCode (integer process exit code), language (the language used), and version (runtime version used). A zero exit code indicates successful execution.

## 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"
  },
  "version": {
   "type": "string",
   "description": "Language version (optional)"
  },
  "language": {
   "type": "string",
   "description": "Language name (python, javascript, rust, etc.)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "stderr": {
   "type": "string"
  },
  "stdout": {
   "type": "string"
  },
  "version": {
   "type": "string"
  },
  "exitCode": {
   "type": "integer"
  },
  "language": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/whatchuneed-code-execution-api-905bdd21/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from whatchuneed.vercel.app](https://www.zero.xyz/host/whatchuneed.vercel.app/llms.txt)
