git404hub

what is pay-per-prompt fr?

nearai/pay-per-prompt — explained in plain English

Analysis updated 2026-07-17 · repo last pushed 2025-01-20

1RustAudience · developerComplexity · 4/5StaleSetup · hard

tl;dr

A system for paying AI services one prompt at a time using NEAR crypto payment channels instead of subscriptions.

vibe map

mindmap
  root((repo))
    What it does
      Pay per request
      Crypto payment channels
      No subscriptions
    Tech stack
      Rust
      NEAR blockchain
      Python
    Use cases
      Experiment with AI
      Offer pay as you go
      Avoid monthly plans
    Audience
      Developers
      Researchers
      AI providers
    Components
      Proxy server
      Smart contract
      CLI tool
      Python library

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Pay for AI model usage one prompt at a time without a subscription or prepaid credits.

VIBE 2

Offer pay-as-you-go AI pricing backed by cryptocurrency as a service provider.

VIBE 3

Use the CLI tool to open, fund, and close a payment channel with an AI provider.

VIBE 4

Wrap OpenAI's SDK with the Python library so payment info is added automatically to each request.

what's the stack?

RustNEARPython

how it stacks up fr

nearai/pay-per-promptabc3dz/mixxxabyo-software/ferro-stash
Stars111
LanguageRustRustRust
Last pushed2025-01-20
MaintenanceStale
Setup difficultyhardmoderatemoderate
Complexity4/52/54/5
Audiencedevelopergeneralops devops

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · hard time til it works · 1h+

Requires a NEAR cryptocurrency account and depositing funds into a payment channel.

in plain english

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.

prompts (copy fr)

prompt 1
Explain how I'd set up a NEAR payment channel using this repo's CLI to pay for AI prompts one at a time.
prompt 2
Show me how to use this repo's Python library to wrap OpenAI's SDK with automatic per-request crypto payments.
prompt 3
Help me understand how the proxy server and smart contract in this repo work together to track payment channel balances.

Frequently asked questions

what is pay-per-prompt fr?

A system for paying AI services one prompt at a time using NEAR crypto payment channels instead of subscriptions.

What language is pay-per-prompt written in?

Mainly Rust. The stack also includes Rust, NEAR, Python.

Is pay-per-prompt actively maintained?

Stale — no commits in 1-2 years (last push 2025-01-20).

How hard is pay-per-prompt to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is pay-per-prompt for?

Mainly developer.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.