Generators
Dice Roller API
Roll any number of dice with any number of sides and get the running total.
Request Headers
| Name | Required | Description |
|---|---|---|
X-RapidAPI-Key | required | Your RapidAPI key. Get one free. |
X-RapidAPI-Host | required | dice.p.rapidapi.com |
Endpoints
GET
/v1/generate/dice Roll dice with a configurable number of sides
Parameters
| Name | Type | Required | Default | Constraints |
|---|---|---|---|---|
rolls | integer | optional | 1 | 1-100 |
sides | integer | optional | 6 | 2-1000 |
Code Examples
curl --request GET \
--url 'https://dice.p.rapidapi.com/v1/generate/dice?rolls=1&sides=6' \
--header 'x-rapidapi-key: YOUR_API_KEY' \
--header 'x-rapidapi-host: dice.p.rapidapi.com' const url = "https://dice.p.rapidapi.com/v1/generate/dice?rolls=1&sides=6";
const options = {
method: "GET",
headers: {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "dice.p.rapidapi.com"
}
};
const response = await fetch(url, options);
const data = await response.json();
console.log(data); import requests
url = "https://dice.p.rapidapi.com/v1/generate/dice"
querystring = {"rolls": 1, "sides": 6}
headers = {
"x-rapidapi-key": "YOUR_API_KEY",
"x-rapidapi-host": "dice.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
print(response.json()) Interactive Example
$ GET /v1/generate/dice?sides=20&rolls=2
{"rolls":[14,3],"total":17} Subscribe & License
Access this API with commercial-ready tiers on RapidAPI. Flexible plans designed for side-projects, startups, and high-volume production architectures.
Developer Support
Need help integrating or have a custom endpoint request? Our engineering team is here to assist with authentication, payload schemas, and high-frequency rate limit increases.
System Performance
Monitored 24/7 with a 99.9% uptime SLA. Built atop cloud-native microservices with globally distributed edge caching to ensure ultra-low latency response times.
All Systems Operational