{"uid":"cap_bbUPGX_8FSB1QyUj-Xlcu","slug":"token-unit-converter-wei-gwei-ether-7e12d482","name":"Token Unit Converter (wei/gwei/ether)","description":"60 paid endpoints with no metering, no API key and no account. Each endpoint has one flat price per call, whatever the size of the request: LLM completions with automatic failover across several large models, read-only EVM tooling over Base, Ethereum, Polygon, Arbitrum and Optimism, and pure crypto utilities that touch no network.","url":"https://flat-rate-llm.kikoribera03.workers.dev/v1/util/units","method":"POST","headers":{},"bodySchema":{"type":"object","required":["to","from","amount"],"properties":{"to":{"type":"string","description":"wei | gwei | ether, or a number of decimals."},"from":{"type":"string","description":"wei | gwei | ether, or a number of decimals."},"amount":{"type":"string","description":"The quantity, as a string to avoid float loss."}}},"responseSchema":{"type":"object","properties":{"to":{"type":"string"},"from":{"type":"string"},"amount":{"type":"string"},"result":{"type":"string"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0025","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.0025/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0025","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Jsh8RCZzG9fDZf7OQZEm5","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0025","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts cryptocurrency token amounts between wei, gwei, ether, or any custom decimal precision using exact integer arithmetic — no floating-point errors.","exampleAgentPrompt":"Convert 1500000000000000000 wei to ether — I need an exact decimal string, no floating-point rounding.","exampleUseCases":[{"title":"Display ETH balance in human-readable form","prompt":"I got a raw balance of 2750000000000000000 back from the Ethereum RPC — convert that from wei to ether so I can show it properly in the UI."},{"title":"Prepare USDC transfer amount in raw units","prompt":"I want to send 42.5 USDC which uses 6 decimals — convert 42.5 from 6-decimal units to raw integer form (no decimals) so I can pass it to the contract."},{"title":"Gas price conversion for display","prompt":"The network returned a gas price of 15000000000 — convert that from wei to gwei so I can show it as a readable gas price to the user."}],"resultDescription":"A JSON object with the fields `to`, `from`, `amount` (echoed back), and `result` — the converted value as an exact decimal string, computed with integer math to avoid any floating-point rounding loss.","failureModes":["Missing required field (`from`, `to`, or `amount`) returns an error","Unrecognized unit string (not wei/gwei/ether or a valid decimal integer) causes a parsing error","Amount passed as a float (e.g. 1.5e18) instead of a string may cause precision loss before the API even receives it","Very large numbers beyond JavaScript safe integer range could behave unexpectedly if not passed as strings"],"whenToPreferThis":"Choose this endpoint when you need guaranteed exact integer arithmetic for Ethereum unit conversions and cannot risk floating-point rounding errors — especially when preparing transaction inputs, displaying token balances, or working with ERC20 tokens that have non-standard decimal counts (e.g. USDC with 6 decimals). Prefer it over manual conversion in code to avoid the classic off-by-1000 decimals mistake that causes real financial loss.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:59:46.235Z","isFirstParty":false}