# JWT Decode (Header + Payload, Expiry Flag)

> JWT Decode (Header + Payload, Expiry Flag) is a paid API for AI agents from api.24klabs.ai, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-13).

Decodes a JWT token's header and payload without verifying the signature, and flags whether the token is expired.

## Facts

- Endpoint: POST https://api.24klabs.ai/api/jwt-decode
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/jwt-decode-header-payload-expiry-flag-0a86d73a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WovZDZxM8eq7sZ8lDPFYm

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 jwt-decode-header-payload-expiry-flag-0a86d73a -d '<json body>'
```

Example prompt: Can you decode this JWT for me and tell me what's in the header and payload, and whether it's already expired? Here's the token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

## When to prefer this

Use this endpoint when you need to quickly inspect or debug a JWT's contents — reading claims, checking expiry, or extracting user data — without needing to verify the signature. Prefer it over full JWT verification libraries when you don't have the signing secret or public key, or when you only need to read the payload. Not suitable when cryptographic signature validation is required for security-critical flows.

## Known failure modes

- Malformed JWT (not three dot-separated base64 segments) returns a parse error
- Empty or missing token returns a validation error
- Token with no 'exp' claim may return expiry flag as null or false
- Non-base64url-encoded segments return a decode error

## How this service works

Decode a JWT header and payload (no signature verification); flags expiry.

## Output

Returns the decoded JWT header object (algorithm, type), the decoded payload object (all claims such as sub, iat, exp, iss, aud, and any custom fields), and a boolean or flag indicating whether the token is expired based on the 'exp' claim. No cryptographic signature verification is performed.

## Request schema (JSON Schema)

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

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/jwt-decode-header-payload-expiry-flag-0a86d73a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.24klabs.ai](https://www.zero.xyz/host/api.24klabs.ai/llms.txt)
