API

Credits and pricing

Your API plan gives you a number of credits each day. Credits reset daily and do not carry over, so every day starts with the same allowance.

The API is independent of your platform plan. An API plan is separate from Pro or Teacher.

What a credit is

Only running your code costs credits, and one run is one credit. For most people that is the whole story.

Checking how many credits you have used is free, however often you do it.

You are charged only when we actually ran something. If our side fails, you pay nothing.

What adds a credit

Three things cost one credit on top of the run itself.

What Extra cost When it applies
Opening a WebSocket connection +1 Once per token, which lasts three minutes
Uploading a multi-file project +1 Once, when you upload it
Giving your code internet access +1 On each run that uses it

Two of those are worth planning around.

A WebSocket token lasts three minutes and runs as many programs as you like in that time, so one token can cover a whole session rather than one run.

Uploading a project costs the extra credit once. Running it again later by its projectKey costs the usual single credit, so upload once and reuse the key.

The plans

Plan Price a month Credits a day Internet access
Free $0 20 No
Starter $10 1,000 Yes
Growth $20 2,000 Yes
Scale $50 5,000 Yes
Business $100 10,000 Yes
Volume $200 – $1,000 20,000 – 100,000 Yes
Custom Contact sales Negotiated Yes

Every plan, including Free, has the REST API, the WebSocket API and all languages. The Custom tier adds webhooks, a custom SLA and white-label embeds, and is arranged with sales.

Note that internet access is not available on the Free plan. If your programs need to reach the internet, you need a paid plan as well as the extra credit per run.

The pricing page has the current figures and yearly options.

Checking your usage

curl -X POST 'https://api.jdoodle.com/v1/credit-spent' \
  -H 'Content-Type: application/json' \
  -d '{
        "clientId": "your_client_id",
        "clientSecret": "your_client_secret"
      }'
{ "used": 42 }

This call is free, so you can poll it to warn yourself before you run out rather than finding out from a refused request.

When you run out

Further calls return 429. Nothing is charged and nothing is queued.

Decide in advance what your product does when that happens. Failing silently is the worst option and the one you get by default.

Credits reset daily at 23:55 UTC. Check what that means for your users: in another timezone, the allowance may reset in the middle of their working day.

What next

  • Errors and timeouts, including what happens when the allowance runs out.
  • Limits, for the platform plans, which are counted separately.

If you need more, the pricing page lists every plan.

This website uses cookies to ensure you get the best experience on our website.