nearai/pay-per-prompt — explained in plain English
Analysis updated 2026-07-17 · repo last pushed 2025-01-20
Pay for AI model usage one prompt at a time without a subscription or prepaid credits.
Offer pay-as-you-go AI pricing backed by cryptocurrency as a service provider.
Use the CLI tool to open, fund, and close a payment channel with an AI provider.
Wrap OpenAI's SDK with the Python library so payment info is added automatically to each request.
| nearai/pay-per-prompt | abc3dz/mixxx | abyo-software/ferro-stash | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Rust | Rust | Rust |
| Last pushed | 2025-01-20 | — | — |
| Maintenance | Stale | — | — |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 4/5 | 2/5 | 4/5 |
| Audience | developer | general | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires a NEAR cryptocurrency account and depositing funds into a payment channel.
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.
A system for paying AI services one prompt at a time using NEAR crypto payment channels instead of subscriptions.
Mainly Rust. The stack also includes Rust, NEAR, Python.
Stale — no commits in 1-2 years (last push 2025-01-20).
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.