All API endpoints accept requests with any of the following content types:
application/x-www-form-urlencoded
or multipart/form-data
(recommended for simplicity)application/json
application/xml
or text/xml
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.
curl -X POST -F "file=@path/to/file.txt" -F "filename=custom_name.txt" 0x45.st/p
file
- The file to uploadfilename
- (optional) Custom filename for the paste (overrides the uploaded file's name)private
- (optional) Set to "true" to make the paste privateexpires_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"){
"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
}
curl -X POST --data-binary @path/to/file.txt 0x45.st/p
private
- (optional) Set to "true" to make the paste privateexpires_in
- (optional) Duration string for paste expiry (e.g. "24h", "7d")filename
- (optional) Custom filename for the pastecurl -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
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)*/*
: Returns the raw content with its original mime typecurl 0x45.st/p/YOUR_PASTE_ID
curl -H "Accept: application/vnd.0x45.paste+json" 0x45.st/p/YOUR_PASTE_ID
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.
curl -X DELETE 0x45.st/p/:id/:delete_key
The delete key is provided in the response when creating a paste.
Copy and save the following configuration as a .sxcu
file, then import it into ShareX:
{
"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".
Save this script to use Flameshot with 0x45:
#!/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:
flameshot
- Screenshot toolcurl
- For uploadingjq
- For parsing JSON responsewl-copy
(Wayland), xclip
(X11), or pbcopy
(macOS)5
7-128 days
6969/s
2/s
For support, bug reports, or feature requests, please visit our GitHub Issues page.