Docs/APIs/Slot Machine Simulator

Slot Machine Simulator

Simulate slot machine spins and payouts

OperationalCredits 1 per callp50 161msGamesStar

Overview

Slot Machine Simulator works by generating random reel results using weighted probabilities for different symbols, calculating payouts based on symbol matches and bet amounts, and tracking detailed statistics across multiple spins.

Endpoint

One host, one path per API. The block below shows this call in four languages; every one of them is the same HTTP request. Making requests covers the timeouts, retries and parameter rules that apply to all of them. The SDKs wrap the same call in a typed client.

GEThttps://api.apiverve.com/v1/slotmachine
curl "https://api.apiverve.com/v1/slotmachine?spins=5&reels=3&bet=1" \
  -H "x-api-key: your_api_key_here"
const res = await fetch('https://api.apiverve.com/v1/slotmachine?spins=5&reels=3&bet=1', {
  headers: { 'x-api-key': 'your_api_key_here' },
});

if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);

const { data } = await res.json();
console.log(data);
import requests

res = requests.get(
    "https://api.apiverve.com/v1/slotmachine?spins=5&reels=3&bet=1",
    headers={"x-api-key": "your_api_key_here"},
    timeout=15,
)
res.raise_for_status()

print(res.json()["data"])
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, _ := http.NewRequest("GET", "https://api.apiverve.com/v1/slotmachine?spins=5&reels=3&bet=1", nil)
	req.Header.Set("x-api-key", "your_api_key_here")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	out, _ := io.ReadAll(res.Body)
	fmt.Println(string(out))
}

Replace your_api_key_here with the key from your dashboard. When the inputs arrive as a list rather than one at a time, batch requests run up to 200 of them through this same API in a single call.

Authentication

Send your key in the x-api-key header. That is the only auth step — there is no token exchange and no per-endpoint scope to configure. Authentication covers creating, rotating and revoking keys.

401 is the only auth verdict

A 401 means the key is missing, invalid or expired. A 403 means the key is valid but not permitted here — blocked by a key restriction or an IP allow-list. Running out of credits is a 429.

Parameters

Sent in the query string. Premium parameters are accepted on every plan but only take effect on plans that include them.

ParameterTypeDescription
spinsOptionalintegerNumber of spins to simulate
default 1 · range 1–5
reelsOptionalintegerNumber of reels
default 3 · range 3–5
betOptionalnumberBet amount per spin
default 1 · range 0–1000

Response

Every API returns the same three top-level keys, so one response handler covers your whole integration: status, error and data. Only data changes shape. Response format covers the envelope, the other output formats and how premium fields are withheld.

Sample response
{
  "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
      }
    ]
  }
}

Response fields

Paths are relative to data. Premium fields are absent rather than zeroed on plans that do not include them, so check for presence instead of comparing to 0.

FieldTypeExampleDescription
total_spinsnumber5Total number of spins simulated in session
num_reelsnumber3Number of reels used per spin
bet_per_spinnumber1Bet amount placed per individual spin
spinsarray[5]Array containing detailed information for each spin
spin_numbernumber1Sequential number identifying this spin
reelsarray[3]Array of reel results for this spin
symbolstring"🍋"Emoji symbol displayed on the reel
namestring"Lemon"Human-readable name of reel symbol
betnumber1Bet amount wagered for this spin
payoutPremiumnumber0Monetary payout amount won from spin
win_typePremiumstring"none"Classification of win result for spin
is_winPremiumbooleanfalseWhether spin resulted in winning combination
total_betnumber5Total amount wagered across all spins
total_winningsPremiumnumber0.5Total monetary winnings from all spins
net_profitPremiumnumber-4.5Calculated profit or loss after all spins
winsPremiumnumber1Count of successful winning spins
lossesPremiumnumber4Count of losing spins in session
win_percentagePremiumnumber20Percentage of spins that resulted in wins
available_symbolsarray[8]Array of all possible symbols used
symbolstring"🍒"Emoji symbol available in slot machine
namestring"Cherry"Name of the available symbol
payout_multiplierPremiumnumber2Payout multiplier for symbol matches

Errors

Read the HTTP status first, then error for the specific reason. The body names the parameter that has to change. Error handling covers the full status list and which of them are worth retrying.

StatusMeaningWhat to do
400Input was rejectedRead error; it names the parameter.
401Key missing or invalidCheck the header name and the key value.
403Key valid, but not permittedA key restriction or IP allow-list; see key scoping.
429Rate limited, or out of creditsRead error to tell them apart; see rate limits.

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

Other ways to use Slot Machine Simulator

Set up Slot Machine Simulator on APIVerve, or reach the same source a different way. Your APIVerve account and credits work on all of them — one key, one balance.

Give it to an AI agentConnect over MCP and your agent calls it as a native tool — Claude, Cursor, ChatGPT.VerveKitReference →

More in Games:

Was this page helpful?