Cairnbin

Help

REST API

The REST API is the primary interface: every feature of the web UI is available through it. All endpoints live under https://pste.us/api/v1, answer application/json by default and wrap results as {"ok": true, "data": ...} (errors: {"ok": false, "error": "CODE", "message": "..."}). Add .txt or send Accept: text/plain for plain text.

MethodPathDescription
POST/api/v1/pastesCreate a paste
GET/api/v1/pastesList public pastes (paginated)
GET/api/v1/pastes/{id}Get a paste
GET/api/v1/pastes/{id}/rawGet raw content
DELETE/api/v1/pastes/{id}Delete a paste (owner token required)
GET/api/v1/server/healthzHealth status
GET/api/v1/server/versionServer version
GET/api/v1/server/contactDescribe contact fields and captcha
POST/api/v1/server/contactSubmit a contact or security report
GET/api/v1/server/auth/checkCheck the bearer token type

Interactive documentation:

  • Swagger UI — interactive REST API explorer (OpenAPI)
  • GraphiQL — interactive GraphQL explorer
  • MCP server — connect an AI assistant to this application

The GraphQL endpoint is https://pste.us/api/v1/server/graphql; the OpenAPI spec is served at https://pste.us/api/v1/server/swagger.

Create a paste

Bash
curl -q -LSsf -H "Content-Type: application/json" \
     -H "Accept: application/json" \
     -d '{"content":"Hello","language":"text","expires_in":"1d"}' \
     https://pste.us/api/v1/pastes

Get raw content

Bash
curl -q -LSsf https://pste.us/raw/{id}

Delete a paste

Bash
curl -q -LSsf -X DELETE \
     -H "Authorization: Bearer {delete_token}" \
     "https://pste.us/api/v1/pastes/{id}"

Create a paste via the web

Go to /create, fill in your content, choose a language and expiry, then click Create Paste. Save the delete token — it is shown only once.

Create via curl — raw body

Bash
curl -q -LSsf --data-binary @file.txt https://pste.us/pastes

Pipe to paste

Bash
cat myfile.py | curl -q -LSsf --data-binary @- https://pste.us/pastes

Expiry values

ValueDuration
1h1 hour
1d1 day
1w1 week
1m1 month (30 days)
3m3 months
6m6 months
18m18 months
1y1 year
2y2 years
neverNo expiry
NN seconds

Burn after N views

Set burn_after to a number 1–9999. The paste is deleted after that many views. Set to 0 to disable.

Compatibility

Compatibility endpoints are separate from the native API above. They reproduce the wire protocol of other paste services so existing scripts and CLIs work unmodified. Compat creates are anonymous (any API key is accepted and ignored) and use each service's own delete convention, not the owner token.

This server is a drop-in replacement for multiple paste services. Point existing scripts and CLIs here without modification:

pastebin.com

Wire-compatible with the pastebin.com API:

Bash
curl -q -LSsf -d "api_dev_key=x&api_paste_code=Hello&api_option=paste" \
     https://pste.us/api/api_post.php
MethodPathDescription
POST/api/api_post.phpCreate paste (api_option=paste), list, delete, userdetails
GET/api/api_raw.phpGet raw paste content (?i=ID)
POST/api/api_login.phpAlways returns ANONYMOUS (auth stub)

microbin

Wire-compatible with the microbin API:

Bash
curl -q -LSsf -d "content=Hello" https://pste.us/api/v1/pasta
MethodPathDescription
POST/api/v1/pastaCreate paste
GET/api/v1/pastaList pastes
GET/api/v1/pasta/{id}Get paste by ID
DELETE/api/v1/pasta/{id}Delete paste by ID

lenpaste

Wire-compatible with the lenpaste API:

Bash
curl -q -LSsf -d "body=Hello&expiration=86400" https://pste.us/api/new
MethodPathDescription
POST/api/new or /api/v1/newCreate paste
GET/api/get or /api/v1/getGet paste (?id=ID)
DELETE/api/remove or /api/v1/removeDelete paste (?id=ID&deleteToken=TOKEN)
GET/api/list or /api/v1/listList pastes
GET/api/v1/getServerInfoServer metadata

stikked

Wire-compatible with the stikked API:

