onlinecompiler.io

Judge0 API: endpoints, language ids and examples

Judge0 is an open-source code execution engine with a small REST API: you send a submission (source code, a language id, and optional input and expected output), get a token, and read back the output and a status id that says what happened. This page covers each call with copy-paste examples, every status id, the language ids and the common errors. The same calls work on OnlineCompiler.io's Judge0-compatible endpoint, free, so you can try them without a RapidAPI subscription or a server of your own.

Where to send Judge0 API calls

The calls are the same wherever Judge0 runs. What changes is the base URL and the header that carries the key:

Where Judge0 runsBase URLKey
Your own server (self-hosted)http://YOUR_SERVER:2358The AUTHN_TOKEN from judge0.conf, in X-Auth-Token (or the header set in AUTHN_HEADER); none if you leave it empty
Judge0 CE on RapidAPIhttps://judge0-ce.p.rapidapi.comYour RapidAPI key in x-rapidapi-key, with x-rapidapi-host: judge0-ce.p.rapidapi.com
OnlineCompiler.io (Judge0-compatible)https://api.onlinecompiler.io/api/judge0Your OnlineCompiler.io API key in X-Auth-Token (or Authorization)

ce.judge0.com holds Judge0's own reference and answers /languages, /statuses and /config_info without a key. Judge0 sells hosted plans on judge0.com, whose plan buttons lead to the same RapidAPI listing; the plans and prices are in Judge0 pricing. The examples below keep the base URL and the key header in one place, so moving between the three changes only those lines.

How a submission works

  1. Create it with POST /submissions and a JSON body. Only source_code and language_id are required; add stdin, expected_output and limits as you need them. The answer is 201 with a token.
  2. Read it with GET /submissions/{token}. While status.id is 1 (In Queue) or 2 (Processing), wait a moment and ask again.
  3. Use the result: status, stdout, stderr, compile_output, message, time and memory.
Terminal
# 1. Create a submission: the answer is a token
curl -X POST "https://api.onlinecompiler.io/api/judge0/submissions" \
  -H "X-Auth-Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language_id": 71, "source_code": "print(int(input()) * 2)", "stdin": "21", "expected_output": "42"}'
# {"token": "6f1c2b9e-0d4a-4a53-9f7e-2b8c1d3e4f50"}

# 2. Get the result by its token; ask again while status.id is 1 or 2
curl "https://api.onlinecompiler.io/api/judge0/submissions/6f1c2b9e-0d4a-4a53-9f7e-2b8c1d3e4f50" \
  -H "X-Auth-Token: YOUR_API_KEY"
GET /submissions/{token}
{
  "token": "6f1c2b9e-0d4a-4a53-9f7e-2b8c1d3e4f50",
  "time": "0.0433",
  "memory": 14980,
  "stdout": "42\n",
  "stderr": null,
  "compile_output": null,
  "message": null,
  "status": { "id": 3, "description": "Accepted" }
}

Those eight fields are what Judge0 returns by default. With expected_output, Judge0 compares it with stdout after removing trailing whitespace from each line and from the end (its code), and answers Accepted (3) or Wrong Answer (4).

Waiting for the result: wait=true

POST /submissions?wait=true holds the request until the run is finished and answers with the submission instead of a token, which saves the polling. A self-hosted Judge0 allows it by default (ENABLE_WAIT_RESULT), but Judge0's docs advise against it because it doesn't scale well, and ce.judge0.com has it switched off ("enable_wait_result": false in /config_info); a server with it switched off answers 400 with wait not allowed. OnlineCompiler.io's endpoint accepts it. Batches never wait.

On OnlineCompiler.io a wait=true request that finds all of the account's runs at once busy is answered 429 instead of waiting: 4 on Free, 8 on Starter, 10 on Pro, 20 on Business and 100 on Platform. A client that sends many at the same moment, such as a training job scoring a batch of completions, should keep its requests in flight at or under that number, or retry a 429 after the seconds in its Retry-After header. Without wait=true, submissions queue up to the account's pending limit (32 on Free) and start as earlier ones finish.

