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.
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/pastes | Create a paste |
| GET | /api/v1/pastes | List public pastes (paginated) |
| GET | /api/v1/pastes/{id} | Get a paste |
| GET | /api/v1/pastes/{id}/raw | Get raw content |
| DELETE | /api/v1/pastes/{id} | Delete a paste (owner token required) |
| GET | /api/v1/server/healthz | Health status |
| GET | /api/v1/server/version | Server version |
| GET | /api/v1/server/contact | Describe contact fields and captcha |
| POST | /api/v1/server/contact | Submit a contact or security report |
| GET | /api/v1/server/auth/check | Check 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
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
curl -q -LSsf https://pste.us/raw/{id}
Delete a paste
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
curl -q -LSsf --data-binary @file.txt https://pste.us/pastes
Pipe to paste
cat myfile.py | curl -q -LSsf --data-binary @- https://pste.us/pastes
Expiry values
| Value | Duration |
|---|---|
1h | 1 hour |
1d | 1 day |
1w | 1 week |
1m | 1 month (30 days) |
3m | 3 months |
6m | 6 months |
18m | 18 months |
1y | 1 year |
2y | 2 years |
never | No expiry |
| N | N 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.
- pastebin.com, microbin, lenpaste, stikked, hastebin, dpaste
- 0x0.st / sprunge / ix.io, termbin / fiche
- Subdomain routing
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:
curl -q -LSsf -d "api_dev_key=x&api_paste_code=Hello&api_option=paste" \
https://pste.us/api/api_post.php
| Method | Path | Description |
|---|---|---|
| POST | /api/api_post.php | Create paste (api_option=paste), list, delete, userdetails |
| GET | /api/api_raw.php | Get raw paste content (?i=ID) |
| POST | /api/api_login.php | Always returns ANONYMOUS (auth stub) |
microbin
Wire-compatible with the microbin API:
curl -q -LSsf -d "content=Hello" https://pste.us/api/v1/pasta
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/pasta | Create paste |
| GET | /api/v1/pasta | List 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:
curl -q -LSsf -d "body=Hello&expiration=86400" https://pste.us/api/new
| Method | Path | Description |
|---|---|---|
| POST | /api/new or /api/v1/new | Create paste |
| GET | /api/get or /api/v1/get | Get paste (?id=ID) |
| DELETE | /api/remove or /api/v1/remove | Delete paste (?id=ID&deleteToken=TOKEN) |
| GET | /api/list or /api/v1/list | List pastes |
| GET | /api/v1/getServerInfo | Server metadata |
stikked
Wire-compatible with the stikked API:
curl -q -LSsf -d "text=Hello&title=Test&lang=text" https://pste.us/api/create
| Method | Path | Description |
|---|---|---|
| POST | /api/create | Create 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:
curl -q -LSsf -X POST --data-binary "Hello" https://pste.us/documents
# returns {"key":"AbCdEfGh"}
curl -q -LSsf https://pste.us/documents/AbCdEfGh
| Method | Path | Description |
|---|---|---|
| POST | /documents | Create 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:
curl -q -LSsf -d "content=Hello&lexer=text&expires=86400&format=url" \
https://pste.us/api/
| Method | Path | Description |
|---|---|---|
| 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:
# 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/
| Method | Path | Description |
|---|---|---|
| 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:
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.
| Label | Target |
|---|---|
pb, pastebin | pastebin.com |
lp, lenpaste | lenpaste |
sk, stikked | stikked |
hb, hastebin | hastebin / haste-server |
dp, dpaste | dpaste |
mb, microbin | microbin |
tb, termbin | termbin (HTTP alias) |
ix | ix.io |
sprunge | sprunge.us |
0x0, st | 0x0.st |
Tor Access
This service is available as a Tor hidden service for enhanced privacy.
Onion Address
7yypnaovkb2s7ucizshjuevmsqvebclyrq7x4xmm2whwv4avtau7mxqd.onion
How to Connect
- Download Tor Browser
- Open Tor Browser and wait for it to connect
- 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.