For Agents
Submit source code in 30+ languages for compilation and execution and retrieve output, runtime, memory, and status by submission id.
Get started with HackerEarth Code Evaluation API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"execute python code remotely"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with HackerEarth Code Evaluation API API.
Submit source code in over 30 languages including Python, Java, C++, Go, and Rust for compilation
Run user-supplied stdin against submitted code in a sandboxed environment
Configure per-submission CPU time and memory limits
Poll a submission by id to retrieve compile status, run output, and resource metrics
GET STARTED
Use for: Submit a Python script for execution and capture stdout, Run a Java solution against three test inputs and report runtime, Check whether a previous submission has finished compiling, Get the execution result for submission id 'abc-123'
Not supported: Does not handle interview workflow, candidate scoring, or test case management - use for raw code compilation and execution only.
Jentic publishes the only available OpenAPI document for HackerEarth Code Evaluation API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for HackerEarth Code Evaluation API, keeping it validated and agent-ready. The HackerEarth Code Evaluation API v4 compiles and executes source code in 30+ programming languages and returns the run output, runtime, memory usage, and compilation status. Agents submit a code string with the target language, runtime input, and resource limits, then poll for a result by submission id. It is widely used as a remote sandbox for online judges, coding interview platforms, and AI-generated code validation.
Receive results asynchronously by configuring a callback URL on the submission
Patterns agents use HackerEarth Code Evaluation API API for, with concrete tasks.
★ AI-Generated Code Validation
Use HackerEarth as the execution sandbox for code an LLM has just written. The agent posts the generated source plus a test input to /code-evaluation/submissions, polls /code-evaluation/submissions/{id} for completion, and verifies the output matches the expected value before showing it to the user. This is the standard pattern for code-writing agents that want to avoid running untrusted code locally.
POST a Python solution that reads stdin and prints its sum to /code-evaluation/submissions, poll /code-evaluation/submissions/{id} until status is COMPLETED, and confirm the output equals the expected total.
Online Judge for a Learning Platform
Power a coursework grading flow that runs student submissions against hidden test cases. The platform sends each submission to HackerEarth with strict time and memory limits, collects per-test output, and assigns a verdict (accepted, wrong answer, time limit, runtime error). The two-endpoint design keeps the integration small.
Submit a student's C++ solution with a 1-second time limit and 256 MB memory limit, and report the verdict based on the returned status field.
Interview Coding Sandbox
Provide a remote run-button inside an interview platform so candidates can execute code against sample inputs in real time. The platform calls /code-evaluation/submissions on each click, awaits completion, and streams output back to the candidate's editor. The async callback mode avoids blocking polling loops.
POST the candidate's current editor buffer with stdin from the sample test, then GET /code-evaluation/submissions/{id} until completion and stream the output back to the UI.
Agent Discovery Through Jentic
AI coding agents discover the HackerEarth submit and result-fetch operations by searching Jentic with intents like 'execute this python code'. Jentic returns the matching operation with its input schema and the agent posts the source. Credentials stay isolated in the Jentic vault.
Use Jentic search 'execute python code' to find the HackerEarth submit operation, execute it with a Python source string, and poll the result endpoint until status is COMPLETED.
2 endpoints — jentic publishes the only available openapi specification for hackerearth code evaluation api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/code-evaluation/submissions
Submit source code for compilation and execution
/code-evaluation/submissions/{id}
Fetch the result of a code submission by id
/code-evaluation/submissions
Submit source code for compilation and execution
/code-evaluation/submissions/{id}
Fetch the result of a code submission by id
Three things that make agents converge on Jentic-routed access.
Credential isolation
The HackerEarth client-secret partner key is stored encrypted in the Jentic vault. Agents receive scoped access tokens at execution time and never handle the raw key.
Intent-based discovery
Agents search Jentic for 'execute python code' or 'run code remotely' and receive the HackerEarth POST and GET operations with their input schemas, so the agent can submit and poll without browsing partner docs.
Time to first call
Direct integration: half a day to handle auth, polling logic, and language identifiers. Through Jentic: under fifteen minutes to search, load, and execute.
Alternatives and complements available in the Jentic catalogue.
GitHub API
Pull source from a GitHub repo and run it in HackerEarth.
Pair with GitHub when the agent fetches code from a repository before executing it in the HackerEarth sandbox.
HackerRank for Work API
Hiring-focused platform with built-in tests and candidate workflow.
Choose HackerRank for Work when the use case is end-to-end candidate assessment, not just raw code execution.
Codeforces API
Competitive programming archive of problems to run against the sandbox.
Use Codeforces alongside HackerEarth when training an agent against a known corpus of competitive problems.
Specific to using HackerEarth Code Evaluation API API through Jentic.
Why is there no official OpenAPI spec for HackerEarth Code Evaluation API?
HackerEarth does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call HackerEarth Code Evaluation API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the HackerEarth Code Evaluation API use?
Requests must include a client-secret header containing the partner key issued from the HackerEarth developer dashboard. Through Jentic, this secret is stored encrypted in the vault and injected at execution time so the agent never sees the raw key.
Which languages does the HackerEarth Code Evaluation API support?
The v4 API supports over 30 languages including Python 2 and 3, Java, C, C++, C#, Go, Rust, Kotlin, Ruby, JavaScript (Node), TypeScript, PHP, Swift, Scala, and Haskell. The exact identifier list is documented in the HackerEarth language reference and passed in the lang field of the submission body.
How do I submit code and read the result?
POST to /code-evaluation/submissions with the source, lang, input, time_limit, and memory_limit fields. The response returns a submission id. Poll GET /code-evaluation/submissions/{id} until the status field reads COMPLETED, then read the output, time_used, and memory_used fields. To avoid polling, supply a callback URL in the submission body.
What are the rate limits for the HackerEarth Code Evaluation API?
Limits are tied to the partner plan associated with the client-secret. Free trial keys are heavily throttled while paid partner plans receive higher concurrent execution allowances. Check the response headers and your dashboard for current usage versus quota.
How do I use HackerEarth code execution with AI agents through Jentic?
Run pip install jentic, search 'execute python code', and Jentic returns the HackerEarth POST /code-evaluation/submissions operation. Execute it with the source, then call the GET /code-evaluation/submissions/{id} operation until completion.