Free Pastebin API: send content to POST /api/paste and get a shareable page URL plus a raw-text URL. No account or API key for basic use. Up to 500 KB per paste.
Need a pastebin API that works from a single curl command—or from Claude, ChatGPT, Hermes, or n8n—without signing up for a developer portal? Agent Media Tools exposes POST /api/paste so you can create pastes for logs, code, prompts, and agent intermediate results in one request.
This guide covers the free API contract, curl and Python examples, how AI agents use pastes as ephemeral memory, and how to fetch raw text after create.
Most paste sites want a browser session. A zero-auth REST pastebin is better when you are already in a terminal or automation loop:
/raw endpoint for piping into other tools| Property | Value |
|---|---|
| Endpoint | POST /api/paste |
| Content-Type | application/json |
| Required field | content (string, up to 500 KB) |
| Optional fields | title, syntax, expires_in_hours, is_public |
| Response | JSON with slug, url, and raw_url |
| Auth | Not required for basic create |
| Max size | 500 KB per paste |
Create is always a POST with a JSON body. That is the standard REST pattern (there is no public “create paste with GET”). After create, you read content with GET on the page or raw_url.
💡 Windows users: Run these from Git Bash or WSL — PowerShell's curl is an alias for Invoke-WebRequest.
curl -X POST https://agentmediatools.com/api/paste \
-H "Content-Type: application/json" \
-d '{"content": "Hello from an AI agent! This paste was created via curl."}'
Example response:
{
"success": true,
"slug": "aB3xK9mP2q",
"url": "https://agentmediatools.com/p/aB3xK9mP2q",
"raw_url": "https://agentmediatools.com/p/aB3xK9mP2q/raw"
}
Share url for a readable page; use raw_url for plain text in scripts.
curl -X POST https://agentmediatools.com/api/paste \
-H "Content-Type: application/json" \
-d '{
"content": "def hello(name):\n print(f\"Hello, {name}!\")",
"title": "Python hello world",
"syntax": "python",
"expires_in_hours": 24
}'
CONTENT=$(python3 -c "import json,sys; print(json.dumps(sys.stdin.read()))" < deploy.log)
curl -X POST https://agentmediatools.com/api/paste \
-H "Content-Type: application/json" \
-d "{\"content\": $CONTENT, \"title\": \"Deploy Log\", \"syntax\": \"text\"}"
After create, retrieve plain text without HTML:
curl -s https://agentmediatools.com/p/aB3xK9mP2q/raw
That is the usual answer when someone wants “pastebin get API” behavior: create with POST, read with GET on /raw.
import requests
resp = requests.post(
"https://agentmediatools.com/api/paste",
json={
"content": "Hello from Python!",
"title": "Python test paste",
"syntax": "text",
},
)
data = resp.json()
print(data["url"], data["raw_url"])
# Later: fetch raw body
print(requests.get(data["raw_url"]).text)
Claude, ChatGPT, Hermes, and similar agents can treat the pastebin as ephemeral memory—store long outputs, then pass short URLs between steps.
/api/pastesyntax: "text"With the Agent Media Tools MCP server, ask in natural language:
"Take this error log and create a paste I can share with my team."
MCP exposes the create_paste tool so the model builds the JSON, calls the API, and returns the URL.
| Feature | Agent Media Tools | Many pastebin sites |
|---|---|---|
| API auth | None required for basic create | API key or login |
| curl-friendly | Single POST | Often cookies / form tokens |
| Raw text URL | Yes (raw_url) | Varies |
| Expiration | Optional hours | Coarse presets |
| MCP / agents | Built-in create_paste | Usually none |
Yes for basic use—no signup or API key—subject to current free-tier daily limits. See pricing for plan limits.
Create requires POST with JSON content. Reading an existing paste uses GET on /p/{slug} or /p/{slug}/raw.
Set expires_in_hours when creating. Expired pastes return 410 Gone and are cleaned up.
Yes: free online pastebin tool on Agent Media Tools.
No account required. Paste text below and get a shareable URL in one click.
Basic pastes are free and great for ephemeral agent memory. Need longer retention, private pastes, or durable Artifacts for production agents? Founding Pro ($4.99/mo) and Artifacts keep results available beyond short free TTLs.
Tags: free pastebin API, pastebin API curl, AI agent memory, create paste REST, raw paste URL, MCP create_paste
Related: Create a paste → · QR codes → · All tools →