# 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"
```

#### `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"
```

#### `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"
```

### Meta

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

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


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