Logo

API credits

JDoodle uses a credit-based system to manage daily API call limits.

  • You receive a specific number of credits each day, depending on your subscription plan.
  • Unused credits do not carry over to the next day. New credits are allocated daily.
  • Credits are consumed based on the API endpoints you utilize.

Checking used credits

You can check your API dashboard or use this endpoint to check your credit spent:

https://api.jdoodle.com/v1/credit-spent

Body

Parameters| Description| | Type | Required | |----|--------| | --- | --- client | | Id | Your | | String | Yes client | | Secret | client | | String | Yes |

Response

Parameters| | Description | Type | |-----------|----| | Shows the total credits used | Integer |

Example request

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

Example response

{
  "used": 50
}

Credit allocation

The table below outlines the API calls and their respective credit costs. Endpoint| | Description | Credit Used | |-----------|-----------| | --- | R | | 1 | R | | 0 | R | | EST endpoint to get a token to use in the WebSocket call | 1 | | Websocket call | 1 | | JDroid API call | Using | | JDroid API to generate, translate, optimize code, etc. | 2 |