{"openapi":"3.1.0","info":{"title":"JWT API","version":"1.0.0","description":"A fast, fully-local JSON Web Token toolkit: sign a JSON payload into a JWT, verify a token signature together with its exp and nbf claims using a constant-time comparison, and decode a token header and payload without verifying. Supports the HMAC algorithms HS256, HS384 and HS512, automatically adds the iat claim and an exp claim from expires_in. Built on Node crypto and secrets are never logged, so responses are instant, private and always available. Every endpoint accepts input via the query string or the request body. Ideal for authentication, API gateways, session and token tooling, microservices and webhooks.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/jwt-api","description":"oanor gateway"}],"tags":[{"name":"JWT"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/decode":{"get":{"operationId":"get_v1_decode","tags":["JWT"],"summary":"Decode a JWT (no verify)","description":"","parameters":[{"name":"token","in":"query","required":true,"description":"JWT to decode","schema":{"type":"string"},"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjMifQ.4HhAh4FVL4hWfDw6Q3RZ4nM6F1mC_8h0nC9HxQ-uXyk"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"header":{"alg":"HS256","typ":"JWT"},"payload":{"sub":"123"},"signature_present":true},"meta":{"timestamp":"2026-05-30T10:10:54.829Z","request_id":"dcfff290-91f7-41db-9f90-903189cad298"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/sign":{"get":{"operationId":"get_v1_sign","tags":["JWT"],"summary":"Sign a JWT","description":"","parameters":[{"name":"payload","in":"query","required":true,"description":"JSON payload object","schema":{"type":"string"},"example":"{\"sub\":\"123\",\"name\":\"Ada\"}"},{"name":"secret","in":"query","required":true,"description":"Signing secret","schema":{"type":"string"},"example":"your-256-bit-secret"},{"name":"algorithm","in":"query","required":false,"description":"HS256, HS384 or HS512","schema":{"type":"string"},"example":"HS256"},{"name":"expires_in","in":"query","required":false,"description":"TTL in seconds (adds exp)","schema":{"type":"string"},"example":"3600"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjMiLCJuYW1lIjoiQWRhIiwiaWF0IjoxNzgwMTM1ODU0LCJleHAiOjE3ODAxMzk0NTR9.ioG5FjyOLaRMsefX8sAk_8z5KnTsj6ADuJxIbSKkbxc","header":{"alg":"HS256","typ":"JWT"},"payload":{"exp":1780139454,"iat":1780135854,"sub":"123","name":"Ada"},"algorithm":"HS256"},"meta":{"timestamp":"2026-05-30T10:10:54.903Z","request_id":"14145667-35c5-49d8-b70f-1762721e3178"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/verify":{"get":{"operationId":"get_v1_verify","tags":["JWT"],"summary":"Verify a JWT","description":"","parameters":[{"name":"token","in":"query","required":true,"description":"JWT to verify","schema":{"type":"string"},"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjMifQ.4HhAh4FVL4hWfDw6Q3RZ4nM6F1mC_8h0nC9HxQ-uXyk"},{"name":"secret","in":"query","required":true,"description":"Signing secret","schema":{"type":"string"},"example":"your-256-bit-secret"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"error":"signature verification failed","valid":false},"meta":{"timestamp":"2026-05-30T10:10:54.984Z","request_id":"20073e8a-8973-42ab-ad79-0779cde17829"},"status":"ok","message":"OK","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":6000,"rps_limit":2,"hard_limit":true},{"slug":"basic","name":"Basic","price_cents_month":600,"monthly_call_quota":125000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2000,"monthly_call_quota":850000,"rps_limit":25,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":5000,"monthly_call_quota":4500000,"rps_limit":80,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/jwt-api"}