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.
Most endpoints require an API key for authentication. To get started, request an API key:
curl -X POST \
-d "name=Your Name" \
-d "email=your@email.com" \
https://0x45.st/keys/request
Once you have your API key, you can use it in one of two ways:
curl -H "Authorization: Bearer YOUR_API_KEY" https://0x45.st/u/list
curl "https://0x45.st/u/list?api_key=YOUR_API_KEY"
curl -H "Authorization: Bearer YOUR_API_KEY" https://0x45.st/keys/verify
curl -X POST -F "file=@path/to/file.txt" https://0x45.st/p
{
"success": true,
"data": {
"id": "abc12345",
"filename": "example.txt",
"size": 1234,
"mime_type": "text/plain",
"created_at": "2024-03-20T15:30:00Z",
"expires_at": "2024-03-21T15:30:00Z",
"private": false,
"url": "/abc12345.txt",
"raw_url": "/raw/abc12345.txt",
"download_url": "/download/abc12345.txt",
"delete_url": "/delete/abc12345/deletekey123"
}
}
curl -X POST --data-binary @path/to/file.txt https://0x45.st/p
{
"success": true,
"data": {
"id": "abc12345",
"filename": "paste.txt",
"size": 1234,
"mime_type": "text/plain",
"created_at": "2024-03-20T15:30:00Z",
"expires_at": "2024-03-21T15:30:00Z",
"private": false,
"url": "/abc12345.txt",
"raw_url": "/raw/abc12345.txt",
"download_url": "/download/abc12345.txt",
"delete_url": "/delete/abc12345/deletekey123"
}
}
curl -X POST \
-H "Content-Type: application/json" \
-d '{"content":"Hello World"}' \
https://0x45.st/p
{
"content": "string", // Required if no URL
"url": "string", // Required if no content
"filename": "string", // Optional
"extension": "string", // Optional
"expires_in": "string", // Optional (e.g. "24h")
"expires_at": "string", // Optional (e.g. "2024-03-20")
"private": boolean // Optional
}
{
"success": true,
"data": {
"id": "abc12345",
"filename": "example.txt",
"size": 1234,
"mime_type": "text/plain",
"created_at": "2024-03-20T15:30:00Z",
"expires_at": "2024-03-21T15:30:00Z",
"private": false,
"url": "/abc12345.txt",
"raw_url": "/raw/abc12345.txt",
"download_url": "/download/abc12345.txt",
"delete_url": "/delete/abc12345/deletekey123"
}
}
curl -X GET https://0x45.st/p/:id
curl -X GET https://0x45.st/p/:id/raw[.:ext]
curl -X GET https://0x45.st/p/:id/download[.:ext]
curl -X DELETE https://0x45.st/p/:id/:key
{
"success": true,
"message": "Paste deleted successfully"
}
curl -X POST \
-H "Authorization: Bearer YOUR_API_KEY" \
-d "url=https://example.com" \
-d "title=Example Website" \
-d "expires_in=7d" \
https://0x45.st/u
url
(required): The URL to shortentitle
(optional): Custom title for the URLexpires_in
(optional): Duration string (e.g., "24h", "7d", "30d")expires_at
(optional): Date string (YYYY-MM-DD)curl -X GET \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://0x45.st/u/:id/stats?start_date=2024-01-01&end_date=2024-12-31"
start_date
(optional): Start date for stats (YYYY-MM-DD)end_date
(optional): End date for stats (YYYY-MM-DD)curl -X GET \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://0x45.st/u/list?page=1&limit=10"
page
(optional): Page number (default: 1)limit
(optional): Items per page (default: 10)curl -X GET \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://0x45.st/u/list?page=1&limit=10"
page
(optional): Page number (default: 1)limit
(optional): Items per page (default: 10)curl -X GET \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://0x45.st/u/:id/stats?start_date=2024-01-01&end_date=2024-12-31"
start_date
(optional): Start date for stats (YYYY-MM-DD)end_date
(optional): End date for stats (YYYY-MM-DD)curl -X PUT \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"expires_at": "2024-12-31T23:59:59Z"
}' \
https://0x45.st/u/:id/expire
{
// One of the following is required:
"expires_in": "string", // Optional (e.g., "24h" or "never")
"expires_at": "string", // Optional (YYYY-MM-DD)
}
curl -X DELETE \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://0x45.st/u/:id"
{
"success": true,
"message": "URL deleted successfully"
}
5
7-128 days
30-730 days
6969/s
2/s
For support, bug reports, or feature requests, please visit our GitHub Issues page.