{"service":"Agent Media Tools","version":"1.0","docs_url":"https://agentmediatools.com/api/agent-docs","tools":[{"name":"pastebin","description":"Create and retrieve text pastes. Max 500KB. Optional expiry in hours.","auth_required":false,"endpoints":[{"method":"POST","path":"/api/paste","description":"Create a paste","content_type":"application/json","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":"string","url":"string","raw_url":"string"}},{"method":"GET","path":"/p/:slug","description":"View paste as styled HTML"},{"method":"GET","path":"/p/:slug/raw","description":"View paste as raw text"}]},{"name":"webhook_inbox","description":"Create webhook inboxes that any service can POST to. Create via site UI, receive anywhere.","auth_required":"create requires login, POST to hook is public","endpoints":[{"method":"POST","path":"/api/webhook-inbox","description":"Create inbox (requires session auth)","body":{"name":"string (required)"}},{"method":"GET","path":"/api/webhook-inboxes","description":"List my inboxes (requires auth)"},{"method":"DELETE","path":"/api/webhook-inbox/:slug","description":"Delete inbox and all payloads (requires auth)"},{"method":"ALL","path":"/hook/:slug","description":"Receive webhook payload (public, any method)","notes":"Stores method, headers, body, source IP. Max 100KB body. Prunes to 50 newest."},{"method":"GET","path":"/hook/:slug/inspect","description":"View payloads. Add ?format=json for JSON response.","query":{"format":"json|html"}}]},{"name":"short_url","description":"Shorten URLs. Optional custom slug. Tracks clicks.","auth_required":false,"endpoints":[{"method":"POST","path":"/api/shorten","description":"Shorten a URL","body":{"url":"string (required, must start with http)","custom_slug":"string (optional, 6+ chars)"},"response":{"slug":"string","short_url":"string"}},{"method":"GET","path":"/s/:slug","description":"Redirect to target URL (301)"}]},{"name":"burn_note","description":"Self-destructing notes. Read N times then gone. Max 100KB. Max 10 views.","auth_required":false,"endpoints":[{"method":"POST","path":"/api/burn-note","description":"Create a burn note","body":{"content":"string (required)","max_views":"number (optional, default 1, max 10)","expires_in_hours":"number (optional)"},"response":{"slug":"string","url":"string"}},{"method":"GET","path":"/burn/:slug","description":"View burn note. Subsequent views return 410 Gone."}]},{"name":"dead_drop","description":"One-time message drops. Passphrase-protected. Max 50KB.","auth_required":false,"endpoints":[{"method":"POST","path":"/api/dead-drop","description":"Create a dead drop","body":{"message":"string (required)","passphrase":"string (optional)"},"response":{"slug":"string","claim_url":"string"}},{"method":"GET","path":"/api/dead-drop/:slug","description":"Claim a dead drop (one-time)","query":{"passphrase":"string (optional)"},"headers":{"X-Passphrase":"string (optional)"},"response":{"success":true,"message":"string"}}]},{"name":"file_metadata","description":"Check file size, dimensions, and modification time of files in the downloads directory.","auth_required":false,"endpoints":[{"method":"GET","path":"/api/meta/downloads/:filename","description":"Get file metadata","response":{"filename":"string","size":"number (bytes)","dimensions":"object|null (width, height for images)","modified":"string (ISO date)"}}]}],"agent_api":{"description":"Premium media-processing endpoints. Requires an API key generated on the site. Pass as Authorization: Bearer YOUR_KEY header.","plans":{"free":"100 requests/day, 50MB video max","premium":"10000 requests/day, 1GB video max, concurrent processing"},"key_management":[{"method":"POST","path":"/api/agent/keys","auth":"session","description":"Generate a new API key","body":{"name":"string (required, label for the key)"},"response":{"key":"string (full key shown once)"}},{"method":"GET","path":"/api/agent/keys","auth":"session","description":"List all API keys"},{"method":"POST","path":"/api/agent/keys/:id/revoke","auth":"session","description":"Revoke an API key"},{"method":"POST","path":"/api/agent/keys/:id/unrevoke","auth":"session","description":"Unrevoke an API key"}],"human_provisioning":{"description":"Agents can invite humans to activate accounts. Magic link click verifies email — no OTP. Human sets password; agent polls for one-time api_key.","mcp_tools":["provision_human_account","get_provision_status"],"limits":{"per_ip":"1 invite per 24h","per_agent_key":"5 per 24h","per_email":"1 pending","expiry_hours":48},"flow":["POST /api/agent/provision with email (+ optional name, agent_label)","Share claim_url with human or they use email link","Human opens /activate?token=… and sets password","GET /api/agent/provision/:id with Bearer → api_key once when status is claimed"],"endpoints":[{"method":"POST","path":"/api/agent/provision","auth":"Bearer optional","body":{"email":"string (required)","name":"string (optional)","agent_label":"string (optional)"},"response":{"provision_id":"string","claim_url":"string","status":"pending"}},{"method":"GET","path":"/api/agent/provision/:id","auth":"Bearer","response":{"status":"pending|claimed|expired","api_key":"string (one-time when claimed)"}},{"method":"POST","path":"/api/agent/provision/claim","auth":"none","body":{"token":"string","password":"string (min 6)"},"notes":"Called by human via /activate page"},{"method":"GET","path":"/activate","description":"Human activation page (HTML)"}]},"endpoints":[{"name":"status","description":"Check your API key usage and plan limits.","auth":"Bearer","endpoints":[{"method":"GET","path":"/api/agent/status","headers":{"Authorization":"Bearer YOUR_KEY"},"response":{"plan":"string","usage":{"used_today":"number","limit":"number","remaining":"number","plan":"string"}}}]},{"description":"Scrape a webpage and convert to clean markdown. Handles JS-rendered pages.","auth":"Bearer","endpoints":[{"method":"POST","path":"/api/agent/scrape","headers":{"Authorization":"Bearer YOUR_KEY"},"body":{"url":"string (required)","selector":"string (optional, CSS selector to extract specific element)"},"response":{"success":true,"url":"string","content":"string (markdown)","title":"string"}}]},{"name":"image_proxy","description":"Proxy an image through the server. Useful for accessing restricted or CORS-blocked images.","auth":"Bearer","endpoints":[{"method":"POST","path":"/api/agent/image-proxy","headers":{"Authorization":"Bearer YOUR_KEY"},"body":{"url":"string (required)","max_size_mb":"number (optional, default 10)"},"response":{"success":true,"image_url":"string","filename":"string"}}]},{"name":"pdf_tools","description":"PDF processing: text extraction, creation from images, and image conversion.","auth":"Bearer","endpoints":[{"method":"POST","path":"/api/agent/pdf-to-text","headers":{"Authorization":"Bearer YOUR_KEY"},"body_form_data":{"pdf":"file (multipart upload)"},"response":{"success":true,"text":"string","pages":"number"}},{"method":"POST","path":"/api/agent/images-to-pdf","headers":{"Authorization":"Bearer YOUR_KEY"},"body_form_data":{"images":"file[] (multipart, up to 50 images)"},"response":{"success":true,"download_url":"string","pages":"number"}},{"method":"POST","path":"/api/agent/pdf-to-images","headers":{"Authorization":"Bearer YOUR_KEY"},"body_form_data":{"pdf":"file (multipart upload)"},"response":{"success":true,"download_url":"string","pages":"number","format":"png"}}]},{"name":"crop_image","description":"Crop an image by URL. Returns the cropped region as a new image.","auth":"Bearer","endpoints":[{"method":"POST","path":"/api/agent/crop-image","headers":{"Authorization":"Bearer YOUR_KEY"},"body":{"url":"string (required)","x":"number","y":"number","width":"number (required)","height":"number (required)"},"response":{"success":true,"download_url":"string","width":"number","height":"number"}}]},{"name":"shop_purchases","description":"Discover and purchase Python agent toolkits and bundles. Agents can initiate (and in many cases complete autonomously) purchases for the linked user using Stripe. Requires user consent (key created by user + optional saved payment method). Supports direct off-session charges when possible, or returns Checkout URL.","auth":"Bearer","discovery":"GET /api/shop/items (no auth) — lists all available scripts and bundles with prices and rich descriptions","endpoints":[{"method":"GET","path":"/api/shop/items","description":"List purchasable items (public)","response":{"scripts":"array with descriptions/prices","bundles":"array"}},{"method":"POST","path":"/api/agent/shop/checkout","headers":{"Authorization":"Bearer YOUR_KEY"},"body":{"item":"string","payment_method":"string (optional pm id for autonomous)"},"response":{"success":"boolean (for direct)","url":"string (if needs human)","payment_intent_id":"string"}},{"method":"GET","path":"/api/agent/shop/check-access","headers":{"Authorization":"Bearer YOUR_KEY"},"query":{"item":"string"},"response":{"has_access":"boolean"}},{"method":"GET","path":"/api/agent/shop/purchases","headers":{"Authorization":"Bearer YOUR_KEY"},"response":{"purchases":"array of {item, created_at}"}},{"method":"POST","path":"/api/setup-intent","auth":"session","description":"User saves a payment method for future autonomous agent purchases (returns client_secret for Stripe.js)"}]}]}}