# Farkle Score API
> Farkle dice-scoring maths as an API, computed locally and deterministically — the points a Farkle (Zilch, Ten Thousand) scoring app tallies a roll by. The score endpoint takes up to six dice and returns the value by the common ruleset: a single 1 is 100 and a single 5 is 50; three of a kind scores the face times 100 (three 1s being the exception at 1000); four, five and six of a kind are 1000, 2000 and 3000; a 1-to-6 straight or three pairs is 1500; and two triplets is 2500 — so 1-1-1-5-5-5 scores 2500 as two triplets rather than 1100, a 1-2-3-4-5-6 straight is 1500, and 6-6-6-2-3 is 600 with the 2 and 3 dead. It flags a farkle when nothing scores (you lose the turn’s points) and tells you whether every die counted — a hot dice that lets you roll all six again. Rulesets vary, so it scores the widely-used set and says so. Everything is computed locally and deterministically, so it is instant and private. Ideal for dice-game, party-game and scoring app developers, score-helper and game-night tools, and board-game-companion software. Pure local computation — no key, no third-party service, instant. Scores a roll; it does not roll the dice. Live, nothing stored. 1 compute endpoint.

## 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/farkle-api/..."
```

## Pricing
- **Free** (Free) — 7,460 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 56,700 calls/Mo, 6 req/s
- **Pro** ($12/Mo) — 232,800 calls/Mo, 15 req/s
- **Mega** ($36/Mo) — 1,353,000 calls/Mo, 40 req/s

## Endpoints

### Farkle

#### `GET /v1/score` — Score a Farkle roll

**Parameters:**
- `dice` (query, required, string) — 1–6 dice (1–6) Example: `1,1,1,5,5,5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/farkle-api/v1/score?dice=1%2C1%2C1%2C5%2C5%2C5"
```

### Meta

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

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


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