Random Number API DOCUMENTATION
From key to response.
Everything required to add Random Number API to an application and handle it safely in production.
Quickstart
Send a GET request to the endpoint below. Replace YOUR_KEY with the private key delivered after checkout.
curl "https://codecobra.tech/api/v1/random-number/generate/?min=1&max=100" -H "X-API-Key: YOUR_KEY"Authentication
Include the key in every request using X-API-Key. Keep it server-side, never commit it to Git, and never expose it in browser JavaScript.
X-API-Key: cc_live_...Parameters
minInteger · optionalLowest possible value. Defaults to 0.
maxInteger · optionalHighest possible value. Defaults to 100 and must be greater than or equal to min.
Response
Successful calls return HTTP 200 with JSON and a credits_remaining value so your application can monitor usage.
{ "result": "generated value", "credits_remaining": 99 }Check the remaining balance
The balance endpoint validates a key without consuming credits. It also returns the API name, key status, and current rate limits.
curl "https://codecobra.tech/api/v1/balance/" -H "X-API-Key: YOUR_KEY"{ "success": true, "api": "Random Number API", "status": "active", "credits_remaining": 100 }Credits and limits
Every API includes a one-time 100-request Free Starter tier. Each successful call consumes the configured credit cost. Per-minute and daily throttles protect availability. Balance checks and rate-limited requests do not consume credits.
Errors
Correct the request value and try again.
Confirm the key belongs to this API and is sent in the correct header.
Add credits to reactivate the existing key.
Wait before retrying or request a higher limit.
The API has been temporarily disabled by the operator.