# whatchuneed Code Compare

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

Executes code snippets in multiple programming languages simultaneously and returns stdout, stderr, exit codes, and timing for each, enabling side-by-side language comparison.

## Facts

- Endpoint: POST https://whatchuneed.vercel.app/api/code/compare
- Price: $0.2/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-compare-b3a6fffd
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AgO-t2Y85nBdY6V3AyaHy

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-compare-b3a6fffd -d '<json body>'
```

Example prompt: Run a Fibonacci function in Python, JavaScript, and Go side by side and show me each language's output, any errors, and how long each one took to execute.

## When to prefer this

Choose this endpoint when you need to execute and compare code across multiple programming languages in a single call. It is ideal for benchmarking performance, verifying cross-language correctness, or demonstrating language-specific behavior differences. Prefer it over single-language execution endpoints when the goal is comparative analysis.

## Known failure modes

- Unsupported language identifier causes missing or errored result for that language
- Code with infinite loops may time out and return a non-zero exit code
- Syntax errors surfaced in stderr with non-zero exit code
- Network or sandbox failure returns empty results array
- Malformed input (missing required 'languages' array) causes 400-level error

## 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

An array of results, one per language, each containing: the language name, stdout (printed output), stderr (error output), exit code (0 for success), and execution time in milliseconds. Allows direct side-by-side comparison of behavior and performance across languages.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "languages"
 ],
 "properties": {
  "languages": {
   "type": "array"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "results": {
   "type": "array",
   "items": {
    "type": "object",
    "properties": {
     "stderr": {
      "type": "string"
     },
     "stdout": {
      "type": "string"
     },
     "time_ms": {
      "type": "number"
     },
     "exitCode": {
      "type": "integer"
     },
     "language": {
      "type": "string"
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/whatchuneed-code-compare-b3a6fffd/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)
