# code402 Context Distill

> code402 Context Distill is a paid API for AI agents from hcrb.in, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-12).

Offline deterministic text distillation that extracts word count, top words, content hash, and first sentence from input text — paid per call via x402 USDC micropayments on Base.

## Facts

- Endpoint: POST https://hcrb.in/v1/tools/context-distill/call?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/code402-context-distill-e08114c5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_QIxXIUvBDY541gWbGMlNc

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability code402-context-distill-e08114c5 -d '<json body>'
```

Example prompt: Can you distill this contract clause for me — give me the word count, meaningful word count, top words, first sentence, and a content hash: 'The Tenant agrees to pay rent on the first of each month. Failure to do so will result in a late fee of 5% of the monthly rent amount.'

## When to prefer this

Choose this endpoint when you need fast, offline, deterministic text distillation with no ML inference or external scraping — particularly when reproducibility and content hashing matter (e.g. deduplication, audit trails). It is ideal for agents that need to fingerprint, summarize statistics, or extract top words from text in a privacy-preserving way. The micropayment model ($0.005/call via x402 USDC) makes it cost-effective for high-volume processing at scale. Prefer it over ML-based summarizers when you need deterministic, verifiable outputs rather than generative paraphrases.

## Known failure modes

- Invalid or empty input text returns valid:false with zeroed metrics
- Payment not included or insufficient USDC triggers HTTP 402 before processing
- Malformed POST body returns error before distillation occurs
- Rate limit exceeded beyond 3 free calls/day without payment causes rejection

## How this service works

Offline deterministic checks (no ML, no scraping) for business identifiers and rental due-diligence, paid per call via x402 (gasless EIP-3009 USDC on Base). Checksum-verifiable (IBAN, LEI, VAT, ABA, ISBN, SEDOL…) vs format-only (EIN, IFSC, SWIFT/BIC…) — every response returns a scope field. Non-custodial, signed receipts. First 3 calls/day free.

## Output

A JSON object containing: valid (boolean), word_count (total words), meaningful_word_count (non-filler words), top_words (array of frequent/significant terms), content_hash (deterministic hex hash of the input), first_sentence (extracted opening sentence), tool (endpoint identifier), and scope (describing what validation or analysis was applied).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "text"
   ],
   "properties": {
    "text": {
     "type": "string",
     "description": "Arbitrary text to distill (any length; hashing is over the exact input)."
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "schema": {
  "type": "object",
  "required": [
   "valid",
   "word_count"
  ],
  "properties": {
   "tool": {
    "type": "string"
   },
   "scope": {
    "type": "string"
   },
   "valid": {
    "type": "boolean"
   },
   "top_words": {
    "type": "array"
   },
   "word_count": {
    "type": "number"
   },
   "content_hash": {
    "type": "string"
   },
   "first_sentence": {
    "type": "string"
   },
   "meaningful_word_count": {
    "type": "number"
   }
  }
 },
 "example": {
  "valid": true,
  "top_words": [],
  "word_count": 0,
  "content_hash": "0x…",
  "first_sentence": "",
  "meaningful_word_count": 0
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/code402-context-distill-e08114c5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hcrb.in](https://www.zero.xyz/host/hcrb.in/llms.txt)
