PHPackages                             apiverve/diceroller - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. apiverve/diceroller

ActiveLibrary[API Development](/categories/api)

apiverve/diceroller
===================

Dice Roller is a tool for rolling dice using standard RPG notation (XdY format). It supports multiple dice, various die sizes, modifiers, and provides statistics including min, max, average, and theoretical values for gaming and simulations.

00C#

Since Jul 16Pushed 1mo agoCompare

[ Source](https://github.com/apiverve/diceroller-api)[ Packagist](https://packagist.org/packages/apiverve/diceroller)[ RSS](/packages/apiverve-diceroller/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[Dice Roller API](https://apiverve.com/marketplace/diceroller?utm_source=github&utm_medium=readme)
==================================================================================================

[](#dice-roller-api)

Dice Roller is a tool for rolling dice using standard RPG notation (XdY format). It supports multiple dice, various die sizes, modifiers, and provides statistics including min, max, average, and theoretical values for gaming and simulations.

The Dice Roller API provides a simple, reliable way to integrate dice roller functionality into your applications. Built for developers who need production-ready dice roller capabilities without the complexity of building from scratch.

**[View API Details →](https://apiverve.com/marketplace/diceroller?utm_source=github&utm_medium=readme)**

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![API Status](https://camo.githubusercontent.com/15e99b75bf27d82ce61696f6ed2bc677c3dbb56b0902a69b0afa0860c95e3aac/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5374617475732d4163746976652d677265656e2e737667)](https://apiverve.com/marketplace/diceroller?utm_source=github&utm_medium=readme)[![Method](https://camo.githubusercontent.com/a2b7cddd4cb12b1e821f02341ecb69a22571a98b2069d832d9c5f106ea07102a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4d6574686f642d4745542d626c75652e737667)](#)[![Platform](https://camo.githubusercontent.com/baa862d10fe7a5ffd0d064b1e3d41f4034cf5747a1ef289496ef606b53554456/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f506c6174666f726d2d4d756c74692d2d506c6174666f726d2d6f72616e67652e737667)](#installation)

**Available on:**[![npm](https://camo.githubusercontent.com/60c9e8e39546f97cdc6b7d10d0eb0f29b7ef81ad8a1332eee806680cc80697f3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6e706d2d4342333833373f7374796c653d666c6174266c6f676f3d6e706d266c6f676f436f6c6f723d7768697465)](https://www.npmjs.com/package/@apiverve/diceroller)[![NuGet](https://camo.githubusercontent.com/272fcec5c03b95ec239b9bd3abf7e66481ada718e198ca4a59f41c0b366af6b0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4e754765742d3030343838303f7374796c653d666c6174266c6f676f3d6e75676574266c6f676f436f6c6f723d7768697465)](https://www.nuget.org/packages/APIVerve.API.DiceRoller)[![PyPI](https://camo.githubusercontent.com/4bc6211075d1c11d9c07f962783fee71f5f3cc70e04c4ec9d57d4e761a7dd113/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507950492d3337373641423f7374796c653d666c6174266c6f676f3d707974686f6e266c6f676f436f6c6f723d7768697465)](https://pypi.org/project/apiverve-diceroller/)[![RubyGems](https://camo.githubusercontent.com/71716e070a00057e5feb5a93d39119c1ce4279183edc35e7384bef3e804b68ab/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5275627947656d732d4539353733463f7374796c653d666c6174266c6f676f3d7275627967656d73266c6f676f436f6c6f723d7768697465)](https://rubygems.org/gems/apiverve_diceroller)[![Packagist](https://camo.githubusercontent.com/5c7bb7fb77c5df98a7cc98b925a011394a30fb20f6d381b951a4e87aa8f03c45/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5061636b61676973742d4632384431413f7374796c653d666c6174266c6f676f3d7061636b6167697374266c6f676f436f6c6f723d7768697465)](https://packagist.org/packages/apiverve/diceroller)[![Go](https://camo.githubusercontent.com/2c54290f2057e36a55a985ab1cd61b80b4a5a732160a50fcd707b7b6b0086460/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476f2d3030414444383f7374796c653d666c6174266c6f676f3d676f266c6f676f436f6c6f723d7768697465)](#-go)[![Dart](https://camo.githubusercontent.com/dca235ce2ec52c7dacbbd19ee2d738caf995db81745395b17c9d3b6152d28966/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446172742d3031373543323f7374796c653d666c6174266c6f676f3d64617274266c6f676f436f6c6f723d7768697465)](https://pub.dev/packages/apiverve_diceroller)[![JitPack](https://camo.githubusercontent.com/946962aac9fad35d0daf16fc430fd16553165a78db28c01fa09b656467c33824/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4a69745061636b2d3245374433323f7374796c653d666c6174266c6f676f3d616e64726f6964266c6f676f436f6c6f723d7768697465)](#-android-jitpack)

---

Quick Start
-----------

[](#quick-start)

### Using JavaScript

[](#using-javascript)

```
async function callDiceRollerAPI() {
    try {
        const params = new URLSearchParams({
            dice: '3d6',
            modifier: 5
        });

        const response = await fetch(`https://api.apiverve.com/v1/diceroller?${params}`, {
            method: 'GET',
            headers: {
                'x-api-key': 'YOUR_API_KEY_HERE'
            }
        });

        const data = await response.json();
        console.log(data);
    } catch (error) {
        console.error('Error:', error);
    }
}

callDiceRollerAPI();
```

### Using cURL

[](#using-curl)

```
curl -X GET "https://api.apiverve.com/v1/diceroller?dice=3d6&modifier=5" \
  -H "x-api-key: YOUR_API_KEY_HERE"
```

**Get your API key:**

**📁 For more examples, see the [examples folder](./examples/)**

---

Installation
------------

[](#installation)

Choose your preferred programming language:

### 📦 NPM (JavaScript/Node.js)

[](#-npm-javascriptnodejs)

```
npm install @apiverve/diceroller
```

[**View NPM Package →**](https://www.npmjs.com/package/@apiverve/diceroller) | [**Package Code →**](./npm/)

---

### 🔷 NuGet (.NET/C#)

[](#-nuget-netc)

```
dotnet add package APIVerve.API.DiceRoller
```

[**View NuGet Package →**](https://www.nuget.org/packages/APIVerve.API.DiceRoller) | [**Package Code →**](./nuget/)

---

### 🐍 Python (PyPI)

[](#-python-pypi)

```
pip install apiverve-diceroller
```

[**View PyPI Package →**](https://pypi.org/project/apiverve-diceroller/) | [**Package Code →**](./python/)

---

### 💎 Ruby (RubyGems)

[](#-ruby-rubygems)

```
gem install apiverve_diceroller
```

[**View RubyGems Package →**](https://rubygems.org/gems/apiverve_diceroller) | [**Package Code →**](./ruby/)

---

### 🐘 PHP (Packagist)

[](#-php-packagist)

```
composer require apiverve/diceroller
```

[**View Packagist Package →**](https://packagist.org/packages/apiverve/diceroller) | [**Package Code →**](./php/)

---

### 🎯 Dart (pub.dev)

[](#-dart-pubdev)

```
dart pub add apiverve_diceroller
```

[**View pub.dev Package →**](https://pub.dev/packages/apiverve_diceroller) | [**Package Code →**](./dart/)

---

### 🤖 Android (JitPack)

[](#-android-jitpack)

```
implementation 'com.github.apiverve:diceroller-api:1.0.0'
```

[**Package Code →**](./android/)

---

### 🐹 Go

[](#-go)

```
go get github.com/apiverve/diceroller-api/go
```

[**Package Code →**](./go/)

---

Why Use This API?
-----------------

[](#why-use-this-api)

FeatureBenefit**Multi-language SDKs**Native packages for JavaScript, Python, C#, Go, and Android**Simple Integration**Single API key authentication, consistent response format**Production Ready**99.9% uptime SLA, served from 24 global regions**Comprehensive Docs**Full examples, OpenAPI spec, and dedicated support---

Documentation
-------------

[](#documentation)

- 🏠 **API Home:** [Dice Roller API](https://apiverve.com/marketplace/diceroller?utm_source=github&utm_medium=readme)
- 📚 **API Reference:** [docs.apiverve.com/ref/diceroller](https://docs.apiverve.com/ref/diceroller)
- 📖 **OpenAPI Spec:** [openapi.yaml](./openapi.yaml)
- 💡 **Examples:** [examples/](./examples/)

---

What Can You Build?
-------------------

[](#what-can-you-build)

The Dice Roller API is commonly used for:

- **Web Applications** - Add dice roller features to your frontend or backend
- **Mobile Apps** - Native SDKs for Android development
- **Automation** - Integrate with n8n, Zapier, or custom workflows
- **SaaS Products** - Enhance your product with dice roller capabilities
- **Data Pipelines** - Process and analyze data at scale

---

API Reference
-------------

[](#api-reference)

### Authentication

[](#authentication)

All requests require an API key in the header:

```
x-api-key: YOUR_API_KEY_HERE

```

Get your API key:

### Response Format

[](#response-format)

Every APIVerve endpoint returns the same envelope — check `status`, then read `data`:

```
{
  "status": "ok",
  "error": null,
  "data": { ... }
}
```

### Example Response

[](#example-response)

A real response from the Dice Roller API:

```
{
  "status": "ok",
  "error": null,
  "data": {
    "dice_notation": "3d6",
    "num_dice": 3,
    "num_sides": 6,
    "modifier": 5,
    "rolls": [
      6,
      4,
      4
    ],
    "total": 14,
    "total_with_modifier": 19,
    "min_roll": 4,
    "max_roll": 6,
    "average_roll": 4.67,
    "theoretical_min": 3,
    "theoretical_max": 18,
    "theoretical_average": 10.5,
    "expression": "3d6+5"
  }
}
```

---

Support &amp; Community
-----------------------

[](#support--community)

- 🏠 **API Home**: [Dice Roller API](https://apiverve.com/marketplace/diceroller?utm_source=github&utm_medium=readme)
- 💬 **Support**:
- 🐛 **Issues**: [GitHub Issues](../../issues)
- 📖 **Documentation**:
- 🌐 **Website**:

---

Contributing
------------

[](#contributing)

We welcome contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

---

Security
--------

[](#security)

For security concerns, please review our [Security Policy](SECURITY.md).

---

License
-------

[](#license)

This project is licensed under the **MIT License** - see the [LICENSE](LICENSE) file for details.

---

Acknowledgments
---------------

[](#acknowledgments)

Built with ❤️ by [APIVerve](https://apiverve.com)

Copyright © 2026 APIVerve. All rights reserved.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance60

Regular maintenance activity

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/f4d2e1d9263acab05f6a553dfdd4884a1efb8e6d76bd276a50996b3a41e1d6e5?d=identicon)[APIVerve](/maintainers/APIVerve)

---

Tags

android-libraryapiapivervedicerollerdotnetgamesjavanodejsnpm-packagenuget-packagepythonpython-packagerest-api

### Embed Badge

![Health badge](/badges/apiverve-diceroller/health.svg)

```
[![Health](https://phpackages.com/badges/apiverve-diceroller/health.svg)](https://phpackages.com/packages/apiverve-diceroller)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

710215.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

316188.8k2](/packages/pimax-fb-messenger-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
