{"openapi":"3.1.0","info":{"title":"SlopBin API","version":"1.0.0","description":"Agent-native text sharing. Create, read, and delete pastes via REST or MCP. Hosted clients send plaintext over HTTPS; password-protected pastes are encrypted at rest.","contact":{"url":"https://slopbin.dev"},"x-pricing":{"ucp_url":"https://slopbin.dev/.well-known/ucp","upgrade_url":"https://slopbin.dev/upgrade","x402":{"enabled_when":"X402_PAY_TO is configured","facilitator_url_env":"X402_FACILITATOR_URL","default_facilitator_url":"https://api.cdp.coinbase.com/platform/v2/x402","default_network":"eip155:8453","pay_to_env":"X402_PAY_TO","protected_routes":["POST /","POST /mcp"]},"plans":[{"id":"free","price":0,"currency":"GBP","limits":{"max_bytes_per_paste":65536,"max_ttl_seconds":86400,"creates_per_hour":10}},{"id":"paid","price":0.99,"currency":"GBP","interval":"month","limits":{"max_bytes_per_paste":524288,"max_ttl_seconds":31536000,"creates_per_hour":null}}]}},"x-service-info":{"categories":["developer-tools","storage"],"docs":{"homepage":"https://slopbin.dev","apiReference":"https://slopbin.dev/developers.md","llms":"https://slopbin.dev/llms.txt"}},"servers":[{"url":"https://slopbin.dev","description":"Configured deployment"},{"url":"http://localhost:5173","description":"Local development"}],"security":[],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"Paid tier API key. Obtain API keys at https://slopbin.dev/upgrade"},"X402Payment":{"type":"apiKey","in":"header","name":"PAYMENT-SIGNATURE","description":"x402 payment proof for one paid API request. When X402_PAY_TO is configured, unauthenticated agents can pay via x402 instead of using a bearer API key."},"DeleteToken":{"type":"apiKey","in":"header","name":"X-Delete-Token","description":"Delete token returned when a paste is created"},"PastePassword":{"type":"apiKey","in":"header","name":"X-Paste-Password","description":"Password for protected pastes"}},"schemas":{"Paste":{"type":"object","properties":{"slug":{"type":"string","example":"abacus-zebra-zoology-0123456"},"url":{"type":"string","format":"uri"},"content":{"type":"string"},"language":{"type":"string","nullable":true,"example":"python"},"created_at":{"type":"string","format":"date-time"},"expires_at":{"type":"string","format":"date-time","nullable":true},"size":{"type":"integer","description":"Size in bytes"},"burn_after_read":{"type":"boolean"},"protected":{"type":"boolean"}}},"CreateResponse":{"type":"object","properties":{"slug":{"type":"string"},"url":{"type":"string","format":"uri"},"delete_token":{"type":"string","description":"Store this — required to delete"},"expires_at":{"type":"string","format":"date-time","nullable":true},"language":{"type":"string","nullable":true},"size":{"type":"integer"},"burn_after_read":{"type":"boolean"},"protected":{"type":"boolean"}}},"Error":{"type":"object","properties":{"error":{"type":"string"},"upgrade_url":{"type":"string","format":"uri"}}},"AbuseCategory":{"type":"string","enum":["spam","malware","harassment","illegal_content","copyright","personal_data","other"]}}},"paths":{"/":{"post":{"summary":"Create a paste","operationId":"createPaste","security":[{},{"BearerAuth":[]},{"X402Payment":[]}],"x-payment-info":{"offers":[{"intent":"charge","method":"stripe","amount":"99","currency":"GBP","description":"Stripe card charge for a paid SlopBin API request (£0.99). Runtime 402 challenges remain authoritative when x402 is configured."}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["content"],"additionalProperties":false,"properties":{"content":{"type":"string","description":"Plaintext paste content (max 64KB free / 512KB paid)","minLength":1},"language":{"type":"string","description":"Language hint for syntax highlighting (e.g. python, json, markdown)"},"ttl_seconds":{"type":"integer","minimum":1,"maximum":31536000,"description":"Custom TTL in seconds (paid tier only, max 31536000)"},"burn_after_read":{"type":"boolean","description":"Delete after first successful read (paid tier only)","default":false},"password":{"type":"string","description":"Optional paste password. When set, content is encrypted at rest and reads must provide the same password."},"agent_id":{"type":"string","description":"Optional identifier for the calling agent stored with the paste"}}}},"text/plain":{"schema":{"type":"string","description":"Plaintext paste content"}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["content"],"properties":{"content":{"type":"string"},"language":{"type":"string"},"password":{"type":"string"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"content":{"type":"string"},"file":{"type":"string","format":"binary","description":"Text file upload"},"language":{"type":"string"},"password":{"type":"string"}}}}}},"responses":{"201":{"description":"Paste created","headers":{"Location":{"schema":{"type":"string","format":"uri"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateResponse"}}}},"400":{"description":"Missing or empty content"},"402":{"description":"Free tier size limit exceeded — upgrade required"},"413":{"description":"Content too large"},"429":{"description":"Rate limit exceeded","headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/{slug}":{"get":{"summary":"Read a paste","operationId":"readPaste","security":[{},{"PastePassword":[]}],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","text","markdown"]},"description":"Browser-friendly alternative to Accept header negotiation"},{"name":"X-Paste-Password","in":"header","required":false,"schema":{"type":"string"},"description":"Required only for password-protected pastes"}],"responses":{"200":{"description":"Paste content","headers":{"Cache-Control":{"description":"Dynamic paste reads are not stored by caches","schema":{"type":"string","example":"no-store"}}},"content":{"text/html":{"schema":{"type":"string"}},"application/json":{"schema":{"$ref":"#/components/schemas/Paste"}},"text/markdown":{"schema":{"type":"string","description":"Content with YAML frontmatter"}},"text/plain":{"schema":{"type":"string"}}}},"404":{"description":"Paste not found"}}},"delete":{"summary":"Delete a paste","operationId":"deletePaste","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"DeleteToken":[]}],"description":"Delete requires the X-Delete-Token returned when the paste was created.","responses":{"204":{"description":"Deleted"},"401":{"description":"Missing X-Delete-Token header"},"403":{"description":"Invalid delete token"},"404":{"description":"Paste not found"}}}},"/mcp":{"post":{"summary":"MCP JSON-RPC endpoint","operationId":"mcp","security":[{},{"BearerAuth":[]},{"X402Payment":[]}],"description":"Model Context Protocol (streamable HTTP, 2025-03-26). Supports: initialize, tools/list, tools/call.","x-payment-info":{"offers":[{"intent":"charge","method":"stripe","amount":"99","currency":"GBP","description":"Stripe card charge for a paid SlopBin API request (£0.99). Runtime 402 challenges remain authoritative when x402 is configured."}]},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"jsonrpc":{"type":"string","enum":["2.0"]},"method":{"type":"string"},"params":{"type":"object"},"id":{}}}}}},"responses":{"200":{"description":"JSON-RPC response"},"202":{"description":"Notification accepted (no response body)"},"402":{"description":"Payment Required"}}}},"/report/{slug}":{"post":{"summary":"Report a paste for abuse review","operationId":"reportPaste","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["category"],"properties":{"category":{"$ref":"#/components/schemas/AbuseCategory"},"text":{"type":"string","maxLength":61440,"description":"Optional report text, capped at 60KB. Defaults to \"No details given\" when omitted."},"email":{"type":"string","maxLength":320,"description":"Optional reporter email"}}}},"multipart/form-data":{"schema":{"type":"object","required":["category"],"properties":{"category":{"$ref":"#/components/schemas/AbuseCategory"},"text":{"type":"string","maxLength":61440,"description":"Optional report text, capped at 60KB. Defaults to \"No details given\" when omitted."},"email":{"type":"string","maxLength":320,"description":"Optional reporter email"}}}}}},"responses":{"303":{"description":"Report accepted"},"400":{"description":"Invalid category"},"404":{"description":"Paste not found"},"411":{"description":"Multipart request missing Content-Length"},"413":{"description":"Report body too large"},"429":{"description":"Report rate limit exceeded"}}}}}}