# API Reference
## Authentication
All write operations require a Bearer token:
```
Authorization: Bearer YOUR_AUTH_KEY
```
## Endpoints
### Create Paste
POST /api
#### JSON Request
```bash
curl 05_api.md
7 hours ago
# CLI Reference
## Installation
```bash
npm install -g @pbnjs/cli
```
## Configuration
Run the setup wizard:
```bash
pbnj --init
```
This creates ~/.pbnj with your configuration:
```
PBNJ_HOST=ht 04_cli.md
7 hours ago
# Cost Breakdown
"This is deployed on Cloudflare, they might charge us eventually!"
Don't worry. Let's do the math.
## Cloudflare D1 Free Tier
- 500 MB storage
- 5 million reads/day
- 100,000 writ 03_cost.md
7 hours ago
# Deployment Guide
## One-Click Deploy (Recommended)
Click the "Deploy to Cloudflare" button on the GitHub repo — that's it!
The deploy button automatically:
- Forks the repo to your GitHub account 02_deployment.md
7 hours ago
# Welcome to pbnj
pbnj is a simple, minimal self-hosted pastebin solution.
## What is pbnj?
pbnj lets you share code snippets and text files with a simple URL.
No accounts, no bloat - just paste an 01_welcome.md
7 hours ago
# Web Interface
pbnj includes a web interface for creating and managing pastes directly from your browser.
## Authentication
The web interface uses the same `AUTH_KEY` as the CLI and API. Authentic 07_web_interface.md
7 hours ago
# Configuration
pbnj is configured through a single `pbnj.config.js` file in the project root.
## Default Configuration
```js
export default {
name: 'pbnj',
logo: '/logo.png',
idStyle: 'sandw 06_configuration.md
7 hours ago