{"uid":"cap_N1DNal15OFjMZHPsTKG-_","slug":"judge0-submit-code-b2f2a925","name":"Judge0 Submit Code (Async)","description":"Submit code for asynchronous execution. Returns a token immediately — use get-submission to poll for results. Use this instead of execute-code for long-running programs that may time out.","url":"https://judge0.mpp.paywithlocus.com/judge0/submit-code?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["source_code","language_id"],"properties":{"stdin":{"type":"string","description":"Standard input for the program"},"language_id":{"type":"integer","description":"Language ID (e.g., 71 for Python 3, 63 for JavaScript, 54 for C++, 62 for Java). Use list-languages to find IDs."},"source_code":{"type":"string","description":"Program source code to execute"},"stack_limit":{"type":"number","description":"Stack size limit in kilobytes"},"memory_limit":{"type":"number","description":"Memory limit in kilobytes"},"cpu_time_limit":{"type":"number","description":"CPU time limit in seconds (default: instance-dependent)"},"enable_network":{"type":"boolean","description":"Allow network access inside the sandbox"},"expected_output":{"type":"string","description":"Expected output — if provided, status will indicate whether output matches"},"wall_time_limit":{"type":"number","description":"Wall clock time limit in seconds"},"compiler_options":{"type":"string","description":"Compiler flags (max 512 chars, e.g., \"-O2 -Wall\")"},"command_line_arguments":{"type":"string","description":"Command-line arguments passed to the program (max 512 chars)"},"redirect_stderr_to_stdout":{"type":"boolean","description":"Redirect stderr to stdout in the output"}},"additionalProperties":true},"responseSchema":null,"example":{"request":{"stdin":"5 3","language_id":"71","source_code":"print(sum(map(int, input().split())))","expected_output":"8"},"response":{"data":{"token":"914f7b3b-b6e8-4aba-bc1a-3038470c6e7d"},"success":true}},"exampleRequest":{"stdin":"5 3","language_id":"71","source_code":"print(sum(map(int, input().split())))","expected_output":"8"},"tags":["code-execution","sandbox","programming-languages","compute"],"displayCostAmount":"0.006","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":1,"rating":{"score":"1.00","successRate":"1.00","reviews":1,"stars":"5.0","state":"rated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.006/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.006","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.006","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_bLq23xJ1YfKLtKTUncXwr","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.006","costPer":"request","priority":0,"asset":"0x20c000000000000000000000b9537d11c60e8b50","unit":"request","depositMicros":null,"planRef":null}],"brandName":"Judge0","brandSlug":"judge0","brandBaseUrl":"https://judge0.com","brandDocsUrl":"https://ce.judge0.com","whatItDoes":"Asynchronously submits source code for sandboxed execution in 60+ programming languages and returns a token to retrieve the result","exampleAgentPrompt":"Run this Python 3 code asynchronously in a sandbox and give me back the submission token so I can check the result: the code reads two integers from stdin and prints their sum, with stdin set to '5\\n3\\n' and expected output '8'.","exampleUseCases":null,"resultDescription":"Returns a JSON object with a submission token (UUID string) that can be used with the Get Submission endpoint to poll for execution results including stdout, stderr, status, and timing/memory metrics.","failureModes":["Invalid language_id returns 422 Unprocessable Entity","Missing required source_code field returns 400 Bad Request","Code exceeds cpu_time_limit results in Time Limit Exceeded status on retrieval","Code exceeds memory_limit results in Memory Limit Exceeded status on retrieval","Compilation errors are captured and returned as compiler output on retrieval","Network errors or sandbox unavailability return 5xx errors"],"whenToPreferThis":"Use this endpoint when you need asynchronous code execution and will poll for the result separately using the returned token — ideal for longer-running programs, batch workflows, or when you want to decouple submission from result retrieval. Prefer the synchronous Execute Code endpoint when you need an immediate response in a single call.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":2,"lastUsedAt":"2026-06-10T22:49:04.924Z","lastSuccessfullyRanAt":"2026-06-10T22:49:04.924Z","lastHealthCheckAt":"2026-10-10T12:33:41.381Z","isFirstParty":false,"canonicalSlug":"judge0-submit-code-b2f2a925"}