# NexusAPI JWT Encode

> NexusAPI JWT Encode is a paid API for AI agents from nexus-api-virid.vercel.app, paid per call via x402, $0.138574/call, status unknown (last checked 2026-09-15).

Encodes a payload into a signed JSON Web Token (JWT)

## Facts

- Endpoint: POST https://nexus-api-virid.vercel.app/api/tools/jwt/encode
- Price: $0.138574/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/nexusapi-jwt-encode-1fbfefc8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vRyHvPU8Ufna8BWiqFesF

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 nexusapi-jwt-encode-1fbfefc8 -d '<json body>'
```

Example prompt: Can you encode this payload into a JWT token: {"userId": "abc123", "role": "admin", "exp": 1718000000}?

## When to prefer this

Use this endpoint when you need a quick, no-setup JWT encoding capability without managing your own JWT library or secret rotation. It's ideal for AI agents that need to issue tokens on the fly as part of an automated workflow, especially when paying per call via USDC on Base is acceptable. Prefer it over rolling your own JWT signing when you need a stateless, API-accessible encoding step in a pipeline.

## Known failure modes

- Invalid or malformed payload JSON causes encoding failure
- Missing required claims may result in an incomplete token
- Unsupported algorithm specified returns an error
- Overly large payload may be rejected
- Network timeout or server error returns a 5xx response

## How this service works

Crypto, AI, Social Media, Finance, Weather, Tools &amp; more. Pay per call in USDC on Base. No API keys.

## Output

Returns a signed JWT string (three dot-separated Base64URL-encoded segments: header, payload, signature) that can be used as a bearer token or passed to a JWT decode/verify endpoint.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "description": "Search query or input parameter"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "description": "API response data"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nexusapi-jwt-encode-1fbfefc8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from nexus-api-virid.vercel.app](https://www.zero.xyz/host/nexus-api-virid.vercel.app/llms.txt)
