Score state for tennis, golf handicap differentials and cricket overs

$0.005 USDC per call · Business, finance and compliance · POST /api/v1/score-state · Id score-state

Replays a tennis point sequence (ITF Rules of Tennis: games, deuce, tie-breaks, match tie-break, who serves), computes a golf Score Differential and Handicap Index (World Handicap System), or tallies a cricket innings ball by ball (overs.balls, wides and no-balls, maidens, wickets), for agents that must verify a reported score. Optionally checks a claimed score against the replay and names the first illegal point or ball. Does NOT apply the WHS soft/hard cap, exceptional-score reductions or 9-hole expected scores, tennis variants beyond No-Ad and the final-set options, or cricket penalty runs; those return unknown or unsupported.

What you get

Catches a mistold score or an impossible point sequence for one $0.005 call.

Call it

Send the JSON body below to https://agents.writerslogic.com/api/v1/score-state. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.

curl -i -X POST https://agents.writerslogic.com/api/v1/score-state \
  -H 'content-type: application/json' \
  -d '{"sport":"tennis","tennis":{"points":"aaaabbbbaaaabbbbaabaaabbbbbbaaaaaa","bestOf":3,"claim":{"setsWon":[0,0]}}}'

Input

FieldTypeRequiredDescription
sportstring; one of "tennis", "golf", "cricket"yesSelects which block below is read.
tennisobjectnoFor sport=tennis.
golfobjectnoFor sport=golf: a round, a list of differentials, or both.
cricketobjectnoFor sport=cricket: one innings, ball by ball.

Example request body

{
  "sport": "tennis",
  "tennis": {
    "points": "aaaabbbbaaaabbbbaabaaabbbbbbaaaaaa",
    "bestOf": 3,
    "claim": {
      "setsWon": [
        0,
        0
      ]
    }
  }
}

Result

The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.

FieldTypeRequiredDescription
statusstring; one of "pass", "fail", "unknown", "unsupported"nopass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass.
sportstringno
stateanynoSport-specific state. Tennis: setsWon, sets, games, points, gameScore, server, winner. Golf: scoreDifferential, handicapIndex and inputs. Cricket: overs, runs, wickets, extras, maidens, overSummaries.
summarystringnoOne-line score.
witnessesarray<object>no
versionsobjectnoEvery semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile).
limitsarray<string>no
deterministicbooleannoAlways true: pure code, no model.

Pay and connect

Available through: x402 (USDC on Base), MCP. MCP clients reach it through the creative-games-kit package.

Machine-readable