Paste69

Paste69 is a pastebin service built with SvelteKit. It's a simple, fast, and easy to use pastebin service based on HasteBin. Like HasteBin, it's also open source and can be found over on GitHub.

Code highlighting is handled with the help of highlight.js. So if you have any issues with language detection or missing languages, take it up with them. Available languages (with their extensions) are as follows:

Usage

To create a paste, go home or click the "New" button ( ) in the tool box in the bottom right corner of the page. Paste whatever text you want into the editor, and click the "Save" button ( ) to create the paste.

To copy an existing paste, click the "Copy" button ( ) in the tool box in the bottom right corner of the page. This will start a new paste with the contents of the existing paste.

CLI Script

To make it easier to create pastes, a CLI script is available. The script can be found here. To use the script:

curl -O https://0x45.st/paste69.sh && chmod +x paste69.sh
./paste69.sh --help

# Paste69 CLI script
# 
# Usage:
#   paste69  [options]
#   cat  | paste69 [options]
# 
# Options:
#   -h, --help                 Show this help text.
#   -l, --language   Set the language of the paste.
#   -p, --password   Set a password for the paste. This enables encryption.
#   -x, --burn                 Burn the paste after it is viewed once.
#   -r, --raw                  Return the raw JSON response.
#   -c, --copy                 Copy the paste URL to the clipboard.

To create a paste with the script, simply pipe the contents of a file to the script:

cat file.md | ./paste69.sh # https://0x45.st/some-random-id.md

API

Paste69 has a simple API for creating and fetching pastes. The API accepts JSON, form data, and plain text with query parameters. The API will respond with JSON or plain text, depenant on the state of the `raw` parameter.

Creating a Paste

To create a paste, send a POST request to /api/pastes. Valid parameters are as follows:

Examples

		
JSON Request
$ curl -X POST -H "Content-Type: application/json" -d '{"contents": "paste contents"}' https://0x45.st/api/pastes
		
Form Request
$ curl -X POST -F "contents=paste contents" https://0x45.st/api/pastes
# or, with a file
$ curl -X POST -F "contents=@file-name.txt" https://0x45.st/api/pastes
		
Plaintext Request
$ curl -X POST -H "Content-Type: text/plain" -d "paste contents" https://0x45.st/api/pastes

If the paste was successfully created, the API will respond with the following JSON:

{
	"id": "paste id",
	"url": "https://0x45.st/some-random-id.md",
	"contents": "paste contents",
	"highlight": "txt",
	"encrypted": false,
	"burnAfterReading": false,
	"created_at": "2021-08-05T07:30:00.000Z",
}

Fetching a Paste

To fetch a paste, send a GET request to /api/pastes/:id. If the paste exists, the API will respond with the following JSON:

{
	"id": "paste id",
	"url": "https://0x45.st/some-random-id.md",
	"contents": "paste contents",
	"highlight": "txt",
	"encrypted": false,
	"burnAfterReading": false,
	"created_at": "2021-08-05T07:30:00.000Z",
}
Paste69 Logo