{"uid":"cap_UHqD02EGKfLKgPouR3zn6","slug":"eth-unit-converter-wei-gwei-ether-erc20-7f21141c","name":"ETH Unit Converter (wei / gwei / ether / ERC20)","description":"Convert between wei, gwei and ether (or arbitrary-decimal ERC20 amounts) with big-integer precision; optional USD valuation from a caller-supplied price.","url":"https://api.24klabs.ai/api/v1/eth-unit-converter","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"amount":{"type":"string"},"to_unit":{"type":"string"},"from_unit":{"type":"string"},"usd_price":{"type":"number"}}},"responseSchema":{"type":"json","example":{"result":"1500000000","usd_value":4800}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","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.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Bn2LzjqwtkDfKXCojM21I","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts Ethereum denominations (wei, gwei, ether) or arbitrary-decimal ERC20 token amounts with big-integer precision, and optionally computes USD value from a caller-supplied price.","exampleAgentPrompt":"Convert 1500000000000000000 wei to ether with full precision, and also tell me the USD value assuming ETH is priced at $3,200.","exampleUseCases":[{"title":"Display wallet balance in ether","prompt":"I have a raw balance of 4875000000000000000 wei from the Ethereum RPC — can you convert that to ether so I can show it nicely in my wallet UI?"},{"title":"ERC20 token amount formatting","prompt":"I got a raw USDC balance of 250000000 from the contract and USDC has 6 decimals — convert that to a human-readable token amount for me."},{"title":"Gas price gwei to wei for transaction","prompt":"I need to set a gas price of 25 gwei for my transaction — what is that in wei so I can pass it to the RPC call?"}],"resultDescription":"Returns the converted amount as a big-integer-safe string and formatted decimal, the source and target units, and optionally the USD valuation computed from the caller-supplied price per unit.","failureModes":["Invalid or non-numeric amount returns a 400 error","Unsupported unit denomination causes a validation error","Missing required fields (amount or target unit) returns a 400 bad request","Overflow or underflow with extreme values may return a computation error","Supplying a negative USD price may result in a validation rejection"],"whenToPreferThis":"Choose this endpoint when you need precision-safe Ethereum unit conversion without implementing BigInt arithmetic yourself, especially when handling raw on-chain values (wei from RPC responses), ERC20 amounts with non-standard decimals, or when you need an instant USD valuation alongside the unit conversion. Prefer this over general-purpose math APIs because it understands Ethereum denominations natively and avoids floating-point precision loss.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T19:02:25.686Z","isFirstParty":false}