{"uid":"cap_gVgkY-3gWYC1x1RvUFrG6","slug":"evm-unit-conversion-api-pastable-x402-b59c2d02","name":"EVM Unit Conversion API (pastable-x402)","description":"Pay-per-call utility APIs for agents: EVM helpers (checksum, unit conversion, keccak), data transforms (CSV to JSON, JSON diff, URL canonicalisation), text tools (hashing, JWT decode), and Bazaar market intelligence. x402 on Base mainnet.","url":"https://pastable-x402.pages.dev/evm/units","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["amount","from","to"],"properties":{"to":{"type":"string","description":"wei|gwei|ether"},"from":{"type":"string","description":"wei|gwei|ether"},"amount":{"type":"string","description":"string"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object"}}},"responseSchema":{"type":"json","example":{"to":"wei","wei":"1000000000000000000","from":"ether","input":"1","result":"1000000000000000000"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iDaQ2cOgbWfOMFMQ3gvVY","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts Ethereum unit amounts between wei, gwei, and ether denominations","exampleAgentPrompt":"Convert 1.5 ether to wei for me — I need the exact wei value to pass into a smart contract call.","exampleUseCases":[{"title":"Smart contract ETH input normalization","prompt":"I need to pass a payment amount of 0.05 ether into a smart contract but it expects wei — can you convert 0.05 ether to wei for me?"},{"title":"Gas price display conversion","prompt":"The gas price on this transaction is 15000000000 wei — can you convert that to gwei so it's easier to read?"},{"title":"DeFi balance human-readable formatting","prompt":"My wallet balance shows 2500000000000000000 wei — convert that to ether so I can display it to the user."}],"resultDescription":"A JSON object containing the original input amount, the source unit, the target unit, and the converted result as a string — e.g. {\"input\":\"1\",\"from\":\"ether\",\"to\":\"wei\",\"result\":\"1000000000000000000\",\"wei\":\"1000000000000000000\"}","failureModes":["Missing required query parameters (amount, from, to) returns an error","Invalid unit string (not wei, gwei, or ether) causes a bad request","Malformed amount string (non-numeric) may return a conversion error","Payment failure via x402 protocol on Base mainnet prevents the call","Very large or very small numbers may hit precision limits"],"whenToPreferThis":"Use this endpoint when an AI agent needs precise, programmatic EVM unit conversion (wei/gwei/ether) without implementing the conversion logic itself. Especially useful in smart contract interaction workflows where exact wei values are required, or when displaying human-readable ETH amounts from raw on-chain data. Prefer this over manual calculation to avoid floating-point precision errors common in ETH unit math.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:36:32.624Z","isFirstParty":false}