What is a DVM?

A Digital Vending Machine (DVM) is a pay-per-use HTTPS service an AI agent can find, pay, and call with no account or API key. How it works, with an example.

A Digital Vending Machine, or DVM, is a pay-per-use HTTPS service that an AI agent can find, pay, and call with no account and no API key. Before paying, the agent asks what the work will cost. It shows you that price in real money (dollars, at every first-party DVM), or pays it on its own within limits you set. Then it collects the result. dvmkit is a toolkit for building and running DVMs, and for using them from any agent.

The idea

A vending machine sells to anyone who walks up with money. It does not ask who you are, and you do not sign up first. A DVM works the same way for software. A provider, called the builder, puts one capability behind an HTTPS address and sets its price. A caller, usually an agent working for a person, finds that address, asks for a quote, and pays as part of the request.

Nothing is issued in advance. There is no account to create, no API key to request, and no invoice at the end of the month. Where a provider needs to tell callers apart, the agent signs its requests with a key it generates on your own machine. The provider then knows it as a public key and a payment history, never as a name or an email address.

How it works walks through the four steps (finding, quoting, paying, and collecting) and what happens when a job asks a question part way through.

How a DVM gets paid

Each DVM advertises the payment methods it accepts, and the caller's agent picks one it can settle. No method is the default. The paid first-party DVMs offer four ways to pay today:

  • Bitcoin Lightning: from a connected wallet.
  • Cashu: ecash, Bitcoin-backed tokens from a mint.
  • Tempo: USDC.e, a dollar stablecoin, on Tempo.
  • x402: USDC, a dollar stablecoin, on Base.

These methods pay through dvmkit's job protocol: callers submit signed job requests and poll for results when work runs in the background. Today callers need dvm or another client that implements that protocol. Generic one-shot x402 and MPP (Tempo) clients, which pay an HTTP 402 challenge and expect the result in the same response, cannot pay a DVM yet. An opt-in one-shot route per capability is the next protocol addition.

Cashu, Tempo, and x402 can pay for a single job directly. Lightning does not pay a job itself: it tops up ecash or a prepaid balance, and that pays for jobs.

A caller can pay per job, or, where a DVM offers it, fund a small prepaid credit once and let later jobs draw from it. The first-party DVMs quote their prices in dollars, whichever method pays. Payments covers quotes, the payment handshake, and what happens when a job fails. Funding covers getting money into the agent's wallet.

An example: turning text into speech

narrate is one of dvmkit's first-party DVMs. It turns text into spoken audio, at https://narrate.dvmkit.ai.

Say your agent needs a 1,000-character paragraph read aloud. It sends the text to narrate's synthesise capability, with the balanced quality tier and the narrator voice:

dvm quote -d dvmkit--narrate/synthesise --data '{"quality":"balanced","input":{"text":"..."},"voice":"narrator"}'

narrate's live descriptor lists the balanced tier at $0.00015 per character, so the quote for 1,000 characters is $0.15. The agent shows you that figure, or pays it on its own if it falls inside a budget you set. It then sends the same request with dvm request. What comes back is an MP3 audio file of the paragraph. A job that fails is not charged.

The narrate reference has every quality tier and its price, the voices, the inputs, and the error codes.

Where to go next

A note on the name

DVM shares its acronym, not its name, with Nostr's Data Vending Machines (NIP-90). NIP-90 broadcasts a job to public Nostr relays for providers to compete over. A dvmkit DVM is one HTTPS service the agent calls directly, so any agent that can make a web request can use it, with no relay or Nostr client. The Nostr maintainers now mark NIP-90 itself as "unrecommended", in favour of standards specific to each use case. The two are not interchangeable.