Paste69 API Documentation

Table of Contents

Getting Started

All API endpoints accept requests with any of the following content types:

The parameter names remain the same regardless of the content type used. The examples in this documentation use form data for simplicity, as it doesn't require explicitly setting content type headers.

File Upload Endpoints

1. Multipart Upload
CURL
curl -X POST -F "file=@path/to/file.txt" -F "filename=custom_name.txt" 0x45.st/p
Form fields:
  • file - The file to upload
  • filename - (optional) Custom filename for the paste (overrides the uploaded file's name)
  • private - (optional) Set to "true" to make the paste private
  • expires_in - (optional) Duration string for paste expiry (e.g. "24h", "7d")
  • expires_at - (optional) Unix timestamp or ISO 8601 date for paste expiry (e.g. "2024-12-31T23:59:59Z")
Response:
{
    "id": "abc12345",
    "filename": "example.txt",
    "url": "/abc12345.txt",
    "delete_url": "/delete/abc12345/deletekey123",
    "mime_type": "text/plain",
    "size": 1234,
    "expires_at": "2024-03-21T15:30:00Z",
    "private": false
}
2. Raw Upload
CURL
curl -X POST --data-binary @path/to/file.txt 0x45.st/p
Query parameters:
  • private - (optional) Set to "true" to make the paste private
  • expires_in - (optional) Duration string for paste expiry (e.g. "24h", "7d")
  • filename - (optional) Custom filename for the paste
Response:
Same as multipart upload
3. JSON Upload
CURL
curl -X POST -H "Content-Type: application/json" -d @- 0x45.st/p << 'EOF' { "content": "Hello, World!", "filename": "hello.txt", "private": false, "expires_in": "24h", "_comment": "Use either expires_in (e.g. '24h', '7d') or expires_at (e.g. '2024-12-31T23:59:59Z')" } EOF
4. Viewing and Managing Pastes
Viewing Pastes:

Content Negotiation

When viewing a paste at 0x45.st/p/:id, the response format is determined by the Accept header in your request:

  • application/xhtml+xml: Returns an HTML page with syntax highlighting (default for browsers)
  • application/vnd.0x45.paste+json: Returns paste metadata as JSON (for API integrations)
  • No Accept header or */*: Returns the raw content with its original mime type
Examples:
View in Browser
curl 0x45.st/p/YOUR_PASTE_ID
Get Paste Metadata (API)
curl -H "Accept: application/vnd.0x45.paste+json" 0x45.st/p/YOUR_PASTE_ID
Get Raw Content
curl 0x45.st/p/YOUR_PASTE_ID

When requesting raw content, the response will have the Content-Type header set to match the original file's mime type. For example, if you uploaded a JSON file, the raw content will be served with Content-Type: application/json.

If you specify an Accept header, the server will validate that it matches the paste's mime type. For example, if you request Accept: image/png but the paste is a text file, you'll receive a 406 Not Acceptable response. Use Accept: */* or omit the Accept header to accept any content type.

The JSON metadata response includes information about the paste such as ID, filename, URLs, and expiration time. This format is particularly useful for API integrations.

Deleting Pastes:
CURL
curl -X DELETE 0x45.st/p/:id/:delete_key

The delete key is provided in the response when creating a paste.

Integrations

ShareX Integration

Copy and save the following configuration as a .sxcu file, then import it into ShareX:

JSON
{ "Version": "15.0.0", "Name": "0x45 Uploader", "DestinationType": "ImageUploader, TextUploader, FileUploader", "RequestMethod": "POST", "RequestURL": "0x45.st/p", "Body": "MultipartFormData", "FileFormName": "file", "URL": "{json:url}" }

After importing, you can set this as your default uploader in ShareX under "Destinations".

Flameshot Integration

Save this script to use Flameshot with 0x45:

BASH
#!/bin/bash # Detect clipboard command if command -v wl-copy >/dev/null 2>&1; then CLIP_CMD="wl-copy" elif command -v xclip >/dev/null 2>&1; then CLIP_CMD="xclip -selection clipboard" elif command -v pbcopy >/dev/null 2>&1; then CLIP_CMD="pbcopy" else echo "No clipboard command found. Please install xclip, wl-copy, or pbcopy" exit 1 fi filename="/tmp/screenshot-$(date +%Y%m%d-%H%M%S).png" flameshot gui -r > "$filename"; if [ ! -s "$filename" ]; then exit 1 fi curl -s 0x45.st/p -F file=@"$filename" | jq -r '.url' | $CLIP_CMD

Save this script somewhere in your PATH (e.g. ~/.local/bin/upload-screenshot), make it executable with chmod +x, and bind it to a keyboard shortcut.

Dependencies:

Limits & Retention

Support

For support, bug reports, or feature requests, please visit our GitHub Issues page.