๐Ÿ’ป

Code Execution API

Run code in secure, isolated cloud sandboxes via a simple API call. Python, JavaScript, Bash and more โ€” results back in milliseconds. Powered by E2B secure sandboxes.

API Docs $0.005 / execution

About this tool

Give your AI agents the ability to actually run code. IteraTools spins up an isolated E2B sandbox, executes your code, captures stdout/stderr, and returns the result โ€” all within a single API call. No server setup, no Docker, no security concerns. Each execution runs in a fresh, ephemeral environment.

Quick Start โ€” Run Python

curl -X POST https://api.iteratools.com/code/execute \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "language": "python", "code": "import math\nresult = [math.factorial(n) for n in range(1, 11)]\nprint(result)" }'

Response

{"success": true, "stdout": "[1, 2, 6, 24, 120, 720, 5040, 40320, 362880, 3628800]\n", "stderr": "", "exit_code": 0, "duration_ms": 312}

Supported Languages

๐Ÿ Python ๐ŸŸจ JavaScript (Node.js) ๐Ÿš Bash

Example โ€” Data Analysis with Python

curl -X POST https://api.iteratools.com/code/execute \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{ "language": "python", "code": "data = [23, 45, 67, 12, 89, 34, 56]\nmean = sum(data) / len(data)\nmax_val = max(data)\nmin_val = min(data)\nprint(f\"Mean: {mean:.1f}, Max: {max_val}, Min: {min_val}\")" }'

Details

EndpointPOST /code/execute
Price$0.005 / execution
SandboxE2B (isolated, ephemeral)
LanguagesPython, JavaScript (Node.js), Bash
Outputstdout, stderr, exit_code, duration
AuthBearer token or x402 micropayment
Base URLhttps://api.iteratools.com

Use Cases

  • AI coding agents that need to verify their code actually works
  • Data analysis pipelines with Python scripts
  • Automated testing of generated code snippets
  • LLM-powered tools that calculate, transform, or process data
  • Running scripts without provisioning cloud infrastructure
Full Documentation Browse All Tools