๐ Overview
The Random Generator API provides cryptographically secure random generation for various use cases including numbers, dice rolls, coin flips, and card draws. Perfect for games, statistical sampling, or any application requiring reliable randomness.
๐ข Number Generation
Generate random integers and floats within specified ranges
๐ฒ Dice Rolling
Simulate rolling various dice types (D4, D6, D8, D10, D12, D20, D100)
๐ช Coin Flipping
Generate random coin flips with customizable options
๐ Card Drawing
Draw random playing cards from a standard 52-card deck
๐ฏ Generation Types
๐ข Numbers
Integers and decimals
๐ฒ Dice
D4, D6, D8, D10, D12, D20, D100
๐ช Coins
Heads or Tails
๐ Cards
52-card deck
๐ Base URL
๐ Authentication
No authentication required. This is a public API that can be accessed without any API keys or tokens.
๐ก API Endpoints
POST / Generate Random Values
Generate random values based on the specified type and parameters.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
type |
string | Required | Generation type: "number", "dice", "coin", "card", "all" |
min |
integer | Optional* | Minimum value (for number type, default: 1) |
max |
integer | Optional* | Maximum value (for number type, default: 100) |
sides |
integer | Optional* | Number of sides on dice (for dice type, 2-100, default: 6) |
count |
integer | Optional | Number of items to generate (dice: 1-10, coin: 1-10, card: 1-52, default: 1) |
with_jokers |
boolean | Optional | Include jokers in card deck (for card type, default: false) |
coin_count |
integer | Optional | Number of coins to flip (1-10) |
card_count |
integer | Optional | Number of cards to draw (1-52) |
count |
integer | Optional | Number of results to generate (1-100) |
Example Request - Random Number
Example Request - Dice Roll
Example Request - Coin Flip
Example Request - Card Draw
Example Request - Generate All Types
๐ Response Format
Success Response Examples
Random Numbers Response
Dice Roll Response
Coin Flip Response
Card Draw Response
Error Response
๐ฒ Dice Types
Dice Type | Sides | Range | Common Use |
---|---|---|---|
d4 |
4 | 1-4 | Damage dice in RPGs |
d6 |
6 | 1-6 | Standard board game die |
d8 |
8 | 1-8 | RPG weapon damage |
d10 |
10 | 1-10 | Percentile systems |
d12 |
12 | 1-12 | Heavy weapon damage |
d20 |
20 | 1-20 | D&D ability checks |
d100 |
100 | 1-100 | Percentage rolls |
๐ Playing Card Information
The card drawing feature uses a standard 52-card deck with the following specifications:
Suits
- Hearts (โฅ): Red suit
- Diamonds (โฆ): Red suit
- Clubs (โฃ): Black suit
- Spades (โ ): Black suit
Ranks
- Number Cards: 2, 3, 4, 5, 6, 7, 8, 9, 10
- Face Cards: Jack (J), Queen (Q), King (K)
- Ace: A (can be high or low depending on game rules)
Unicode Support
Each card includes Unicode playing card symbols for easy display in applications.
โ ๏ธ Error Codes
Code | Description |
---|---|
INVALID_TYPE |
Generation type is not supported |
INVALID_RANGE |
Min/Max values are invalid or min > max |
INVALID_DICE_TYPE |
Dice type is not supported |
INVALID_COUNT |
Count parameter is outside valid range |
INVALID_DECIMAL_PLACES |
Decimal places is outside valid range (0-10) |
GENERATION_ERROR |
Error occurred during random generation |
๐ฏ Common Use Cases
๐ฎ Gaming Applications
Dice rolls, card games, random events, loot generation
๐ Statistical Sampling
Random sampling, A/B testing, survey randomization
๐ฐ Casino & Gambling
Fair randomization for gambling applications
๐งช Research & Testing
Random data generation, simulation, testing scenarios
๐ฆ Rate Limits
Currently, there are no rate limits imposed on this API. However, please use it responsibly and avoid excessive requests that might impact service availability for other users.
๐ฏ Ready to Try?
Test the Random Generator API with our interactive web interface or start integrating it into your application.
Try Web Interface Test API Endpoint