{"repo":"qntx/x402-openai-typescript","free":true,"listed":false,"github":"https://github.com/qntx/x402-openai-typescript","clone":"git clone https://github.com/qntx/x402-openai-typescript.git","description":"Drop-in OpenAI Typescript client with transparent x402 payment support.","language":"TypeScript","stars":153,"topics":["ethereum","openai","solana","typescript","web3","x402"],"license":"MIT","category":"blockchain-web3","readme_excerpt":"x402-openai Drop-in OpenAI TypeScript client with transparent x402 payment support. --- Wrap the standard openai.OpenAI client with a crypto wallet. When the server responds with HTTP 402 , the library automatically signs and retries the request — zero code changes needed. Installation Quick Start Swap EvmWallet for SvmWallet to pay on Solana — the API is identical. Usage Streaming Multi-chain BIP-39 Mnemonic (EVM) The protocol selects the right chain automatically based on the server's payment requirements. Payment Policies Use policies to control which chain or scheme is preferred when multiple payment options are available: API Reference X402OpenAI Drop-in replacement for openai.OpenAI . Provide exactly one credential source: Parameter Type Description :----------- :---------------- :----------------------------------------------------- wallet Wallet Single wallet adapter wallets Wallet[] Multiple adapters (multi-chain) policies PaymentPolicy[] Payment policies (chain/scheme preference, amount cap) x402Client x402Client Pre-configured x402 client (bypasses policies ) All standard OpenAI options ( baseURL , timeout , maxRetries , …) are forwarded. Default baseURL : https://llm.qntx.fun/v1 Wallet Adapters Class Chain Install extras :----------------------------- :----------- :---------------------------------- EvmWallet({ privateKey: … }) EVM @x402/evm viem EvmWallet({ mnemonic: … }) EVM (BIP-39) @x402/evm viem SvmWallet({ privateKey: … }) Solana @x402/svm @solana/kit @scure","default_branch":null,"files":null,"tree":[],"storefront":"/r/qntx","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/qntx/x402-openai-typescript/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}