Terminal
curl -X POST "https://api.onlinecompiler.io/api/judge0/submissions?wait=true" \
  -H "X-Auth-Token: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language_id": 71, "source_code": "print(int(input()) * 2)", "stdin": "21", "expected_output": "42"}'
# The finished submission, with the same eight fields as above

base64_encoded

With ?base64_encoded=true, you send source_code, stdin and expected_output base64-encoded, and stdout, stderr, compile_output and message come back encoded. Judge0's docs say to use it when the text has characters JSON can't carry, and to encode all three fields even if only one needs it. On Judge0, reading a result whose output isn't valid UTF-8 without it gets a 400 that tells you to add it. command_line_arguments stays plain text either way, and additional_files is always a base64 zip.

Choosing fields

?fields=status,stdout,time returns only the fields you name, on GET and on POST ... ?wait=true; ?fields=* returns all of them. An unknown name answers 400 with invalid fields: [...].

Judge0 API examples in Python and JavaScript

Both examples create a submission and poll its token, so they work on any Judge0 server, with or without wait. Set JUDGE0_API_KEY to your key first. The Python one uses requests and base64; the JavaScript one runs JavaScript (id 63) on Node.js 18 or later with plain text.

judge0.py
import base64
import os
import time

import requests

BASE_URL = "https://api.onlinecompiler.io/api/judge0"  # or http://YOUR_SERVER:2358
HEADERS = {"X-Auth-Token": os.environ["JUDGE0_API_KEY"]}


def b64(text):
    return base64.b64encode(text.encode()).decode()


def unb64(text):
    return base64.b64decode(text).decode() if text else ""


# 1. Create the submission, with every text field base64-encoded.
res = requests.post(
    f"{BASE_URL}/submissions",
    params={"base64_encoded": "true"},
    headers=HEADERS,
    json={
        "language_id": 71,  # Python
        "source_code": b64("name = input()\nprint(f'Hello, {name}!')"),
        "stdin": b64("Judge0"),
        "expected_output": b64("Hello, Judge0!"),
        "cpu_time_limit": 2,
    },
)
res.raise_for_status()
token = res.json()["token"]

# 2. Poll until the status is past In Queue (1) and Processing (2).
while True:
    time.sleep(0.5)
    result = requests.get(
        f"{BASE_URL}/submissions/{token}",
        params={"base64_encoded": "true", "fields": "status,stdout,stderr,compile_output,time,memory"},
        headers=HEADERS,
    ).json()
    if result["status"]["id"] > 2:
        break

print(result["status"]["description"])  # Accepted
print(unb64(result["stdout"]))  # Hello, Judge0!
errors = unb64(result["compile_output"]) or unb64(result["stderr"])
if errors:
    print(errors)
judge0.mjs
// Node.js 18 or later: save as judge0.mjs and run node judge0.mjs
const BASE_URL = "https://api.onlinecompiler.io/api/judge0"; // or http://YOUR_SERVER:2358
const headers = {
  "X-Auth-Token": process.env.JUDGE0_API_KEY,
  "Content-Type": "application/json",
};

async function judge0(path, options = {}) {
  const res = await fetch(`${BASE_URL}${path}`, { ...options, headers });
  if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
  return res.json();
}

const { token } = await judge0("/submissions", {
  method: "POST",
  body: JSON.stringify({
    language_id: 63, // JavaScript (Node.js)
    source_code: 'const text = require("fs").readFileSync(0, "utf8");\nconsole.log(text.trim().toUpperCase());',
    stdin: "hello, judge0",
    expected_output: "HELLO, JUDGE0",
  }),
});

let result;
do {
  await new Promise((resolve) => setTimeout(resolve, 500));
  result = await judge0(`/submissions/${token}`);
} while (result.status.id <= 2); // In Queue (1) or Processing (2)

console.log(result.status.description); // Accepted
console.log(result.stdout); // HELLO, JUDGE0

Call the API from your server, not from browser code: the key would be visible to anyone who opens the page. For a web page, put a short route on your own server that adds the key; our Judge0-compatible API docs have tested ones for Next.js, Netlify and Cloudflare Workers.

Submission fields

What you can send in a submission, what it does on Judge0 (its reference has the defaults), and how OnlineCompiler.io's endpoint treats it:

