21 makes bitcoin useful for developers.

21 allows you to earn bitcoin on every HTTP request. Start by installing 21 (Beta) on any internet-connected device to get some bitcoin. Then use 21 to build, buy, and sell machine-payable apps with developers all around the world.

Install 21 BETA >
import flask
from two1.wallet import Wallet
from two1.bitserv.flask import Payment
app = flask.Flask(__name__)
payment = Payment(app, Wallet())
def hello():
    return 'Hello, Bitcoin!'
The simplest machine-payable web server.

Introducing 21

21 is an app, a marketplace, a network, and a library.

21 as an app. The fastest way to get bitcoin.

21 is an App

The fastest way to get bitcoin in any country, without a bank account or credit card.

Learn more >
21 as a marketplace. Buy and sell API calls for bitcoin.

21 is a Marketplace

Instantly buy or sell API calls for bitcoin with developers around the world.

Learn more >
21 as a capitalist network. Monitor your bitcoin earnings and network with other bitcoin developers.

21 is a Network

Find other devs, monitor your earnings, and host your machine-payable APIs.

Learn more >
21 as a library. Add bitcoin micropayments with one line of code.

21 is a Library

With one line of code, add bitcoin micropayments to both new and old projects.

Learn more >

Installing 21

21 is initially optimized for use by developers in a command line environment, but is coming to every device.

Available for:
Command Line

Command Line

21 Bitcoin Computer

21 Bitcoin Computer

21 Bitcoin Computer (DIY)

DIY Bitcoin Computer

21 - Amazon Machine Image

Amazon Machine Image

(Coming soon)

21 - Docker Container

Docker Container

(Coming soon)

21 - Android / iOS

Android / iOS

Installing 21

Send and receive bitcoin over HTTP

With one line of code, use 21 to add bitcoin micropayments to any application.

Read the developer documentation >
Add micropayments with one line of code.

One-line integration

Just add @payment.required to any old or new code to add bitcoin micropayments support.

Learn more >
Paid APIs without signup.

Paid APIs, without signup

No more API keys. With 21, your bitcoin wallet becomes your API key.

Learn more >
A full command line interface.

Full command line interface

Buy, mine, earn, and sell interactively through the 21 command line.

Learn more >
Easy micropayment channels.

Easy micropayment channels

Working with bitcoin micropayment channels over HTTP can be complex, but 21 makes them easy.

Learn more >
A micropayments marketplace.

A micropayments marketplace

Programmatically discover, buy, and sell bitcoin-payable APIs in the 21 Marketplace.

Learn more >
Use bitcoin as a system resource.

Use bitcoin as a system resource

21 turns bitcoin into a system resource like CPU, RAM, or hard drive space.

Learn more >

How 21 enables bitcoin over HTTP

Let's start with the simplest example of bitcoin micropayments over HTTP.

Read the full documentation >
The client asks for a resource.

Step 1

The client asks for a resource

An HTTP request for a machine-payable resource comes in.

The 402 'Payment Require' error code is returned

Step 2

The server sends back a request for payment

An HTTP Response is sent back with the 402 "Payment Required" error code. Headers include a bitcoin address and amount of bitcoin required to access the resource.

The client pays bitcoin

Step 3

The client remits payment in bitcoin

The client uses the bitcoin network to send the amount requested by the server's to the server's bitcoin address over a second HTTP request.

The server returns the resource

Step 4

The server returns the resource

The server checks the Bitcoin blockchain, confirms that the payment is valid, and then returns the resource via an HTTP response.

Payment channels allow high frequency microtransactions


True micropayments with bitcoin payment channels

In practice, we want far less than one transaction per request. The 21 software libraries allow high frequency Bitcoin-based microtransactions while minimizing transaction fees.

The 21 Marketplace

Use bitcoin to buy and sell anything you can put behind an API.

Discover machine-payable APIs


Explore an index of the machine-payable web.

Buy APIs without API keys


Buy APIs for bitcoin, without API keys or credit cards.

Sell APIs without a bank account.


Sell APIs for bitcoin. No need for a bank account.

Visit 21.co/mkt >
The 21 Micropayments Marketplace
21 is a Capitalist Network

A Social Capitalist Network

Connect with other devs, host your APIs, and monitor your API earnings.

The 21 Developer Community

Get the latest updates from 21 and find other bitcoin devs to buy and sell from.

Join us at slack.21.co >
Join the 21 developer community at slack.21.co

Get Started

Get started with 21. Then start hosting machine-payable APIs on the 21 Bitcoin Cloud, and building Bitcoin/IoT apps with the 21 Bitcoin Computer.

21 Beta


Ideal for getting started

Install Now


  • Get bitcoin on any device
  • Build apps with bitcoin micropayments
  • Buy/sell APIs in the 21 Marketplace
  • Monitor bitcoin earnings from the CLI

21 Bitcoin Cloud

$1/month + usage

Ideal for cloud APIs

Coming Soon!


  • Host machine-payable APIs at 21.co
  • Sell APIs without downtime or latency
  • Pay-per-API call
  • Web interface for API setup and dynamic pricing

21 Bitcoin Computer


Ideal for IoT and grid computing

Buy now


  • Convenient standalone server for small APIs
  • Rent out any IoT device for bitcoin
  • Continuously mine bitcoin in the background
  • Make the physical world bitcoin-payable