{"openapi":"3.1.0","info":{"title":"Agent Payload Tools","version":"0.3.0","description":"Deterministic payload, encoding, crypto, JSON, JWT and transformation tools for AI agents. x402 v2 payments in USDC on Base and Solana.","contact":{"email":"agentpayloadtools@proton.me"}},"servers":[{"url":"https://api.agent-payload-tools.workers.dev"}],"x-x402":{"version":2,"scheme":"exact","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA"}]},"x-mcp":{"endpoint":"https://api.agent-payload-tools.workers.dev/mcp","transport":"streamable-http","toolCount":8},"paths":{"/stats":{"get":{"operationId":"stats","summary":"Aggregate paid-usage telemetry","description":"Free privacy-minimal aggregate x402 settlement and repeat-usage metrics.","tags":["telemetry"],"security":[],"responses":{"200":{"description":"Aggregate telemetry. No payer or transaction identifiers are exposed.","content":{"application/json":{"schema":{"type":"object"}}}},"503":{"description":"Telemetry storage temporarily unavailable","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/hash":{"post":{"operationId":"hash","summary":"SHA256 Hash Checksum","description":"Hash text, strings, or UTF-8 payload data with SHA256, SHA384, or SHA512. Compute a cryptographic hash, checksum, or digest for payload integrity, content fingerprinting, cache keys, and verifying that data has not changed. x402 price: $0.001 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"input":{"default":"","description":"UTF-8 text to hash.","type":"string"},"algorithm":{"type":"string","enum":["SHA-256","SHA-384","SHA-512"],"description":"Digest algorithm. Defaults to SHA-256."}}},"example":{"input":"hello","algorithm":"SHA-256"}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.001","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"1000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"1000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/base64":{"post":{"operationId":"base64","summary":"Base64 Encode Decode","description":"Base64 encode text or payload data, or Base64 decode a string back to UTF-8 text. Useful for Base64 encode/decode, API payload conversion, transport encoding, reversible text conversion, and decoding opaque payload strings. x402 price: $0.001 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"mode":{"type":"string","enum":["encode","decode"],"description":"Whether to encode or decode the input."},"input":{"default":"","description":"UTF-8 text or Base64 text, according to mode.","type":"string"}},"required":["mode"]},"example":{"mode":"encode","input":"hello"}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.001","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"1000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"1000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/hmac":{"post":{"operationId":"hmac","summary":"HMAC","description":"Create or verify an HMAC for a message or payload using SHA-256, SHA-384, or SHA-512. Useful for webhook signatures, shared-secret authentication, payload signing, and message integrity checks. x402 price: $0.001 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"input":{"default":"","description":"UTF-8 message to authenticate.","type":"string"},"secret":{"type":"string","minLength":1,"description":"HMAC secret for this call. It is not stored."},"algorithm":{"type":"string","enum":["SHA-256","SHA-384","SHA-512"],"description":"Digest algorithm. Defaults to SHA-256."},"expected_hex":{"description":"Optional hexadecimal digest to compare in constant time.","type":"string","pattern":"^[0-9a-fA-F]*$"}},"required":["secret"]},"example":{"input":"message","secret":"shared-secret","algorithm":"SHA-256"}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.001","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"1000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"1000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/json-validate":{"post":{"operationId":"json_validate","summary":"JSON Schema Validate","description":"Validate JSON data or an API payload against a compact JSON schema and return deterministic validation results. Check required fields, value types, object structure, and structured agent inputs. Useful as a JSON validator for API responses, request payloads, and schema checks. x402 price: $0.001 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"value":{"description":"JSON value to validate."},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Supported compact validation schema."}},"required":["value","schema"]},"example":{"value":{"name":"agent"},"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.001","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"1000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"1000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/jwt-inspect":{"post":{"operationId":"jwt_inspect","summary":"JWT Decode Inspect","description":"Inspect and decode a JWT token, including its header, claims, timestamps, and time validity, without verifying the signature. Useful for JWT claims inspection, token debugging, and payload analysis. x402 price: $0.001 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"token":{"type":"string","description":"JWT compact serialization to inspect."}},"required":["token"]},"example":{"token":"eyJhbGciOiJub25lIn0.eyJzdWIiOiIxMjMifQ."}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.001","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"1000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"1000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/text-diff":{"post":{"operationId":"text_diff","summary":"Text Compare Diff","description":"Compare two texts or strings and find what changed. Return a deterministic line-by-line text diff showing added, removed, modified, and unchanged lines. Useful for text comparison, string comparison, change detection, version comparison, and finding differences between two payloads. x402 price: $0.001 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"before":{"default":"","description":"Original text.","type":"string"},"after":{"default":"","description":"Updated text.","type":"string"}}},"example":{"before":"one\ntwo","after":"one\nthree"}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.001","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"1000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"1000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/pipeline":{"post":{"operationId":"pipeline","summary":"Pipeline","description":"Transform payload data through 1 to 12 deterministic steps in one call, including Base64 encode/decode, hex encode/decode, URL encode/decode, JSON parse/canonicalize, and SHA256/SHA512 hashing. Useful for multi-step data transformation, payload processing, encoding pipelines, decoding pipelines, and chained transformations. x402 price: $0.003 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"input":{"description":"Initial JSON-compatible value."},"operations":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["base64_encode","base64_decode","hex_encode","hex_decode","url_encode","url_decode","json_parse","json_canonicalize","sha256","sha512"],"description":"Deterministic operation to apply to the current value."}},"required":["type"]},"description":"Ordered deterministic transformations."}},"required":["input","operations"]},"example":{"input":"hello","operations":[{"type":"base64_encode"},{"type":"sha256"}]}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.003","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"3000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"3000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}},"/payload-inspect":{"post":{"operationId":"payload_inspect","summary":"Payload Inspect","description":"Inspect an unknown payload or string and detect whether it looks like JSON, JWT, Base64, hexadecimal, or URL-encoded data without executing code. Useful for payload identification, encoding detection, and deciding how to decode opaque input. x402 price: $0.003 USDC. Accepts Base mainnet or Solana mainnet.","tags":["payload-tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"http://json-schema.org/draft-07/schema#","type":"object","properties":{"input":{"type":"string","description":"Payload text to inspect heuristically."}},"required":["input"]},"example":{"input":"{\"agent\":true}"}}}},"x-x402":{"version":2,"scheme":"exact","price":"$0.003","accepts":[{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","payTo":"0x6B2683F66d35b91ED05a1646c0305b02260B6acB","amount":"3000"},{"network":"solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp","asset":"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v","payTo":"6cBob4SADGcWdsMPxkSnJ9GYL5EvmENkJnjfeVPBTxfA","amount":"3000"}]},"responses":{"200":{"description":"Successful deterministic result after payment settlement","content":{"application/json":{"schema":{"type":"object","required":["ok","result"],"properties":{"ok":{"const":true},"result":{"description":"Deterministic tool result"}}}}}},"400":{"description":"Invalid request; tool execution did not succeed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"x402 Payment Required. Inspect the PAYMENT-REQUIRED header and retry with PAYMENT-SIGNATURE.","headers":{"PAYMENT-REQUIRED":{"description":"Base64-encoded x402 v2 PaymentRequired object advertising Base and Solana USDC rails.","schema":{"type":"string"}}}},"503":{"description":"Payment facilitator configuration unavailable; execution remains fail-closed","content":{"application/json":{"schema":{"type":"object","required":["ok","error"],"properties":{"ok":{"const":false},"error":{"type":"string"},"code":{"type":"string"}}}}}}}}}}}