{"uid":"cap_lWz6N2ljY8He_XsSaIyQ8","slug":"omniapi-jwt-encode-72402ce7","name":"OmniAPI JWT Encode","description":"444 endpoints across 9+ chains. Crypto, AI, Social, Finance, Weather, Tools. Pay per call in USDC via x402 with 4 facilitators: Dexter, Meridian, FluxA, GoPlausible.","url":"https://omni-api-cyan.vercel.app/api/tools/jwt/encode","method":"POST","headers":{},"bodySchema":{"type":"object","required":["query"],"properties":{"input":{"type":"string","description":"Input data for the endpoint"},"query":{"type":"string","description":"Search query or input text"},"params":{"type":"object","description":"Additional parameters"}}},"responseSchema":{"type":"object","description":"API response data"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.138574","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.138574/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.138574","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.138574","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8Y8FDaawg9_m-oRHqP10s","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.138574","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Encodes a payload into a signed JSON Web Token (JWT) for use in authentication and authorization flows.","exampleAgentPrompt":"Can you encode this payload into a JWT for me? The payload is {\"userId\": \"abc123\", \"role\": \"admin\", \"exp\": 1719878400} — I need a signed token I can use for API authentication.","exampleUseCases":[{"title":"Generate auth token for API access","prompt":"I need to create a JWT token from this user payload: {\"sub\": \"user_42\", \"email\": \"alice@example.com\", \"role\": \"editor\"} so I can authenticate API requests — can you encode it for me?"},{"title":"Sign session claims for a web app","prompt":"Encode these session claims into a signed JWT: {\"sessionId\": \"sess_789\", \"userId\": \"u001\", \"iat\": 1700000000, \"exp\": 1700086400} — I need it to secure my web app's session management."},{"title":"Create a bearer token for service-to-service auth","prompt":"I'm setting up service-to-service authentication and need a JWT bearer token encoded from this payload: {\"service\": \"billing\", \"scope\": \"read:invoices\", \"exp\": 1720000000} — can you generate that for me?"}],"resultDescription":"Returns a signed JWT string (typically in the format header.payload.signature) that can be used as a bearer token or credential in downstream authentication flows.","failureModes":["Invalid or malformed JSON payload results in encoding error","Missing required 'query' field returns a 400-level error","Expired or invalid signing key causes token generation failure","Oversized payload may be rejected depending on token size limits","Payment failure via x402 protocol returns 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when you need a simple, pay-per-call JWT encoding service without managing your own signing infrastructure. It is well-suited for agents or serverless workflows that occasionally need to mint tokens without a dedicated auth server. If you require asymmetric key signing (RS256/ES256) or fine-grained algorithm control, a dedicated auth provider may be preferable.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:51:35.193Z","isFirstParty":false}