Skip to content

POST /api/submit

{
"language": "python",
"code": "print(2 + 2)",
"stdin": "",
"webhook_url": "https://your-app.com/hooks/judge",
"webhook_secret": "your-hmac-secret"
}
FieldTypeRequiredNotes
languagestringyespython, py, cpp, c++, cxx, java
codestringyesSource code (max 64KB)
stdinstringnoInput data (max 64KB)
webhook_urlstringnoHTTPS URL for result delivery
webhook_secretstringconditionalRequired if webhook_url is set (max 256 bytes)
HTTP 202 Accepted
{
"id": "550e8400-e29b-41d4-a716-446655440000"
}

Poll GET /api/result/{id} for the result.

POST /api/submit?wait=true

Holds the connection until execution completes (max 30s). Returns the full result directly:

{
"id": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"verdict": "AC",
"exit_code": 0,
"stdout": "4\n",
"stderr": "",
"cpu_time": 0.012,
"wall_time": 0.045,
"memory_peak": 8192000
}

If execution doesn’t finish in time: 408 Request Timeout with the submission ID so you can poll.

Send an Idempotency-Key header (UUID) to avoid duplicate submissions:

Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000

If a submission with that key already exists, the existing record is returned with 202.

StatusMeaning
400Invalid language, code too large, missing webhook_secret
401Bad or missing API key
503Queue full - bounded capacity, deliberate backpressure