FieldOn Judge0On OnlineCompiler.io
source_codeThe program. Required.Up to 100 KB
language_idThe language and version, from GET /languages. Required.Judge0 CE's ids, and Extra CE's for the languages we run; older ids run on the current version (table)
stdinThe program's inputUp to 5 MB
expected_outputCompared with stdout, ignoring trailing whitespace, for Accepted (3) or Wrong Answer (4)Compared the same way, up to 100 KB
cpu_time_limit, wall_time_limitSeconds of CPU time and of wall-clock time; past either, Time Limit Exceeded (5)The lower of the two stops the run, capped at 30 seconds; compiling doesn't count, and 0 means no limit of your own
memory_limitKilobytes of address space for the programA value above 524288 KB raises the run's memory on Pro and above, up to 2097152 KB; a lower one keeps 512 MB
command_line_argumentsArguments for the program, as one stringSplit like a shell command line, up to 32 arguments
redirect_stderr_to_stdoutSends stderr into stdoutThe same
callback_urlWhere Judge0 sends the finished submission (callbacks)The same; a public HTTP(S) address of up to 200 characters, not with wait=true
additional_filesA base64-encoded zip of files to put next to the sourceUnpacked into the working directory, up to 20 files and 1 MB; files in the program's language are compiled with it
compiler_optionsFlags for the compilerAnswers 422 when not empty
enable_networkNetwork access for the program, where the server allows itAnswers 422 when true: programs have no network access
number_of_runs, cpu_extra_time, stack_limit, max_processes_and_or_threads, max_file_sizeMore sandbox settingsAccepted and ignored

And what comes back, besides the token:

  • status: an object with the status id and its description.
  • stdout, stderr and compile_output: the program's output, its errors and the compiler's messages. OnlineCompiler.io keeps up to 64 KB of each stream and says in message when one was cut.
  • message: a short note on the outcome, such as the signal that stopped the program.
  • time and wall_time: seconds, as decimal strings such as "0.0433". On OnlineCompiler.io, time is the wall-clock time of the run command.
  • memory: kilobytes.
  • exit_code, exit_signal, created_at and finished_at, when you ask for them with fields.

Batches

POST /submissions/batch takes {"submissions": [...]} and answers with one item per submission, in order: {"token": "..."}, or that submission's errors if it was invalid. GET /submissions/batch?tokens=a,b,c reads them back as {"submissions": [...]}, with fields and base64_encoded as for one submission. A batch holds up to 20 submissions by default (max_submission_batch_size in /config_info); more, or none, answers 400. On OnlineCompiler.io a batch also holds no more than the account's pending limit (32 on Free), and it is admitted whole or not at all. Sending each test of a problem as one submission of a batch is the usual way to judge a whole test set:

batch.py
import os
import time

import requests

BASE_URL = "https://api.onlinecompiler.io/api/judge0"
HEADERS = {"X-Auth-Token": os.environ["JUDGE0_API_KEY"]}

code = """#include <iostream>
int main() { long long a, b; std::cin >> a >> b; std::cout << a + b << std::endl; }"""
tests = [("1 2", "3"), ("-5 5", "0"), ("2000000000 2000000000", "4000000000")]

# One submission per test: a batch holds up to 20.
res = requests.post(
    f"{BASE_URL}/submissions/batch",
    headers=HEADERS,
    json={"submissions": [
        {"language_id": 54, "source_code": code, "stdin": stdin, "expected_output": expected}
        for stdin, expected in tests
    ]},
)
res.raise_for_status()
# Each item is {"token": ...}, or that submission's errors if it was invalid.
tokens = ",".join(item["token"] for item in res.json())

while True:
    time.sleep(1)
    results = requests.get(
        f"{BASE_URL}/submissions/batch",
        params={"tokens": tokens, "fields": "token,status,time,memory"},
        headers=HEADERS,
    ).json()["submissions"]
    if all(r["status"]["id"] > 2 for r in results):
        break

for r in results:
    print(r["status"]["description"], r["time"], r["memory"])  # Accepted 0.0192 7116 ...

Callbacks

