List the file before you read it

List the file before you read it. A 7,700-line file has 1,088 symbols, and an agent that reads it whole spends the tokens of a small book before it knows which function it wants. sym/ls returns the file’s skeleton, every definition with its line range, for half a cent; the read that follows is one symbol. The quote comes first, keyless, on the /x402 mirror, the way an agent sees it.

2calls answered
1receipt re-hashed
0records verified
$0.005list price for a stranger
692ms end to end
delivered

Run 2026-10-11 05:26 UTC against api.s2ar.dev 0.1.1 · 2 calls · 692 ms · list price $0.005 for a stranger (these ran on the operator's key and cost nothing) · every number on this page re-derived by tools/walkthrough.py before it was written

1. The quote, keyless, on the mirror

A GET with query parameters, no key: the /x402 mirror answers 402 with the price, the rails and example_get, and spends no free sample.

curl -s -X GET 'https://api.s2ar.dev/x402/v1/sym/ls?repo=BurntSushi/ripgrep&ref=14.1.1&file=crates/core/flags/defs.rs'

→ HTTP 402 · 126 ms

price_usd0.005
rails["x402", "credits"]
example_gethttps://api.s2ar.dev/x402/v1/sym/ls?repo=BurntSushi%2Fripgrep&ref=14.1.1&file=crates%2Fcore%2Fmain.rs
free.per_day_keyless10
how_to_payPay per call with USDC on Base over x402 (no key: sign the 402's accepts[0], resend with PAYMENT-SIGNATURE); or buy a $5 pack by card and send Authorization:…
the answer, as JSON
{
  "price_usd": 0.005,
  "rails": [
    "x402",
    "credits"
  ],
  "example_get": "https://api.s2ar.dev/x402/v1/sym/ls?repo=BurntSushi%2Fripgrep&ref=14.1.1&file=crates%2Fcore%2Fmain.rs",
  "free.per_day_keyless": 10,
  "how_to_pay": "Pay per call with USDC on Base over x402 (no key: sign the 402's accepts[0], resend with PAYMENT-SIGNATURE); or buy a $5 pack by card and send Authorization:…"
}

2. The skeleton of the file

Every definition in defs.rs with its line range, nothing else; the receipt is over the canonical answer.

curl -s -X POST 'https://api.s2ar.dev/v1/sym/ls' \
  -H "Authorization: Bearer $S2AR_KEY" \
  -H 'content-type: application/json' \
  -d '{"repo": "BurntSushi/ripgrep", "ref": "14.1.1", "file": "crates/core/flags/defs.rs"}'

→ HTTP 200 · 566 ms · list price $0.005 · receipt sha256:9f15613dc02c919a…

tokens_est13302
receipt.evidence_hashsha256:9f15613dc02c919a…
the answer, as JSON
{
  "tokens_est": 13302,
  "receipt.evidence_hash": "sha256:9f15613dc02c919aa1217ffc75ce6082c6117a3621d2ff8fed580617a7161d8b"
}

The text field:

crates/core/flags/defs.rs — 7675 lines, 1088 symbols
   44-152   pub(super) const FLAGS: &[&dyn Flag] = &[
  156-156   struct AfterContext;
  158-190   impl Flag for AfterContext
  159-161     fn is_switch(&self) -> bool
  162-164     fn name_short(&self) -> Option<u8>
  165-167     fn name_long(&self) -> &'static str
  168-170     fn doc_variable(&self) -> Option<&'static str>
  171-173     fn doc_category(&self) -> Category
  174-176     fn doc_short(&self) -> &'static str
  177-184     fn doc_long(&self) -> &'static str
  186-189     fn update(&self, v: FlagValue, args: &mut LowArgs) -> anyhow::Result<()>
  194-238   fn test_after_context()
  242-242   struct AutoHybridRegex;
  244-299   impl Flag for AutoHybridRegex
  245-247     fn is_switch(&self) -> bool
… 1073 more lines
re-derived by the generator
✓receipt sha256:9f15613dc02c919a… re-derived: sha256 over the canonical answer, header and body agree
✓the whole file is 230911 bytes, about 57,728 tokens; this answer is about 13,302 tokens: 44,426 tokens kept out of context

The skeleton is the map of one file the way sym/map is the map of one repository: definitions and their spans, no bodies. Read the function shows the step after this one.

What this cannot buy

From the signed proceedings (/.well-known/proceedings.json), verbatim:

Failed calls are never charged. Nothing about a caller is kept. The rules: the charter.