Pay Per Prompt is a system that lets users pay for artificial intelligence services directly from their NEAR cryptocurrency accounts, one request at a time. Instead of prepaying for a block of credits or signing up for a subscription, you can use an AI model and be charged only for what you actually use, similar to how you'd buy coffee with a payment card. The way it works is through payment channels, which are like dedicated financial pipes between you and an AI service provider. You set up a channel by depositing a small amount of cryptocurrency (like 0.01 NEAR), then every time you send a prompt to the AI, your balance automatically decreases by the cost of that response. The system uses cryptographic signatures to prove that each payment is really coming from you, so the provider can trust the transaction without needing to confirm it on the blockchain each time, this keeps things fast and cheap. When you're done using the service, you close the channel and get back any unspent balance. The project includes four main pieces: a proxy server that sits between you and the AI provider and handles all the payment logic, a smart contract (essentially a program running on the NEAR blockchain) that keeps track of payment channels and balances, a command-line tool for opening, funding, and closing channels, and a Python library that makes it easy to use standard AI tools like OpenAI's SDK while automatically adding the payment information to each request. You'd use this if you're a developer, researcher, or anyone who wants to experiment with AI models without committing to expensive monthly plans, or if you're an AI service provider who wants to offer pay-as-you-go pricing backed by cryptocurrency. The README doesn't specify exactly how much each prompt costs, but the architecture makes it possible for providers to charge precise, tiny amounts for individual requests.
← nearai on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.