With callback_url, you don't have to poll. When the run finishes, Judge0 sends the submission's default fields, base64-encoded, to that URL with a PUT, and tries up to CALLBACKS_MAX_TRIES times (3 by default). OnlineCompiler.io sends the same PUT, and tries again when your server can't be reached or answers with a status other than 2xx. Your handler should decode stdout, stderr, compile_output and message, and match the submission by its token.

Judge0 code rewards for GRPO training (ms-swift)

ms-swift, ModelScope's training framework, has a code reward for GRPO, external_code_reward_by_judge0. It runs the code in each completion against the dataset's test cases on a Judge0 server, as one wait=true submission per test case. It reads the server from two environment variables, so pointing it at OnlineCompiler.io needs no change to its code:

Terminal
JUDGE0_ENDPOINT=https://api.onlinecompiler.io/api/judge0 \
JUDGE0_X_AUTH_TOKEN="$OC_API_KEY" \
swift rlhf \
    --rlhf_type grpo \
    --external_plugins examples/train/grpo/plugin/plugin.py \
    --reward_funcs external_code_reward_by_judge0 external_code_format \
    --dataset 'open-r1/verifiable-coding-problems-python-10k' \
    --num_generations 14 \
    ...

Its language map uses Judge0's ids. Python is 71, which runs Python 3.14 here, and every language in the map runs except Python 2, plain text, executables and multi-file programs. A test case's expected output matches with or without its final newline.