Bash
curl -q -LSsf -d "text=Hello&title=Test&lang=text" https://pste.us/api/create
MethodPathDescription
POST/api/createCreate paste (form text/title/name/lang/expire/private; apikey accepted and ignored); returns the view URL https://pste.us/view/{id} as plain text, or Error: <msg>
GET/view/{id}Redirects to the native paste view
GET/view/raw/{id}Raw paste content
GET/api/paste/{id}Get paste as JSON (pid, title, name, created, lang, raw, hits)

hastebin / haste-server

Wire-compatible with the haste-server API:

Bash
curl -q -LSsf -X POST --data-binary "Hello" https://pste.us/documents
# returns {"key":"AbCdEfGh"}
curl -q -LSsf https://pste.us/documents/AbCdEfGh
MethodPathDescription
POST/documentsCreate paste from the raw request body; returns {"key":"…"}
GET/documents/{key}Get paste content as {"data":"...","key":"..."} (404 {"message":"..."} if missing)
GET/raw/{key}Raw paste content (native raw route)

dpaste

Wire-compatible with the dpaste API:

Bash
curl -q -LSsf -d "content=Hello&lexer=text&expires=86400&format=url" \
     https://pste.us/api/
MethodPathDescription
POST/api/ or /api/v2/Create paste; format=url returns bare URL, format=json returns JSON

0x0.st / sprunge / ix.io (curl-upload family)

Wire-compatible with the curl-upload one-liner family:

Bash
# 0x0.st style
curl -q -LSsf -F "file=@file.txt" https://pste.us/

# sprunge style
cat file.txt | curl -q -LSsf -F "sprunge=<-" https://pste.us/

# ix.io style
curl -q -LSsf -F "f:1=<-" https://pste.us/
MethodPathDescription
POST/Upload via multipart file (0x0.st), form sprunge (sprunge.us), or form f:1 (ix.io); returns a bare raw-content URL https://pste.us/raw/{id}. Requests with none of these fields fall through to the native paste-create handler.

The 0x0.st style also returns an X-Token response header — the paste's compat delete token, mirroring the 0x0.st management-token convention.

termbin / fiche (raw TCP)

Wire-compatible with termbin.com and the fiche server protocol. Connect, stream content, close the write side; the server replies with the paste URL and closes:

Bash
echo "Hello" | nc pste.us 9999
cat file.txt | nc pste.us 9999

Maximum payload: 32768 bytes. Idle/read timeout: 5s. TCP port: 9999.

Subdomain routing

Any target can also be reached by using its label as the leftmost part of the hostname (for example hb. before this server's hostname). On a matched subdomain, a bare POST / with a raw body creates a paste for that target, and other targets' routes are hidden.

LabelTarget
pb, pastebinpastebin.com
lp, lenpastelenpaste
sk, stikkedstikked
hb, hastebinhastebin / haste-server
dp, dpastedpaste
mb, microbinmicrobin
tb, termbintermbin (HTTP alias)
ixix.io
sprungesprunge.us
0x0, st0x0.st

Tor Access

This service is available as a Tor hidden service for enhanced privacy.

Onion Address

Onion
7yypnaovkb2s7ucizshjuevmsqvebclyrq7x4xmm2whwv4avtau7mxqd.onion

How to Connect

  1. Download Tor Browser
  2. Open Tor Browser and wait for it to connect
  3. Paste the onion address above into the Tor Browser address bar

Using Tor hides your IP address and encrypts your connection through the Tor network.

FAQ

Do I need an account or API key?

No. Creating, reading, and deleting pastes requires no authentication. The delete token returned at creation is all you need to remove a paste.

How long are pastes kept?

Until their expiry elapses (see the expiry table above) or their burn-after view count is reached. Pastes set to never are kept until deleted.

Is there a size limit?

Yes. The server enforces a maximum paste size of 10 MB; oversized content is rejected with a 413 response.

Can I use it from scripts?

Yes — pipe to curl --data-binary @-, use the JSON API, or point existing pastebin.com scripts at this server.

Troubleshooting

404 Not Found

The paste ID is wrong or the paste has expired or been burned. Check the URL.

413 Payload Too Large

Your content exceeds the maximum paste size. Split it or reduce the size.

429 Too Many Requests

You have hit the rate limit. Wait and retry; the Retry-After header tells you how long.

403 Forbidden on delete

The delete token is missing or incorrect. Only the correct token can delete a paste.

Install this app

  1. Tap the Share button
  2. Scroll down and tap "Add to Home Screen"
  3. Tap "Add" in the top right

Please confirm