# AgentKit JWT Encode

> AgentKit JWT Encode is a paid API for AI agents from api.firstmention.uk, paid per call via x402, $0.01/call, status unknown (last checked 2026-11-20).

Encodes a JWT token with a given algorithm and payload using the agentkit service

## Facts

- Endpoint: POST https://api.firstmention.uk/s/agentkit/encode?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentkit-jwt-encode-8d894199
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rHkmR0YZRWuoVlVqjlMGo

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 agentkit-jwt-encode-8d894199 -d '<json body>'
```

Example prompt: Can you encode a JWT for me using agentkit — the subject should be '123' and I need the header to use alg 'none', with the standard payload fields?

## When to prefer this

Use this endpoint when you need a lightweight, pay-per-call JWT encoding service that integrates with the x402 micropayment protocol on Base. It is best suited for agents operating in crypto-native environments where USDC micropayments are preferred over API key subscriptions, and where simple JWT creation (especially with alg:none for testing or internal use) is needed without spinning up a full auth library.

## Known failure modes

- Missing or invalid 'op' field results in unrecognized operation error
- Malformed 'input' string may cause JSON parse failure or encoding error
- Unsupported algorithm specified in header may return an error or fallback
- Payment not included or insufficient USDC causes HTTP 402 response
- Network or service unavailability returns a 5xx error

## How this service works

Pay-per-call HTTP APIs, paid with x402 in USDC on Base (eip155:8453): agentkit, api-change-check, basedue, bizcal-api, chainread, check-sanctions, chgwatch, company-facts, domain-intel, domainkit, domfacts, due, edgar, funding-rates, fundinglens, pageaudit, solcheck, token-dd, txpreflight, walletprofile, web-extract, webmd, webread, websearch, x402-preflight, x402check, x402index. Each operation describes its service.

## Output

A JSON object containing the encoded JWT structure with two fields: 'header' (e.g. {"alg":"none"}) and 'payload' (e.g. {"sub":"123"}), representing the decoded components of the generated JWT token.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string"
  },
  "budget": {
   "type": "number"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "header": {
   "alg": "none"
  },
  "payload": {
   "sub": "123"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentkit-jwt-encode-8d894199/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.firstmention.uk](https://www.zero.xyz/host/api.firstmention.uk/llms.txt)
