LYRENTH
HomePricingIntegrationsDocsBlogBenchmarksIndex statsAboutContact
◇ BenchmarkFrontend

React useState reference: 92.7% fewer tokens.

The most-visited hook reference on react.dev. Read through the Lyrenth index, the page becomes one clean AIDocument of 8,156 tokens instead of 111,042 tokens of raw HTML: 14x smaller for every agent that reads it. Numbers straight from the API's economics block, measured 2026-07-05.

Raw HTML · 111,042 tokens
AIDocument · 8,156 tokens
Cost to ingest raw HTML$0.333
Cost to ingest the AIDocument$0.024
Saved, per read, per agent$0.309

Basis: $3.00 per 1M input tokens (Claude Sonnet / GPT-4 Turbo class), as reported in the API's economics block. Source page: https://react.dev/reference/react/useState

Reproduce it

One call, same numbers.

Every AIDocument response carries its own economics block, so this benchmark reproduces itself:

curl -X POST https://api.lyrenth.com/v1/aidocument \
  -H "Authorization: Bearer $LYRENTH_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://react.dev/reference/react/useState"}'
Get API access Free tier · no credit cardAll benchmarks