PST.RS

PST.RS

The fastest pastebin alternative built in Rust — use the paste.rs API to share code, notes and files in seconds.

Syntax Highlight Markdown Render Expiry Password Burn-after-read Fork QR Code JSON Custom Slugs

Quick Start

📤 Upload a file

curl --data-binary @file.rs \
  -H "X-Paste-Title: My Script" \
  https://pstrs.abhicracker.com/

💬 Paste from stdin

echo "hello world" \
  | curl --data-binary @- https://pstrs.abhicracker.com/

⏱ Expiry + password

echo "secret" | curl --data-binary @- \
  -H "X-Paste-TTL: 15m" \
  -H "X-Paste-Password: pw" \
  https://pstrs.abhicracker.com/

🔥 Burn after read

echo "once" | curl --data-binary @- \
  -H "X-Paste-Burn: 1" https://pstrs.abhicracker.com/

🔖 Custom slug

echo "hi" | curl --data-binary @- \
  -H "X-Paste-ID: my-note" https://pstrs.abhicracker.com/

📦 JSON response

echo "hi" | curl --data-binary @- \
  -H "Accept: application/json" \
  https://pstrs.abhicracker.com/
# {"id":"...","url":"...","token":"..."}

Shell Helper


      
    

      
    
1
Configure your function above

Switch to the macOS / Linux or Windows tab, pick your default options, then click Copy.

2
Add to your shell profile

Open (or create) your shell profile and paste the function at the bottom:

## macOS / Linux (zsh)
nano ~/.zshrc          # or ~/.bashrc for bash
## then paste your function and save

## Windows (PowerShell) — creates dirs + file, then opens in Notepad
New-Item -ItemType Directory -Path (Split-Path -Parent $PROFILE) -Force | Out-Null; New-Item -ItemType File -Path $PROFILE -Force | Out-Null; notepad $PROFILE
3
Reload your shell
source ~/.zshrc         # macOS / Linux
. $PROFILE              # PowerShell
4
Basic usage
paste file.rs                     # upload a file (auto ext)
echo "hello" | paste              # pipe stdin
paste file.py --ttl 1d            # expires in 1 day (1h 6h 1d 7d 30d 6mo 1y or seconds)
paste secret.txt --burn           # delete after first read
paste notes.md --pw hunter2       # password-protected
paste data.json --id my-data      # custom slug
paste code.rs --memorable --json  # memorable slug + JSON response
paste file.go --ext go            # store extension for highlighting
5
Manage your paste
# URL printed after upload — open it to view with highlighting

# Get raw content
curl <url>/raw/<id>

# Update existing paste (requires token from --json output)
echo "new content" | curl --data-binary @- -X PUT \
  -H "X-Paste-Token: <token>" <url>/<id>

# Delete
curl -X DELETE -H "X-Paste-Token: <token>" <url>/<id>
6
Supported TTL values

Named: 1h   6h   1d   7d   30d   6mo   1y   or any positive integer as seconds (e.g. 900 = 15 min). Max 365 days.
JSON mode returns {id, url, token, expires_at} — save the token for updates/deletes.
Memorable slug generates a human-readable slug like golden-anchor-storm.
Burn after read pastes cannot be forked. Preview bots do not trigger the burn.

API Reference

Endpoints

MethodPathDescription
POST https://pstrs.abhicracker.com/ Upload paste. Body = raw content. Returns the paste URL.
201 = stored in full   206 = truncated to 1 MB.
GET https://pstrs.abhicracker.com/<id> View paste in browser UI (highlighted or plain text).
GET https://pstrs.abhicracker.com/raw/<id> Download paste as plain text (curl-friendly). Supports ?p= and Accept: application/json.
GET https://pstrs.abhicracker.com/<id>.<ext> View with syntax highlighting (.rs, .py, …) or Markdown render (.md).
HEAD https://pstrs.abhicracker.com/<id> Fetch metadata headers only (size, views, expiry…). No body.
PUT https://pstrs.abhicracker.com/<id> Update paste content or options. Requires X-Paste-Token.
DELETEhttps://pstrs.abhicracker.com/<id> Delete paste. Requires X-Paste-Token.
POST https://pstrs.abhicracker.com/<id>/fork Duplicate to a new paste ID. Returns new URL; token in X-Paste-Token response header.
POST https://pstrs.abhicracker.com/<id>/report Flag paste for abuse review. Body = optional reason string.

Request Headers

HeaderExample valueDescription
X-Paste-TTL 15m   30m   1h   6h   1d   7d   30d   6mo   1y Auto-delete paste after this duration. Supports m (minutes), h (hours), d (days), w (weeks), mo (months), y (years). Max 365 days.
X-Paste-Title My Script Optional human-readable title. Used as browser page title and download filename.
X-Paste-Password hunter2 Protect paste with a password. Stored as a salted SHA-256 hash.
X-Paste-Burn 1 Delete paste automatically after the very first read.
X-Paste-ID my-note Custom slug (3–64 chars, alphanumeric / - / _).
X-Paste-Token token from creation Management token required for PUT and DELETE.
Accept application/json Return {"id","url","token","expires_at"} instead of a plain URL.

Query Parameters

ParamDescription
?ttl= Set expiry (same values as X-Paste-TTL). Useful in browser form submissions.
?p= Supply password in URL for browser access to protected pastes.
?burn=1Enable burn-after-read via query string (alternative to header).
?dl=1 Force Content-Disposition: attachment to trigger a file download.

Response Headers (on POST / fork)

HeaderDescription
X-Paste-Token Save this! Required to update or delete your paste later.
X-Paste-Size Paste content size in bytes.
X-Paste-Views Number of times the paste content has been retrieved.
X-Paste-CreatedUnix timestamp of creation.
X-Paste-ExpiresUnix expiry timestamp.
X-Paste-Burn 1 if burn-after-read is armed.