Async sandboxed code execution in 60+ languages via Judge0, paid per call on Tempo L2.
What it does
This MPP endpoint wraps the Judge0 code-execution engine behind a Locus MPP payment gateway. The `/judge0/submit-code` path accepts source code and a language ID, queues execution asynchronously in a sandboxed environment, and returns a submission token. You then poll `/judge0/get-submission` with that token to retrieve results (stdout, stderr, execution time, memory usage, status). Over 60 programming languages are supported, including Python 3 (language_id 71), JavaScript (63), C++ (54), and Java (62). Optional parameters let you set CPU/wall-clock time limits, memory and stack limits, compiler flags, command-line arguments, stdin, expected output for auto-grading, stderr redirection, and network access.
Payment is settled via the Tempo method (pathUSD on Tempo L2). The submit-code and execute-code endpoints cost 6,000 base units per call. Assuming the currency uses 6 decimals (consistent with pathUSD), that works out to $0.006 per submission. The get-submission, list-languages, and list-statuses helper endpoints cost 5,000 base units ($0.005) each. All endpoints use POST and require the MPP payment flow — the probe returned 404 on HEAD/GET, which is expected since these are POST-only routes.
The service is part of the broader Locus MPP ecosystem. Additional documentation is referenced at https://beta.paywithlocus.com/mpp/judge0.md and the upstream Judge0 docs at https://judge0.com. No response schema is documented in the OpenAPI spec, so consumers should expect Judge0-standard response shapes (token on submit, full submission object on get).
Capabilities
Use cases
- —AI agents that need to run generated code and verify output
- —Automated grading systems comparing program output against expected results
- —Interactive coding platforms requiring sandboxed multi-language execution
- —CI/CD pipelines that need lightweight, pay-per-use code compilation and testing
- —LLM tool-use workflows where the model writes and tests code iteratively
Fit
Best for
- —Agents needing on-demand code execution without managing infrastructure
- —Pay-per-call usage patterns where a subscription to Judge0 is overkill
- —Multi-language support (Python, JS, C++, Java, and 60+ others)
- —Async submission workflows where you submit then poll for results
Not for
- —Long-running or GPU-intensive workloads (sandbox limits apply)
- —High-throughput batch execution where a self-hosted Judge0 instance would be cheaper
- —Workflows requiring persistent filesystem or database state between calls
Quick start
curl -X POST https://judge0.mpp.paywithlocus.com/judge0/submit-code \
-H "Content-Type: application/json" \
-d '{"source_code": "print(\"Hello, World!\")", "language_id": "71"}'Example
Request
{
"stdin": "",
"language_id": "71",
"source_code": "print('Hello, World!')",
"memory_limit": 128000,
"cpu_time_limit": 5,
"redirect_stderr_to_stdout": true
}Response
{
"token": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}Endpoint
Quality
The OpenAPI spec provides a clear request schema, pricing info, and language examples for all five endpoints. However, no response schema is documented, the probe returned 404 because it used HEAD/GET on a POST-only route (not a sign of failure but liveness is unconfirmed via 402 challenge), and crawled pages returned no useful documentation. The example response is inferred from Judge0's standard behavior, not directly sourced.
Warnings
- —Probe did not capture a 402 MPP challenge because HEAD/GET were used on a POST-only endpoint; liveness not fully confirmed
- —No response schema in the OpenAPI spec — response shape is inferred from upstream Judge0 conventions
- —Price assumes pathUSD with 6 decimals; the currency address 0x20c0… is not independently verified
- —External docs at https://beta.paywithlocus.com/mpp/judge0.md were not crawled
Citations
- —Over 60 programming languages supported with sandboxed isolationhttps://judge0.mpp.paywithlocus.com
- —submit-code and execute-code cost 6000 base units; get-submission, list-languages, list-statuses cost 5000 base units via Tempo methodhttps://judge0.mpp.paywithlocus.com
- —Language IDs include 71 (Python 3), 63 (JavaScript), 54 (C++), 62 (Java)https://judge0.mpp.paywithlocus.com
- —Homepage docs at judge0.com, API reference at ce.judge0.com, LLM docs at beta.paywithlocus.com/mpp/judge0.mdhttps://judge0.mpp.paywithlocus.com