For Agents
Compile and execute code snippets in over 70 languages and check remaining daily credit usage - without managing local runtimes.
Use for: Run a Python snippet and return the output, Compile a C++ program with a specific gcc version, Execute Java code with stdin provided as a fixture, Check how many compile credits are left today
Not supported: Does not handle file system persistence between runs, package installation, long-running services, or interactive debugging - use for one-shot code execution and credit checks only.
The JDoodle Compiler API runs source code in a hosted sandbox across more than 70 programming languages, returning the program output, CPU time, and memory used. Agents send a code string with the language identifier, version index, and optional stdin to POST /execute and receive the run result without provisioning runtimes locally. A second endpoint returns the daily compile credit balance so callers can budget against the account quota.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the JDoodle Compiler API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fapi.jdoodle.com%2Fjdoodle" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fapi.jdoodle.com%2Fjdoodle" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with JDoodle Compiler API.
Execute code in 70+ supported languages including Python, Java, C++, Go, and Rust
Pass standard input to a program run so test fixtures and sample inputs can be supplied
Pin a specific language version index for reproducible runs across requests
Return CPU time and memory consumed alongside the program output
Check the remaining daily compile credit usage on the account
Patterns agents use JDoodle Compiler API for, with concrete tasks.
★ In-Product Code Execution
Embed runnable code snippets in documentation, tutorials, or LMS quizzes by sending the source to POST /execute and rendering the response inline. JDoodle handles compilation and runtime isolation, so the calling app does not need to maintain Docker images per language. Latency is typically sub-second for short scripts, which is acceptable for interactive learning experiences.
Call POST /execute with language 'python3', versionIndex '4', and the script 'print(sum(range(11)))', then return the output and CPU time.
Automated Code Sample Validation
Validate code samples in documentation pull requests by running each snippet against expected output before merge. CI scripts post each sample to /execute, compare the response to the expected stdout, and fail the build on mismatch. This keeps a body of tutorial code permanently green without provisioning a CI matrix per language.
Call POST /execute for each snippet in docs/, capture the output, and fail the job when the output does not match the expected fixture.
Credit Usage Monitoring
Track remaining daily compile credits to stay inside the JDoodle plan limit. POST /credit-spent returns the count of credits used so far in the current billing day; an agent can subtract this from the plan cap and surface a warning when the remaining budget is low. Useful for product teams that expose JDoodle to end-users.
Call POST /credit-spent and return the current spend; if it exceeds 90% of the daily cap, raise an alert to the operations channel.
AI Agent Code Execution Tool
An LLM-powered agent that writes code can use JDoodle through Jentic to run the snippet in a sandbox before presenting it to the user. Jentic exposes /execute as a discoverable tool so the agent picks it by intent - for instance 'run this Python code'. The clientId/clientSecret stay in your Jentic One instance.
Search for 'execute a code snippet', load the POST /execute schema, and run the agent's generated Python solution to verify it produces the expected output before returning it to the user.
2 endpoints — the jdoodle compiler api runs source code in a hosted sandbox across more than 70 programming languages, returning the program output, cpu time, and memory used.
METHOD
PATH
DESCRIPTION
/execute
Compile and execute a code snippet
/credit-spent
Check today's compile credit usage
/execute
Compile and execute a code snippet
/credit-spent
Check today's compile credit usage
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the JDoodle Compiler API by hand means setting up its API key auth and coding your own calls to the execute and credit-spent endpoints. Through Jentic you install once, import the JDoodle Compiler API from the API Directory, store the key once, and your agent calls it.
Permission scoping
JDoodle code and language inputs travel in the request body rather than as ids in the URL path, so limit the agent to the operations it needs: you can allow the credit-spent check on its own or add execute when the agent must run code. Every operation you grant is your explicit choice.
Credential isolation
Your JDoodle API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'run a code snippet' or 'check remaining execution credits', and Jentic returns the matching JDoodle operation with its input schema so the agent calls the right endpoint without browsing the reference docs.
Alternatives and complements available in the Jentic catalogue.
Specific to using JDoodle Compiler API through Jentic.
What authentication does the JDoodle Compiler API use?
JDoodle uses a clientId and clientSecret pair, sent as fields inside the JSON body of each /execute and /credit-spent request rather than as a header. Through Jentic, both values are stored encrypted in your Jentic One instance and merged into the request payload at execution time.
Which languages can I run with the JDoodle Compiler API?
JDoodle supports 70+ languages including Python (python3, python2), Java, C, C++, C#, Go, Rust, Node.js, Ruby, PHP, Kotlin, Swift, Scala, Haskell, R, and many others. Each language exposes one or more versionIndex values that pin the compiler or runtime version.
What are the rate limits and credit caps for the JDoodle API?
Each plan ships with a daily compile credit cap; the free tier is small (around 200 credits per day at time of writing) and paid tiers scale higher. Use POST /credit-spent to see current spend. There is no per-second rate limit in the spec, but throttle aggressive bursts to avoid 429 responses.
How do I run a code snippet in Python through Jentic?
Run pip install jentic, search for 'execute a code snippet', and Jentic returns the POST /execute operation. Load its schema, pass language='python3', versionIndex='4' (or your pinned version), the script string, and any stdin, then execute the call to receive the program output.
Is the JDoodle Compiler API free?
JDoodle has a free plan with a small daily credit cap and paid plans that scale credits and concurrency. Pricing is published on jdoodle.com. Each /execute call consumes one credit; /credit-spent itself is free and does not affect the daily count.
Can I pass standard input to my code with the JDoodle API?
Yes. POST /execute accepts a stdin field as part of the JSON body. Anything you place there is fed to the program as standard input, which is essential for sample-input style problems and for testing programs that call input() or read from stdin.
Can I limit what my agent is allowed to do with the JDoodle Compiler API?
Yes. Because you run Jentic One yourself, your own rules decide which JDoodle operations the agent may call, and this API exposes only two: POST /execute to compile and run code and POST /credit-spent to read the daily credit usage. If the agent only needs to monitor quota, grant it credit-spent alone and add execute solely when it must actually run code. Since the language, version, and code string all travel in the request body rather than in the URL path, scoping is done at the operation level with the credentials your instance injects at call time.
GET STARTED