# s2ar.dev — the hosted tools, for agents s2ar.dev is a fantasy platform: a game engine, the tools that make worlds with it, and the worlds. This file is for agents. It describes the hosted tools at api.s2ar.dev, which give evidence an agent can hand on: deterministic assertions over an agent's output (assert), screenshot diffs (diff), image certification (certify), text grading against a poetic form (score), x402 endpoint inspection (inspect), and code reads by symbol over any public repository. No model sits behind a witness: every verdict is a signed, replayable record anyone can verify free. Every hosted route takes GET with query parameters or POST with a JSON body, costs cents, and answers 402 past the free allowance. Sales are paused since 2026-10-16: no rail is offered, verify is free, and a key already bought keeps working. Failed calls are never charged; nothing is kept about a caller. Pages for people: https://s2ar.dev/developers/ · the API reference: https://s2ar.dev/api/ ## Code reads, over any public repository No install: GET https://api.s2ar.dev/v1/sym/map?repo=owner/repo (a repo map, $0.01), /v1/sym/ls?repo=&file= (a file's skeleton), /v1/sym/read?repo=&file=&symbol= (one function's source), /v1/sym/find?repo=&name= (search by name), $0.005 each; /v1/sym/where?repo=&query= (search by meaning, an index built once per checkout) $0.01; POST with the same fields as JSON works too. MCP over HTTP: claude mcp add s2ar --transport http https://api.s2ar.dev/mcp --header "Authorization: Bearer " (tools sym_map_repo, sym_ls_repo, sym_read_repo, sym_find_repo, sym_where_repo, score_text, certify_image, buy_credits, and the rest the reference lists; while sales are paused buy_credits sells nothing and an x402_payment argument is refused). ## certify — compress the image, prove the model still reads it GET https://api.s2ar.dev/v1/certify?image_url=https://…/invoice.png&probe=ocr (or POST {image_url | image_b64, probe}, or multipart original [+ compressed] to audit a transform someone else made): the image is compressed to the smallest version a vision model reads the same way, and the answer is a signed Assay record; GET /v1/verify/{record_sha256} is free, forever (the trust layer is never paywalled). $0.01 a call; MCP tool certify_image. Measured over 12,123 sealed VLM calls: 0.96–0.97 answer retention at 12–22% billed savings. Page: https://s2ar.dev/lab.html ## assert — an agent's output, checked; a signed record GET https://api.s2ar.dev/v1/assert?text=…&checks=[{"check":"json_schema","schema":{…}},{"check":"quotes_in_source"}]&source=… (or POST {text | json, checks | rubric, source?, schema?}): JSON validity and schema (Draft 2020-12), required or banned keys and terms, lengths, guarded regexes, numbers in range, citations present, quotations found verbatim in a source, URLs under allowed domains, the poetry verifiers; or a named rubric (strict-json, api-response, cited-answer, quotes-source, no-hedging). Every check is a pure function of its inputs: the same output gets the same verdict, each result names where it failed, and the answer is a signed Assay record anyone can verify free at /v1/verify/{record_sha256}; the text is never kept. $0.005 a call; MCP tool assert_output; GET /v1/assert/checks lists the kinds, free. ## inspect — what an x402 endpoint declares, checked and signed GET https://api.s2ar.dev/v1/x402/inspect?resource=[&method=GET|POST]: one unpaid probe (no payment, no body, no identity; public hosts on 80/443; no redirects) and eleven checks — a 402, the v2 PAYMENT-REQUIRED header, well-formed accepts with the token's signing domain, a price in a dollar token, a resource naming the probed URL, a Bazaar extension that validates against its own schema and declares the probed method, a description, no-store, Coinbase's validator verdict. Every check names its evidence; the answer is a signed Assay record (30-day expiry; a probe is a point in time). $0.005 a call; MCP tool inspect_x402; GET /v1/x402/inspect/checks lists the checks, free. ## score — evidence about a text, not an opinion GET https://api.s2ar.dev/v1/score?text=…&form=haiku (or POST {text, form | spec}): programmatic verifiers (meter, rhyme, syllables; the pronouncing dictionary named by version in every answer) against a named form (GET /v1/score/forms, free, with the acceptance policy) or an inline spec; the verdict is gated (exact line count, content floor, no credit for identical end words, a floor under every dimension), every gate names its evidence, and the answer is a signed record. $0.005 a call; MCP tool score_text. The battery that made the gates: https://s2ar.dev/examples/verse-certification.html ## The engine, its worlds, and StarScript https://s2ar.dev/ — the home is a world on the engine: a crater on a small planet, simulated live in the browser where it runs WebGPU, with a tutorial in StarScript beside it. A world is a cart named by its record: https://s2ar.dev/lab/?r= opens it on the engine, https://s2ar.dev/play/ on the reference player, and https://s2ar.dev/carts//record.json is its sealed record (the same seed and ops replay to the same digest). StarScript, the scripts on StarBoard's cards (say, choice, ask, set, when, branch, goto, label, end; the hooks openCard, closeCard and onClick; the tell bridge, `set tell.world "meteor"`, which a board's page hears as an sb-tell event): https://s2ar.dev/developers/starscript/ . A visitor who struck the home's world can take it: a starlab.tape/1 cart (the world as it opened, every strike at the frame it landed, the digests measured), which the open twin replays to the same digest (`starlab-replay play `). ## Worked examples https://s2ar.dev/examples/ — six walkthroughs run for real against api.s2ar.dev (read a function, pay per call, score a sonnet, certify a screenshot, verify a stranger's claim, read the proceedings), each receipt and record re-derived before publishing; and live demos on the free samples (score, verify, map, certify). ## Research https://s2ar.dev/examples/agent-markets.html — the agent markets measured daily (who gets paid, prices, where evidence sells, our own position), every number a living number from the snapshot; aggregates in the site repo. ## The MCP server https://api.s2ar.dev/mcp (Streamable HTTP) — the hosted tools as MCP tools; a key is optional (Authorization: Bearer ). Page: https://s2ar.dev/mcp.html ## Paying as an agent Sales are paused since 2026-10-16 (the charter, clause 3): every metered endpoint still answers HTTP 402 past the free allowance, but the quote lists no rail (rails []), carries no x402 accepts and no card pack, and names the pause in a `paused` object. A key already bought keeps working (Authorization: Bearer ) until its credit is spent. A payment sent anyway is refused and never settled. Money never moves for a failed call. Ten keyless calls a day are free on each plain route (three for certify or a starbox shot, one for an audit); signing in grants $1.00. The /x402/... mirror of each route answers 410 while sales are paused, and the x402 manifest https://api.s2ar.dev/.well-known/x402 answers 404: nothing is listed that cannot be paid. OpenAPI with prices, parameters and examples: https://api.s2ar.dev/openapi.json ## Assay — the evidence Every answer carries a receipt (X-Assay-Receipt: sha256 of the answer). certify answers are Assay records: sealed, signed by the issuer's key at https://api.s2ar.dev/.well-known/assay.json, and verifiable by anyone, free, at GET /v1/verify/{record_sha256} (or POST /v1/verify with a record you were handed). The standard, in brief: https://s2ar.dev/developers/assay/. The issuer signs its own day at https://api.s2ar.dev/.well-known/proceedings.json (calls paid, delivered and credited, latency, what the money cannot buy) and runs under https://api.s2ar.dev/charter. ## The reference https://s2ar.dev/reference/ — the web engine read from its own sources and held to them by a drift gate: the twin's WebAssembly exports, the worker's messages, the view's look, the player, the board runtime (its events, its walker, its editor), StarScript's verbs and the tells, the formats, the apps' verbs; the twin runs in the page where an entry can be shown, each demo pinned to the digest it rests at and each board to the lines it speaks. Every page is a markdown file served beside it as plaintext: https://s2ar.dev/reference/index.md, then /reference/guides/start.md, /reference/engine.md, /reference/worker.md, /reference/view.md, /reference/player.md, /reference/board.md, /reference/starscript.md, /reference/formats/world-tape.md, /reference/formats/world-edition.md, /reference/formats/script.md, /reference/cli/guide.md, /reference/cli/index.md, /reference/verbs/index.md, /reference/verbs/launcher.md, /reference/verbs/startune.md, /reference/verbs/starsaga.md, /reference/verbs/starboard.md, /reference/verbs/starplot.md, /reference/verbs/starlore.md, /reference/verbs/blender.md, /reference/verbs/demogolf.md. (tools/publish.sh appends this section to /llms.txt in the publish that ships the reference; tools/reference_pages.py writes it from its page list.)