# x402 Hash API – JWT Decode

> x402 Hash API – JWT Decode is a paid API for AI agents from x402-hash-api.vercel.app, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-01).

Decodes a JWT token into its header and payload components, with a verification flag, for $0.002 USDC per call via x402 micropayment

## Facts

- Endpoint: POST https://x402-hash-api.vercel.app/api/v1/jwt-decode?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x402-hash-api-jwt-decode-81d4deaa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OsZ0a2nVyUpDG44OJPyZ_

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 x402-hash-api-jwt-decode-81d4deaa -d '<json body>'
```

Example prompt: Can you decode this JWT for me so I can see the header and payload claims? Here's the token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

## When to prefer this

Choose this endpoint when you need a quick, pay-per-call JWT decode without setting up a local JWT library or managing dependencies. Ideal for AI agents that occasionally need to inspect token claims at runtime, debug authentication flows, or extract user identity from tokens in a serverless, stateless manner. Prefer alternatives if you need signature verification against a known secret or JWKS endpoint, or if you are decoding tokens at high volume where per-call cost accumulates.

## Known failure modes

- Malformed JWT (not three base64url segments separated by dots) returns an error
- Missing or empty 'token' field in request body causes a validation error
- Expired or invalid signature may result in verified=false rather than an error
- Network or Vercel cold-start latency on first call
- Payment failure if USDC balance insufficient for $0.002 fee

## How this service works

Pay-per-call hashing and encoding for AI agents (USDC on Base)

## Output

Returns a JSON object with three fields: 'header' (the decoded JWT header as an object, e.g. algorithm and token type), 'payload' (the decoded JWT claims as an object, e.g. sub, iat, exp, custom claims), and 'verified' (a boolean indicating whether the signature was verified).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "token": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "header": {},
  "payload": {},
  "verified": false
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402-hash-api-jwt-decode-81d4deaa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402-hash-api.vercel.app](https://www.zero.xyz/host/x402-hash-api.vercel.app/llms.txt)
