# Craps Odds API
> Craps odds maths as an API, computed locally and deterministically and exactly — the dice probabilities behind the table, derived from the 36 ways two dice fall, not pulled from a chart. The come-out endpoint gives the come-out roll: the pass line wins on a 7 or 11 (8 of 36, 22.2 %), loses on craps 2, 3 or 12 (4 of 36, 11.1 %), and otherwise sets a point (24 of 36, 66.7 %). The point endpoint gives the odds of making a point before a seven — probability = ways(point) ÷ (ways(point) + 6) — so a 6 or 8 makes 45.5 % of the time and a 4 or 10 only 33.3 %, with the TRUE odds (2:1, 3:2, 6:5) the free odds bet behind the line pays at zero house edge. The bet endpoint gives the house edge of the main bets: the line bets at 1.41 % (pass) and 1.36 % (don't) and place 6/8 at 1.52 % are the table's best, while place 4/10 (6.67 %), the field and proposition bets like any seven (16.67 %) bleed you. Everything is computed locally and deterministically, so it is instant and exact. Ideal for craps and casino-game apps, gambling-education and odds tools, game-design back-ends, and probability teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Educational — not betting advice; back the line with free odds.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/craps-api/..."
```

## Pricing
- **Free** (Free) — 8,500 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 102,000 calls/Mo, 8 req/s
- **Pro** ($13/Mo) — 410,000 calls/Mo, 20 req/s
- **Mega** ($38/Mo) — 1,800,000 calls/Mo, 48 req/s

## Endpoints

### Craps

#### `GET /v1/bet` — House edge of a bet

**Parameters:**
- `bet_type` (query, required, string) — pass | dontpass | come | dontcome | place4-10 | field | any7 | anycraps Example: `pass`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/craps-api/v1/bet?bet_type=pass"
```

**Response:**
```json
{
    "data": {
        "bet": "pass line",
        "note": "House edge per bet resolved. The line bets (pass/come 1.41 %, don't 1.36 %) and place 6/8 (1.52 %) are the best on the table; place 4/10 (6.67 %), the field and proposition bets like any seven (16.67 %) are sucker bets. Back the line with free odds to dilute the edge toward zero.",
        "inputs": {
            "bet_type": "pass"
        },
        "house_edge_pct": 1.41,
        "win_probability_pct": 49.29
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:02.897Z",
        "request_id": "b4e775f2-f1b4-4d4e-9274-16b7e267e1a2"
    },
    "status": "ok",
    "message": "Bet edge",
    "success": true
}
```

#### `GET /v1/come-out` — Come-out roll probabilities

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/craps-api/v1/come-out"
```

**Response:**
```json
{
    "data": {
        "note": "On the come-out roll the pass line wins on a 7 or 11 (8 of 36 = 22.2 %), loses on craps 2, 3 or 12 (4 of 36 = 11.1 %), and otherwise sets a point (24 of 36 = 66.7 %). Don't-pass is the mirror, except a 12 pushes (the bar) — which is where its tiny edge comes from.",
        "craps_lose_pct": 11.11,
        "natural_win_pct": 22.22,
        "point_established_pct": 66.67
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:02.981Z",
        "request_id": "45955e5e-33c4-4e26-b9cb-e009d30de44a"
    },
    "status": "ok",
    "message": "Come-out roll",
    "success": true
}
```

#### `GET /v1/point` — Odds of making a point

**Parameters:**
- `point` (query, required, string) — Point number (4,5,6,8,9,10) Example: `6`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/craps-api/v1/point?point=6"
```

**Response:**
```json
{
    "data": {
        "note": "Once a point is set, only that number or a seven matters — the point makes with probability ways(point) ÷ (ways(point) + 6). A 6 or 8 makes 5 of 11 times (45.5 %), a 4 or 10 only 3 of 9 (33.3 %). The free 'odds' bet behind the line pays these TRUE odds with zero house edge — always take it.",
        "inputs": {
            "point": 6
        },
        "true_odds": "6:5",
        "ways_to_roll": 5,
        "probability_make_point_pct": 45.45
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:03.072Z",
        "request_id": "c330090d-d87b-44d8-a51a-bbad1e11ead6"
    },
    "status": "ok",
    "message": "Point odds",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/craps-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "notes": "Two fair dice (36 outcomes). Come-out: win 8/36, lose 4/36, point 24/36. Point makes ways/(ways+6); true odds 4/10 2:1, 5/9 3:2, 6/8 6:5. Pass edge 1.41 %. Educational — not betting advice.",
        "service": "craps-api",
        "endpoints": {
            "GET /v1/bet": "House edge and win probability for a craps bet.",
            "GET /v1/meta": "This document.",
            "GET /v1/point": "Odds of making a point before a seven, with the true odds.",
            "GET /v1/come-out": "Come-out roll outcome probabilities (natural/craps/point)."
        },
        "description": "Craps maths: come-out roll probabilities, the odds of making a point before a seven with true odds, and the house edge of the main bets."
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:03.168Z",
        "request_id": "e19ccef3-899c-4bee-952b-ec853ddc4a92"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/craps-api
OpenAPI spec: https://www.oanor.com/api/craps-api/openapi.json
