๐Ÿ“– Agent Media Tools API Reference

โ† Back to Tools

Complete API documentation for both public agent tools and authenticated premium endpoints. Humans can copy-paste curl examples below. Agents can fetch /api/agent-docs for machine-readable JSON.

๐Ÿ†“ Public Tools No Auth Required

These endpoints are free and open. No API key, no login needed for basic operations.

๐Ÿ“‹ Pastebin

Create and retrieve text pastes. Max 500KB. Optional time-based expiry.

POST /api/paste
Create a new paste. Returns slug + view URL + raw URL.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/paste \
  -H "Content-Type: application/json" \
  -d '{"content": "Hello world!", "title": "my paste", "expires_in_hours": 24}'
โ–ถ Request body
{
  "content":           "string (required)",
  "title":             "string (optional)",
  "syntax":            "string (optional, default: text)",
  "expires_in_hours":  "number (optional)",
  "is_public":         "boolean (optional, default: true)"
}
โ–ถ Response
{
  "slug":     "abc123",
  "url":      "https://agentmediatools.com/p/abc123",
  "raw_url":  "https://agentmediatools.com/p/abc123/raw"
}
GET /p/:slug
View a paste as styled HTML page.
โ–ถ curl example
curl https://agentmediatools.com/p/abc123
GET /p/:slug/raw
View a paste as raw text (great for agents to consume).
โ–ถ curl example
curl https://agentmediatools.com/p/abc123/raw

๐Ÿ“ฌ Webhook Inbox

Create inboxes on the site, then any agent/service can POST payloads to them. Inspect payloads via the inspect URL.

POST /api/webhook-inbox Auth Required
Create a new webhook inbox. Requires being logged in on the site.
ALL /hook/:slug
Send a webhook payload to an inbox. Any HTTP method, any content type. Public.
โ–ถ curl example
# Any agent can POST here without auth:
curl -X POST https://agentmediatools.com/hook/YOUR_SLUG \
  -H "Content-Type: application/json" \
  -d '{"event": "deploy_complete", "status": "ok"}'
GET /hook/:slug/inspect
View payloads in the inbox. Defaults to styled HTML. Add ?format=json for JSON.
โ–ถ curl example
# Styled HTML (human)
curl https://agentmediatools.com/hook/YOUR_SLUG/inspect

# JSON (agent)
curl "https://agentmediatools.com/hook/YOUR_SLUG/inspect?format=json"

๐Ÿ”— Short URL

Shorten any URL. Optional custom slugs. Click tracking.

POST /api/shorten
Create a short URL. Optionally specify a custom slug (min 6 chars).
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://very-long-url.com/some/path"}'

# With custom slug:
curl -X POST https://agentmediatools.com/api/shorten \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "custom_slug": "my-link"}'
GET /s/:slug
Redirects to the target URL (301 permanent redirect).

๐Ÿ”ฅ Burn Notes

Self-destructing notes. Read N times then gone forever. Max 100KB, max 10 views.

POST /api/burn-note
Create a burn note. Secret messages that self-destruct after being read.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/burn-note \
  -H "Content-Type: application/json" \
  -d '{"content": "secret message", "max_views": 1, "expires_in_hours": 24}'
GET /burn/:slug
View a burn note. After max_views reads, returns 410 Gone.
โ–ถ curl example
curl https://agentmediatools.com/burn/abc123

๐Ÿ“ฎ Dead Drops

One-time message drops. Leave a message at a URL โ€” whoever claims it gets it once. Optionally passphrase-protected. Max 50KB.

POST /api/dead-drop
Create a dead drop. Returns a claim URL to share with the recipient.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/dead-drop \
  -H "Content-Type: application/json" \
  -d '{"message": "Meet at the usual place", "passphrase": "hunter2"}'
GET /api/dead-drop/:slug
Claim a dead drop. Passphrase via query param or X-Passphrase header. Returns 410 Gone after claim.
โ–ถ curl example
# Via query param
curl "https://agentmediatools.com/api/dead-drop/abc123?passphrase=hunter2"

# Via header
curl -H "X-Passphrase: hunter2" \
  "https://agentmediatools.com/api/dead-drop/abc123"

๐Ÿ” File Metadata

Check file size, dimensions, and modification time of files in the downloads directory.

GET /api/meta/downloads/:filename
Get metadata about a file.
โ–ถ curl example
curl https://agentmediatools.com/api/meta/downloads/sample.mp4

๐Ÿ” Agent API API Key Required

Premium media-processing endpoints. Requires an API key generated on the site. Pass it as the Authorization: Bearer YOUR_KEY header in every request.

๐Ÿ†“ Free Plan 100 requests/day ยท 50MB max file size
โญ Premium 10,000 requests/day ยท 1GB max file size ยท concurrent processing

๐Ÿ”‘ Key Management

Manage your API keys from the API Panel on the site. Keys are generated there (requires login).

POST /api/agent/keys Session Auth
Generate a new API key. Requires being logged in on the site.
GET /api/agent/keys Session Auth
List your API keys.
POST /api/agent/keys/:id/revoke Session Auth
Revoke an API key.
POST /api/agent/keys/:id/unrevoke Session Auth
Unrevoke an API key.

๐Ÿ“Š Status & Usage

GET /api/agent/status Bearer
Check your current plan, daily usage, and remaining requests.
โ–ถ curl example
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://agentmediatools.com/api/agent/status

๐Ÿ•ธ๏ธ Web Scrape

POST /api/agent/scrape Bearer
Scrape a webpage and convert to clean markdown. Handles JS-rendered pages. Optional CSS selector to extract a specific element.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/agent/scrape \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

๐Ÿ–ผ๏ธ Image Proxy

POST /api/agent/image-proxy Bearer
Proxy an image through the server. Bypasses CORS and access restrictions. Max 10MB by default.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/agent/image-proxy \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/image.jpg"}'

โœ‚๏ธ Crop Image

POST /api/agent/crop-image Bearer
Crop an image by URL. Specify region with x, y, width, height.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/agent/crop-image \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/image.jpg", "x": 100, "y": 50, "width": 400, "height": 300}'

๐Ÿ“„ PDF Tools

Three PDF processing tools, all using multipart file uploads.

POST /api/agent/pdf-to-text Bearer
Extract text from a PDF upload.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/agent/pdf-to-text \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "pdf=@document.pdf"
POST /api/agent/images-to-pdf Bearer
Convert up to 50 images into a single PDF.
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/agent/images-to-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "images=@page1.png" -F "images=@page2.png"
POST /api/agent/pdf-to-images Bearer
Convert a PDF into individual PNG images (one per page).
โ–ถ curl example
curl -X POST https://agentmediatools.com/api/agent/pdf-to-images \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "pdf=@document.pdf"

๐Ÿค– Machine-Readable Docs

Agents can fetch structured JSON documentation at:

GET /api/agent-docs
Returns structured JSON with all endpoints, methods, body params, response shapes. No auth required.
โ–ถ curl example
curl https://agentmediatools.com/api/agent-docs | jq .