Every developer has been there: you need to share a log snippet with a teammate, save the output of a script for later inspection, or give an AI agent a place to dump intermediate results. Opening a browser, navigating to a pastebin site, pasting text, and copying a URL is tedious โ especially when you're already in a terminal or automating a workflow.
Agent Media Tools offers a free pastebin API at POST /api/paste that lets you create pastes programmatically โ from curl, Python, shell scripts, or directly from an AI agent. No signup required, no API key, no browser needed.
There are dozens of pastebin websites, but almost none of them offer a zero-auth REST API that works from a single curl command. Here's why that matters:
python, javascript, json, yaml โ and the view page renders with proper highlighting.| 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 |
| Max size | 500 KB per paste |
Send a JSON body with your content, get back a unique 10-character slug and a shareable URL. That's it.
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."}'
Response:
{
"success": true,
"slug": "aB3xK9mP2q",
"url": "https://agentmediatools.com/p/aB3xK9mP2q",
"raw_url": "https://agentmediatools.com/p/aB3xK9mP2q/raw"
}
You can share the url with anyone โ it renders with line numbers and a dark theme. The raw_url returns plain text, perfect for piping into other tools.
curl -X POST https://agentmediatools.com/api/paste \
-H "Content-Type: application/json" \
-d '{
"content": "def hello(name):\n print(f\"Hello, {name}!\")\n\nif __name__ == \"__main__\":\n hello(\"World\")",
"title": "Python hello world",
"syntax": "python",
"expires_in_hours": 24
}'
This creates a paste that:
# Paste the contents of a log file curl -X POST https://agentmediatools.com/api/paste \ -H "Content-Type: application/json" \ -d "$(jo content="$(cat deploy.log)" title="Deploy Log" syntax="text" expires_in_hours=48)"
Or without jo, using a heredoc:
CONTENT=$(cat deploy.log | python3 -c "import sys,json; print(json.dumps(sys.stdin.read()))")
curl -X POST https://agentmediatools.com/api/paste \
-H "Content-Type: application/json" \
-d "{\"content\": $CONTENT, \"title\": \"Deploy Log\", \"syntax\": \"text\"}"
Using only the built-in requests library โ no SDK or special package needed:
import requests
url = "https://agentmediatools.com/api/paste"
payload = {
"content": "Hello from Python! This paste was created programmatically.",
"title": "Python test paste",
"syntax": "text"
}
resp = requests.post(url, json=payload)
data = resp.json()
print(f"Paste URL: {data['url']}")
print(f"Raw URL: {data['raw_url']}")
# Output:
# Paste URL: https://agentmediatools.com/p/aB3xK9mP2q
# Raw URL: https://agentmediatools.com/p/aB3xK9mP2q/raw
import requests
slug = "aB3xK9mP2q"
raw_url = f"https://agentmediatools.com/p/{slug}/raw"
resp = requests.get(raw_url)
print(resp.text)
# Output: The raw paste content
import requests
import json
with open("error.log", "r") as f:
content = f.read()
resp = requests.post(
"https://agentmediatools.com/api/paste",
json={
"content": content,
"title": "Error log from deployment",
"syntax": "text",
"expires_in_hours": 72
}
)
paste = resp.json()
print(f"Shared error log: {paste['url']}")
This is where the pastebin API really shines. AI agents like Claude, ChatGPT, and Hermes Agent can use the pastebin as ephemeral memory โ dumping context, intermediate results, or long outputs they can reference later.
An AI agent processing a large document might:
This pattern is especially useful in multi-turn conversations where the agent needs to pass large chunks of text between steps without exceeding context window limits.
When an agent encounters an error running a script, it can:
syntax: "text"The user gets a clean, shareable link to the full error โ no truncated console output.
If you use the Agent Media Tools MCP server, you can create pastes directly from natural language:
"Take this error log and create a paste I can share with my team."
The MCP server exposes the paste_create tool, so Claude handles the JSON construction, API call, and URL response โ all from a simple instruction.
Every paste gets a dedicated page at /p/{slug} with:
syntax field/p/{slug}/raw for programmatic accessExpired pastes return a 410 Gone status and are automatically cleaned from the database โ no stale links lingering forever.
| Feature | Agent Media Tools | Most Pastebin Services |
|---|---|---|
| API auth | None required | API key or login required |
| curl-friendly | Single POST | Often requires cookies or tokens |
| Max size | 500 KB | Varies (512 KB typical) |
| Expiration | Optional, in hours | Often only 1 day / 1 week / never |
| Syntax highlighting | Yes โ specify language | Yes โ most support it |
| Rate limit | 100 req/day free | Varies |
| MCP / Agent support | Built-in | Usually none |
The key differentiator is zero-friction access. No account creation, no dashboard navigation, no API key management. Just curl -X POST with your content.
The pastebin API is free for up to 100 paste creations per day with no authentication. Rate limits reset at midnight UTC, and the response header X-RateLimit-Remaining tells you your current status.
For higher volume needs (5,000 pastes/day), check the Developer plan at $15/month. All plans include access to the full suite of 40+ APIs.
This pastebin is part of a larger ecosystem of free APIs for AI agents:
All available from the same base URL with the same zero-auth model.
Open a terminal and run the curl command above. You'll get back a shareable paste URL in under a second. No account, no API key, no credit card.
โ Visit Agent Media Tools ยท ๐ API Docs ยท ๐ฌ Discord
Tags: pastebin API, text sharing, AI agent memory, code snippets, free API, MCP, curl pastebin