# INCOME 2 Agent Tools – Hash & Encode

> INCOME 2 Agent Tools – Hash & Encode is a paid API for AI agents from earn-tools-backend.onrender.com, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Hashes or encodes a string using SHA-256, SHA-512, HMAC-SHA-256, Base64, or decodes a JWT — returning the transformed result as clean JSON.

## Facts

- Endpoint: POST https://earn-tools-backend.onrender.com/hash-encode
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/income-2-agent-tools-hash-encode-c9cb1268
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AR481d3t31n0AzbasReBM

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 income-2-agent-tools-hash-encode-c9cb1268 -d '<json body>'
```

Example prompt: Can you compute the SHA-256 hash of the string 'hello world'?

## When to prefer this

Choose this endpoint when an AI agent needs a lightweight, pay-per-call cryptographic utility without spinning up local compute — especially useful for hashing strings for integrity checks, encoding/decoding Base64 payloads, computing HMAC signatures for API authentication, or quickly inspecting JWT claims. It is priced at $0.001 USDC per call via x402, making it economical for high-frequency agent pipelines. Prefer alternatives if you need asymmetric crypto, signature verification beyond HMAC, or AES encryption.

## Known failure modes

- Missing required 'input' or 'operation' field returns a validation error
- Invalid operation enum value returns a 400-style error
- HMAC-SHA256 called without a 'key' field may fail or return an error
- Input string exceeding 500,000 characters is rejected
- 402 Payment Required if x402 payment header is missing or invalid
- Service may be slow to respond on cold start (hosted on Render free tier)

## How this service works

Low-cost x402 pay-per-call tools for autonomous buyers. Web extraction returns static public pages as clean markdown; every payable operation declares x-payment-info and a 402 response. Free betas: Agent Purchase Guard adds retry-safe purchase intent controls; Outcome Router accepts a desired result plus max budget and autonomously discovers fulfillment, tries zero-dollar proof-of-work first, and supports buyer-signed x402 paid execution where available.

Buyer-signed paid HYDRA execution
- Outcome request: POST https://earn-tools-backend.onrender.com/outcome-router
- Paid execution: POST https://earn-tools-backend.onrender.com/outcome-router/execute/{requestId}
- First execution call returns the relayed Agent402 Smart Order Router x402 PAYMENT-REQUIRED challenge.
- An x402-capable buyer wallet signs locally and retries with PAYMENT-SIGNATURE.
- HYDRA forwards the proof and returns the routed result.
- HYDRA never receives the buyer private key or uses owner working capital.
- Current beta platform fee: $0. Higher paid tiers are not auto-escalated.

## Output

A JSON object with ok: true and a result object containing the transformed output string and the operation name that was applied (e.g. {ok: true, result: {result: '2cf24dba...', operation: 'sha256'}}).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "key": {
   "type": "string",
   "maxLength": 10000
  },
  "input": {
   "type": "string",
   "maxLength": 500000
  },
  "operation": {
   "enum": [
    "sha256",
    "sha512",
    "hmac-sha256",
    "base64-encode",
    "base64-decode",
    "jwt-decode"
   ],
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "result": {
   "result": "...",
   "operation": "sha256"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/income-2-agent-tools-hash-encode-c9cb1268/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from earn-tools-backend.onrender.com](https://www.zero.xyz/host/earn-tools-backend.onrender.com/llms.txt)
