# Slot Machine Simulator API

> Slot Machine Simulator generates slot machine reel spins for configurable reels, bet sizes, and spin counts. Every run outputs symbol names and emoji for each reel; paid plans add payout calculations, win tracking, and net profit statistics.

**Endpoint:** `GET https://api.apiverve.com/v1/slotmachine`  
**Category:** Games  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/slotmachine

## Overview

A slot machine simulator API for casino-style games, demos and probability lessons, with no real money involved. Each call spins three to five reels up to five times, drawing every symbol with weighted probabilities so cherries turn up often and sevens rarely. You choose the number of spins, the number of reels and the bet per spin, starting from zero.

The Free plan returns what lands on each reel for every spin, as an emoji and a name, with the bet, the total amount wagered and the list of eight symbols the machine uses. That is enough to animate the reels in a browser game, a Discord bot or a party app and decide outcomes your own way.

Paid plans add the payout side: the winnings for each spin, its win type and a win flag, plus session totals for winnings, net profit, wins, losses and win percentage, and the payout multiplier for every symbol. That turns the simulator into a ready-made backend for a slot game, or a quick way to show how a run of spins moves a player's balance over time.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl "https://api.apiverve.com/v1/slotmachine?spins=5&reels=3&bet=1" \
  -H "x-api-key: YOUR_API_KEY"
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `spins` | integer | No | Number of spins to simulate. default 1. range 1-5 |
| `reels` | integer | No | Number of reels. default 3. range 3-5 |
| `bet` | number | No | Bet amount per spin, rounded to 2 decimal places. default 1. range 0-1000 |

## Response fields

- `total_spins` — number · Total number of spins simulated in session
- `num_reels` — number · Number of reels used per spin
- `bet_per_spin` — number · Bet amount placed per individual spin
  - `spins.0.spin_number` — number · Sequential number identifying this spin
    - `spins.0.reels.0.symbol` — string · Emoji symbol displayed on the reel
    - `spins.0.reels.0.name` — string · Human-readable name of reel symbol
  - `spins.0.bet` — number · Bet amount wagered for this spin
  - `spins.0.payout` — number · Monetary payout amount won from spin · (premium)
  - `spins.0.win_type` — string · Classification of win result for spin · (premium)
  - `spins.0.is_win` — boolean · Whether the spin paid more than the bet (a small half-stake return is not a win) · (premium)
- `total_bet` — number · Total amount wagered across all spins
- `total_winnings` — number · Total monetary winnings from all spins · (premium)
- `net_profit` — number · Calculated profit or loss after all spins · (premium)
- `wins` — number · Count of successful winning spins · (premium)
- `losses` — number · Count of losing spins in session · (premium)
- `win_percentage` — number · Percentage of spins that resulted in wins · (premium)
  - `available_symbols.0.symbol` — string · Emoji symbol available in slot machine
  - `available_symbols.0.name` — string · Name of the available symbol
  - `available_symbols.0.payout_multiplier` — number · Payout multiplier for symbol matches · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "total_spins": 5,
    "num_reels": 3,
    "bet_per_spin": 1,
    "spins": [
      {
        "spin_number": 1,
        "reels": [
          {
            "symbol": "🍋",
            "name": "Lemon"
          },
          {
            "symbol": "🍒",
            "name": "Cherry"
          },
          {
            "symbol": "🍒",
            "name": "Cherry"
          }
        ],
        "bet": 1,
        "payout": 0,
        "win_type": "none",
        "is_win": false
      },
      {
        "spin_number": 2,
        "reels": [
          {
            "symbol": "⭐",
            "name": "Star"
          },
          {
            "symbol": "🍋",
            "name": "Lemon"
          },
          {
            "symbol": "⭐",
            "name": "Star"
          }
        ],
        "bet": 1,
        "payout": 0,
        "win_type": "none",
        "is_win": false
      },
      {
        "spin_number": 3,
        "reels": [
          {
            "symbol": "🍊",
            "name": "Orange"
          },
          {
            "symbol": "🍇",
            "name": "Grape"
          },
          {
            "symbol": "🍋",
            "name": "Lemon"
          }
        ],
        "bet": 1,
        "payout": 0,
        "win_type": "none",
        "is_win": false
      },
      {
        "spin_number": 4,
        "reels": [
          {
            "symbol": "🍒",
            "name": "Cherry"
          },
          {
            "symbol": "⭐",
            "name": "Star"
          },
          {
            "symbol": "🔔",
            "name": "Bell"
          }
        ],
        "bet": 1,
        "payout": 0,
        "win_type": "none",
        "is_win": false
      },
      {
        "spin_number": 5,
        "reels": [
          {
            "symbol": "🍒",
            "name": "Cherry"
          },
          {
            "symbol": "🍒",
            "name": "Cherry"
          },
          {
            "symbol": "7️⃣",
            "name": "Seven"
          }
        ],
        "bet": 1,
        "payout": 0.5,
        "win_type": "small",
        "is_win": true
      }
    ],
    "total_bet": 5,
    "total_winnings": 0.5,
    "net_profit": -4.5,
    "wins": 1,
    "losses": 4,
    "win_percentage": 20,
    "available_symbols": [
      {
        "symbol": "🍒",
        "name": "Cherry",
        "payout_multiplier": 2
      },
      {
        "symbol": "🍋",
        "name": "Lemon",
        "payout_multiplier": 3
      },
      {
        "symbol": "🍊",
        "name": "Orange",
        "payout_multiplier": 5
      },
      {
        "symbol": "🍇",
        "name": "Grape",
        "payout_multiplier": 10
      },
      {
        "symbol": "🔔",
        "name": "Bell",
        "payout_multiplier": 20
      },
      {
        "symbol": "⭐",
        "name": "Star",
        "payout_multiplier": 50
      },
      {
        "symbol": "💎",
        "name": "Diamond",
        "payout_multiplier": 100
      },
      {
        "symbol": "7️⃣",
        "name": "Seven",
        "payout_multiplier": 200
      }
    ]
  }
}
```

## Use cases

- **Game Development** — Implement slot machine mechanics in casino games and gambling applications
- **Probability Analysis** — Analyze slot machine probabilities and expected values for educational purposes
- **Entertainment** — Provide safe, simulated slot machine experience without real money gambling
- **Testing** — Test slot machine algorithms and payout structures for game design and balancing

## SDKs

- **npm** — `npm install @apiverve/slotmachine` (https://www.npmjs.com/package/@apiverve/slotmachine)
- **NuGet** — `dotnet add package APIVerve.API.SlotMachineSimulator` (https://www.nuget.org/packages/APIVerve.API.SlotMachineSimulator)
- **Source** — https://github.com/apiverve/slotmachine-api

## More

- Full reference: https://docs.apiverve.com/ref/slotmachine
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