The reward sends the submissions for all the completions it is scoring at the same moment, and it scores a completion 0 when a submission is refused instead of retrying (ms-swift issue #10613). So keep the completions scored at once, counting every training process, at or under your plan's runs at once (4 on Free, 8 on Starter, 10 on Pro, 20 on Business and 100 on Platform), or the rewards will be wrong without any error. Count the runs too: one epoch of 10,000 problems with 14 completions each and a few test cases per problem is several hundred thousand runs.

Status ids

Judge0 has 14 statuses, listed by GET /statuses. Ids 1 and 2 mean the run isn't finished; every other id is final.

IdStatusWhat it means
1In QueueWaiting for a worker. Ask again.
2ProcessingRunning. Ask again.
3AcceptedThe program exited with code 0 and, if you sent expected_output, its output matched.
4Wrong AnswerThe program exited with code 0, but its output didn't match expected_output.
5Time Limit ExceededIt ran past cpu_time_limit or wall_time_limit.
6Compilation ErrorThe code didn't compile. The compiler's messages are in compile_output.
7Runtime Error (SIGSEGV)Stopped by signal 11, a segmentation fault: an invalid memory access, such as a bad pointer, an index out of bounds or a stack overflow from deep recursion.
8Runtime Error (SIGXFSZ)Stopped by signal 25: it went over the file size limit (max_file_size).
9Runtime Error (SIGFPE)Stopped by signal 8: an arithmetic error, usually integer division by zero.
10Runtime Error (SIGABRT)Stopped by signal 6: the program aborted, as a failed assert or an uncaught C++ exception does.
11Runtime Error (NZEC)It exited with a non-zero exit code, as an uncaught exception does in Python, Java or JavaScript. The error is in stderr.
12Runtime Error (Other)Stopped by another signal; exit_signal says which.
13Internal ErrorThe run failed on the judge's side, not because of the program; message says why.
14Exec Format ErrorThe sandbox couldn't execute the program file.

On OnlineCompiler.io's endpoint:

  • A submission stays In Queue (1) until it finishes. Processing (2) and Exec Format Error (14) are never returned.
  • Compilation Error (6) comes with compile_output for C, C++, C#, Go, Rust, Haskell, Fortran, Visual Basic, Kotlin, Swift, COBOL, Pascal, Assembly, OCaml, D, FreeBASIC, Scala and Objective-C, which compile before the run. The other languages compile or check code as they run, so their compile errors are Runtime Error (NZEC) with the message in stderr.
  • Time Limit Exceeded (5) also comes at the 30-second cap.
  • SIGXFSZ (8) means the program printed more than 8 MB.
  • Judge0 has no Memory Limit Exceeded status, and neither does this endpoint: here, a program stopped at its memory limit gets 12 with exit_signal 9.

How each status is decided here, case by case, is in the Judge0 migration guide.

Language ids

Each language_id is one language at one version. On Judge0 CE, GET /languages lists its 71 ids and GET /languages/{id} describes one; OnlineCompiler.io's /languages lists the newest id for each language, and /languages/all the older ones too. This table has every Judge0 CE id that runs on OnlineCompiler.io (67 of the 71), the newest first, with Judge0 CE's version for each id (its list) and the version it runs on here. An older id runs on the current version, so code written for it usually runs unchanged.

LanguageJudge0 CE ids (Judge0's version)Runs here on
Python113 (3.14.0), 109 (3.13.2), 100 (3.12.5), 92 (3.11.2), 71 (3.8.1)Python 3.14(python-3.14)
C103 (GCC 14.1.0), 50 (GCC 9.2.0), 49 (GCC 8.3.0), 48 (GCC 7.4.0), 110 (Clang 19.1.7), 104 (Clang 18.1.8), 75 (Clang 7.0.1)C GCC 15(gcc-15)
C++105 (GCC 14.1.0), 54 (GCC 9.2.0), 53 (GCC 8.3.0), 52 (GCC 7.4.0), 76 (Clang 7.0.1)C++ G++ 15(g++-15)
Java91 (JDK 17.0.6), 62 (OpenJDK 13.0.1)Java OpenJDK 25(openjdk-25)
C#51 (Mono 6.6.0.161)C# .NET SDK 10(dotnet-csharp-10)
F#87 (.NET Core SDK 3.1.202)F# .NET SDK 10(dotnet-fsharp-10)
Go107 (1.23.5), 106 (1.22.0), 95 (1.18.5), 60 (1.13.5)Go 1.26(go-1.26)
Rust108 (1.85.0), 73 (1.40.0)Rust 1.93(rust-1.93)
PHP98 (8.3.11), 68 (7.4.1)PHP 8.5(php-8.5)
Ruby72 (2.7.0)Ruby 4.0(ruby-4.0)
Haskell61 (GHC 8.8.1)Haskell GHC 9.12(haskell-9.12)
TypeScript101 (5.6.2), 94 (5.0.3), 74 (3.7.4)TypeScript Deno(typescript-deno)
JavaScript102 (Node.js 22.08.0), 97 (Node.js 20.17.0), 93 (Node.js 18.15.0), 63 (Node.js 12.14.0)JavaScript Node.js 24(nodejs-24)
SQL82 (SQLite 3.27.2)SQL SQLite 3(sqlite-3)
Bash46 (5.0.0)Bash 5.2(bash-5.2)
Fortran59 (GFortran 9.2.0)Fortran gfortran 15(gfortran-15)
Visual Basic.Net84 (vbnc 0.0.0.5943)Visual Basic .NET SDK 10(dotnet-vbnet-10)
Kotlin111 (2.1.10), 78 (1.3.70)Kotlin 2.4(kotlin-2.4)
R99 (4.4.1), 80 (4.0.0)R 4.6(r-4.6)
Swift83 (5.2.3)Swift 6.4(swift-6.4)
COBOL77 (GnuCOBOL 2.2)COBOL GnuCOBOL 3.2(gnucobol-3.2)
Perl85 (5.28.1)Perl 5.44(perl-5.44)
Pascal67 (FPC 3.0.4)Pascal Free Pascal 3.2(fpc-3.2)
Octave66 (5.1.0)Octave 11(octave-11)
Assembly45 (NASM 2.14.02)Assembly NASM 3(nasm-3)
Lua64 (5.3.5)Lua 5.5(lua-5.5)
OCaml65 (4.09.0)OCaml 5.4(ocaml-5.4)
Common Lisp55 (SBCL 2.0.0)Common Lisp SBCL 2.6(sbcl-2.6)
Erlang58 (OTP 22.2)Erlang OTP 29(erlang-29)
Elixir57 (1.9.4)Elixir 1.20(elixir-1.20)
Prolog69 (GNU Prolog 1.4.5)Prolog SWI-Prolog 10(swipl-10)
D56 (DMD 2.089.1)D LDC 1.43(ldc-1.43)
Basic47 (FBC 1.07.1)FreeBASIC 1.10(fbc-1.10)
Dart90 (2.19.2)Dart 3.13(dart-3.13)
Clojure86 (1.10.1)Clojure 1.12(clojure-1.12)
Groovy88 (3.0.3)Groovy 6.0(groovy-6.0)
Scala112 (3.4.2), 81 (2.13.2)Scala 3.10(scala-3.10)
Objective-C79 (Clang 7.0.1)Objective-C Clang 21(clang-objc-21)
Plain Text43Nothing runs: the output is the source as sent

Not run here: Executable (44), Python 2.7 (70), Multi-file program (89) and JavaFX (96); those answer 422. Judge0 Extra CE's ids work at the same base URL for the languages we run: Python for ML (33, 32, 31, 25, 10), C (1, 13), C++ (2, 14), Java (4), C# (30, 29, 21, 22), F# (24), Visual Basic.Net (20) and Nim (9). Not run: C3 (3), the Java, C++ and C# test runners (5, 12, 15 and 23), MPI (6, 7 and 8), Bosque (11), PyPy (26, 27 and 28) and Multi-file program (89). Judge0 CE's /languages/all also lists archived ids from 1 to 42, which Judge0 CE refuses; on OnlineCompiler.io, ids 1 to 33 are Extra CE's. The migration guide notes where a current version behaves differently from an old one.

Common errors

Judge0's messages are quoted as it sends them. OnlineCompiler.io sends every error other than 422 as {"error": "..."}.

HTTP statusOn Judge0On OnlineCompiler.io
400wait not allowed, invalid fields: [...], an empty or oversized batch, or output that can't be sent as UTF-8 (use base64_encoded=true)Invalid JSON, invalid fields: [...], or an empty or oversized batch
401Authentication is on and X-Auth-Token is missing or wrong (empty body)Not used
403The client's IP address isn't allowedNo key sent (Missing Authorization header), a widget or WebSocket key instead of an API key, or a request from an address the key doesn't allow
404No submission has that tokensubmission not found (a token of another account, or a mistyped one), or Invalid or inactive API key
413Not in Judge0's own docsThe request body is over 32 MB
422The submission is invalid. The body maps each field to its messages, such as {"language_id": ["language with id 3 doesn't exist"]} or {"source_code": ["can't be blank"]}. OnlineCompiler.io also answers it for compiler_options, enable_network, and a callback_url with wait=true.
429Not in Judge0's own docsAn account limit: runs per minute, pending runs, runs at once or the month's runs. Retry later, with backoff.
503queue is full, or the server is in maintenance modeThe run couldn't be queued. Retry.

Try the Judge0 API free

To try these calls without a RapidAPI subscription or a server, point the examples at https://api.onlinecompiler.io/api/judge0 and send an OnlineCompiler.io API key in X-Auth-Token. The Free plan gives 100,000 runs a month, commercial use included, and GET /languages and GET /statuses need no key. Get a key as the docs describe. Submissions, tokens, wait=true, base64_encoded, fields, batches, callbacks and status ids work as above; the Judge0-compatible API reference lists every difference (there is no listing or deleting submissions, no /config_info, and no compiler_options), and the migration guide covers moving an existing integration. To judge against tests kept on the server instead of sending expected_output each time, see stored problems, or how to build an online judge for the whole flow.

Frequently asked questions

What is Judge0?

Judge0 is an open-source (GPL-3.0) code execution system with a REST API: you send source code and a language id, and it compiles and runs the code in a sandbox and returns the output, run time, memory and a status such as Accepted or Wrong Answer. Online judges, coding courses and assessment tools use it to run other people's code.

How do I get a Judge0 API key?

It depends on where Judge0 runs. A self-hosted Judge0 checks the AUTHN_TOKEN you set in judge0.conf, sent in X-Auth-Token (with none set, it needs no key); Judge0 CE on RapidAPI takes your RapidAPI key in x-rapidapi-key; and OnlineCompiler.io's Judge0-compatible endpoint takes a free OnlineCompiler.io API key in X-Auth-Token, or in x-rapidapi-key for code written for RapidAPI, which then changes only its base URL and key.

What is JUDGE0_API_KEY?

Judge0 has no setting by that name. It is a name for the environment variable that holds your key in your own code, as in the examples on this page; keep it on your server, because a key in browser code can be read by anyone who opens the page.

Is there a free Judge0 API?

Judge0 itself is free to self-host, on servers you run, and its own hosted plans on judge0.com and RapidAPI are priced by daily submission quotas. OnlineCompiler.io's Judge0-compatible endpoint takes the same calls free, up to 100,000 runs a month with commercial use included.

How much does the Judge0 API cost?

Self-hosting costs only your servers and their upkeep. Judge0's hosted plans on judge0.com start at €27 a month for 2,000 submissions a day, with each submission past the quota at €0.001; every plan, with the RapidAPI prices, is in our Judge0 pricing comparison.

What is the difference between Judge0 CE and Judge0 Extra CE?

They are two editions of Judge0 with the same API and different languages. Judge0 CE (ce.judge0.com) has the common languages under ids 43 to 113; Extra CE (extra-ce.judge0.com) has others, such as Python for ML, Nim, MPI and test runners, mostly under ids 1 to 33.

Where is the Judge0 API documentation?

Judge0's own reference is at ce.judge0.com, and a self-hosted Judge0 serves its docs at http://YOUR_SERVER:2358/docs. This page is a working summary with examples; OnlineCompiler.io's endpoint and how it differs from Judge0 are documented at /docs/judge0.

How do I run Judge0 with Docker?

Judge0 v1.13.1 ships as a Docker Compose release: unzip it, set the Redis and PostgreSQL passwords (and an AUTHN_TOKEN) in judge0.conf, start the db and redis services and then the rest, and the API answers on port 2358. The host must be Linux booted with cgroup v1 and allow privileged containers; our self-hosting guide has every step.

What is the Judge0 language id for Python, C++ or Java?

On Judge0 CE, Python (3.14.0) is 113 and Python (3.8.1) is 71; C++ (GCC 14.1.0) is 105 and C++ (GCC 9.2.0) is 54; Java (JDK 17.0.6) is 91 and Java (OpenJDK 13.0.1) is 62. GET /languages lists every id, and the table on this page has them all.

What does Judge0 status 11 (NZEC) mean?

Runtime Error (NZEC) means the program exited with a non-zero exit code, which is what an uncaught exception does in Python, Java or JavaScript. The error message is in stderr.

Does the Judge0 API support wait=true?

Judge0 answers POST /submissions?wait=true with the finished submission when the server allows it (ENABLE_WAIT_RESULT, on by default when self-hosted), but its docs advise against it at scale and ce.judge0.com has it switched off, so most clients poll. OnlineCompiler.io's Judge0-compatible endpoint accepts wait=true.

How many Judge0 submissions can run at once?

On a self-hosted Judge0, as many as its workers take (Judge0's COUNT and MAX_QUEUE_SIZE); further ones wait in its queue. On OnlineCompiler.io's endpoint it is the plan's runs at once: 4 on Free, 8 on Starter, 10 on Pro, 20 on Business and 100 on Platform. Submissions sent without wait=true queue up to the pending limit; a wait=true request that finds every run busy gets 429, so cap your requests in flight or retry after the seconds in its Retry-After header.

Can ms-swift's Judge0 code reward use OnlineCompiler.io?

Yes. Set JUDGE0_ENDPOINT to https://api.onlinecompiler.io/api/judge0 and JUDGE0_X_AUTH_TOKEN to your OnlineCompiler.io API key, and add external_code_reward_by_judge0 to --reward_funcs; Python (id 71) runs Python 3.14. The reward scores a completion 0 when its submission is refused, so keep the completions scored at once at or under your plan's runs at once (4 on Free, 8 on Starter, 10 on Pro, 20 on Business and 100 on Platform).

How many submissions fit in a Judge0 batch?

Up to 20 by default (Judge0's MAX_SUBMISSION_BATCH_SIZE). OnlineCompiler.io's endpoint also takes up to 20, and no more than the account's pending limit (32 on Free).