{"openapi":"3.1.0","info":{"title":"StableDetect","description":"Pay-per-call AI content detection. Classify text as AI-generated, AI-assisted, or human-written (Pangram), and detect AI-generated or deepfake images and video (BitMind).","version":"1.0.0","x-guidance":"# StableDetect API Reference\n\n## Authentication\n\nAll endpoints require micropayment. Include payment headers as per the HTTP 402 specification. Payments are processed on Base mainnet (eip155:8453), Solana, or Tempo.\n\n## Base URL\n\nhttps://stabledetect.dev\n\nAll endpoints are relative to this base URL.\n\n## Agent Workflow (Progressive)\n\n1. Discover candidate endpoints with `mcp__agentcash__discover_api_endpoints(\"https://stabledetect.dev\")`.\n2. For selected POST endpoints, call `mcp__agentcash__check_endpoint_schema` before first fetch.\n3. Execute with `mcp__agentcash__fetch`.\n\n---\n\n# AI Content Detection\n\nDetect whether text, images, or video are AI-generated. Text detection is powered by [Pangram](https://www.pangram.com); image and video deepfake detection by [BitMind](https://bitmind.ai).\n\n## POST /api/detect/text\n\nClassify a text passage as AI-generated, AI-assisted, human-written, or mixed. Returns document-level fractions plus per-window segment labels with character offsets, so you can pinpoint exactly which parts are AI.\n\nPrice: $0.10 per started 1,000 words (a 3,500-word document costs $0.40). Call `mcp__agentcash__check_endpoint_schema` with your intended body for an exact quote.\n\nBody:\n- `text` (string, required) — the passage to analyze. Minimum 50 words, maximum 50,000 words. Under 50 words returns HTTP 400 before any charge.\n- `publicDashboardLink` (boolean, optional, default false) — include a shareable pangram.com dashboard link for the analysis in the response.\n\nResponse (key fields):\n```json\n{\n  \"headline\": \"AI Detected\",\n  \"prediction_short\": \"AI\",\n  \"fraction_ai\": 0.7,\n  \"fraction_ai_assisted\": 0.2,\n  \"fraction_human\": 0.1,\n  \"windows\": [\n    { \"label\": \"AI-Generated\", \"ai_assistance_score\": 0.85, \"confidence\": \"High\", \"start_index\": 0, \"end_index\": 812 }\n  ]\n}\n```\n\n`prediction_short` is one of `AI`, `AI-Assisted`, `Human`, `Mixed`. Fractions sum to ~1.0. Each window covers a slice of the input (`start_index`/`end_index` are character offsets).\n\n## POST /api/detect/image\n\nDetect whether an image is AI-generated or a deepfake.\n\nPrice: $0.02 per request\n\nBody:\n- `image` (string, required) — public http(s) URL or a data URL (`data:image/png;base64,...`). JPEG, PNG, GIF, BMP, WebP, AVIF.\n\nResponse:\n```json\n{ \"isAI\": true, \"confidence\": 0.87 }\n```\n\n`confidence` is 0-1; treat >= 0.7 as a strong signal either way.\n\n## POST /api/detect/video\n\nDetect whether a video is AI-generated or a deepfake. Accepts direct video URLs plus YouTube, Twitter/X, and TikTok links.\n\nPrice: $0.10 per request\n\nBody:\n- `video` (string, required) — video URL.\n- `startTime` / `endTime` (numbers, optional, seconds) — analyze only a segment. Recommended for videos over ~2 minutes.\n- `fps` (integer, optional) — frames per second to sample.\n\nResponse:\n```json\n{ \"isAI\": true, \"confidence\": 0.87 }\n```\n\n### Composition tips\n\n- Verifying a social-media post: run /api/detect/text on the caption and /api/detect/image (or /video) on the media in parallel.\n- Long articles: send the full text in one call — pricing scales per 1,000 words and windows tell you which sections are AI.\n- Low-confidence results (0.4-0.6) are genuinely uncertain; report them as inconclusive rather than forcing a verdict.\n\n---\n\n# Pricing Summary\n\n| Endpoint | Price |\n|----------|-------|\n| Text detection | $0.10 per started 1,000 words |\n| Image detection | $0.02 |\n| Video detection | $0.10 |\n","guidance":"# StableDetect API Reference\n\n## Authentication\n\nAll endpoints require micropayment. Include payment headers as per the HTTP 402 specification. Payments are processed on Base mainnet (eip155:8453), Solana, or Tempo.\n\n## Base URL\n\nhttps://stabledetect.dev\n\nAll endpoints are relative to this base URL.\n\n## Agent Workflow (Progressive)\n\n1. Discover candidate endpoints with `mcp__agentcash__discover_api_endpoints(\"https://stabledetect.dev\")`.\n2. For selected POST endpoints, call `mcp__agentcash__check_endpoint_schema` before first fetch.\n3. Execute with `mcp__agentcash__fetch`.\n\n---\n\n# AI Content Detection\n\nDetect whether text, images, or video are AI-generated. Text detection is powered by [Pangram](https://www.pangram.com); image and video deepfake detection by [BitMind](https://bitmind.ai).\n\n## POST /api/detect/text\n\nClassify a text passage as AI-generated, AI-assisted, human-written, or mixed. Returns document-level fractions plus per-window segment labels with character offsets, so you can pinpoint exactly which parts are AI.\n\nPrice: $0.10 per started 1,000 words (a 3,500-word document costs $0.40). Call `mcp__agentcash__check_endpoint_schema` with your intended body for an exact quote.\n\nBody:\n- `text` (string, required) — the passage to analyze. Minimum 50 words, maximum 50,000 words. Under 50 words returns HTTP 400 before any charge.\n- `publicDashboardLink` (boolean, optional, default false) — include a shareable pangram.com dashboard link for the analysis in the response.\n\nResponse (key fields):\n```json\n{\n  \"headline\": \"AI Detected\",\n  \"prediction_short\": \"AI\",\n  \"fraction_ai\": 0.7,\n  \"fraction_ai_assisted\": 0.2,\n  \"fraction_human\": 0.1,\n  \"windows\": [\n    { \"label\": \"AI-Generated\", \"ai_assistance_score\": 0.85, \"confidence\": \"High\", \"start_index\": 0, \"end_index\": 812 }\n  ]\n}\n```\n\n`prediction_short` is one of `AI`, `AI-Assisted`, `Human`, `Mixed`. Fractions sum to ~1.0. Each window covers a slice of the input (`start_index`/`end_index` are character offsets).\n\n## POST /api/detect/image\n\nDetect whether an image is AI-generated or a deepfake.\n\nPrice: $0.02 per request\n\nBody:\n- `image` (string, required) — public http(s) URL or a data URL (`data:image/png;base64,...`). JPEG, PNG, GIF, BMP, WebP, AVIF.\n\nResponse:\n```json\n{ \"isAI\": true, \"confidence\": 0.87 }\n```\n\n`confidence` is 0-1; treat >= 0.7 as a strong signal either way.\n\n## POST /api/detect/video\n\nDetect whether a video is AI-generated or a deepfake. Accepts direct video URLs plus YouTube, Twitter/X, and TikTok links.\n\nPrice: $0.10 per request\n\nBody:\n- `video` (string, required) — video URL.\n- `startTime` / `endTime` (numbers, optional, seconds) — analyze only a segment. Recommended for videos over ~2 minutes.\n- `fps` (integer, optional) — frames per second to sample.\n\nResponse:\n```json\n{ \"isAI\": true, \"confidence\": 0.87 }\n```\n\n### Composition tips\n\n- Verifying a social-media post: run /api/detect/text on the caption and /api/detect/image (or /video) on the media in parallel.\n- Long articles: send the full text in one call — pricing scales per 1,000 words and windows tell you which sections are AI.\n- Low-confidence results (0.4-0.6) are genuinely uncertain; report them as inconclusive rather than forcing a verdict.\n\n---\n\n# Pricing Summary\n\n| Endpoint | Price |\n|----------|-------|\n| Text detection | $0.10 per started 1,000 words |\n| Image detection | $0.02 |\n| Video detection | $0.10 |\n","contact":{"name":"Merit Systems","url":"https://stabledetect.dev","email":"team@merit.systems"}},"servers":[{"url":"https://stabledetect.dev"}],"tags":[{"name":"Detect"}],"paths":{"/api/detect/text":{"post":{"operationId":"detect_text","summary":"AI text detection powered by Pangram — classify a passage (50 to 50,000 words) as AI-generated, AI-assisted, human-written, or mixed, with per-window segment verdicts and character offsets. Price scales at $0.10 per started 1,000 words.","tags":["Detect"],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.10","max":"5.00"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"description":"Text passage to classify. Minimum 50 words, maximum 50,000 words. Price is $0.10 per started 1,000 words."},"publicDashboardLink":{"default":false,"description":"Include a shareable pangram.com dashboard link for this analysis in the response.","type":"boolean"}},"required":["text"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"headline":{"type":"string","description":"e.g. \"AI Detected\", \"Human Written\""},"prediction":{"type":"string","description":"Long-form verdict"},"prediction_short":{"type":"string","description":"AI | AI-Assisted | Human | Mixed"},"fraction_ai":{"type":"number","description":"Fraction of the document that is AI"},"fraction_ai_assisted":{"type":"number"},"fraction_human":{"type":"number"},"num_ai_segments":{"type":"number"},"num_ai_assisted_segments":{"type":"number"},"num_human_segments":{"type":"number"},"version":{"type":"string","description":"Pangram model version"},"windows":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string","description":"The text covered by this window"},"label":{"type":"string","description":"Window verdict, e.g. \"AI-Generated\", \"Human-Written\""},"ai_assistance_score":{"type":"number","description":"0-1, higher means more AI"},"confidence":{"type":"string","description":"High | Medium | Low"},"start_index":{"type":"number","description":"Character offset into the input text"},"end_index":{"type":"number","description":"Character offset into the input text"},"word_count":{"type":"number"},"token_length":{"type":"number"}},"required":["text","label","ai_assistance_score","confidence","start_index","end_index","word_count","token_length"],"additionalProperties":{}},"description":"Per-window verdicts covering the full input"},"dashboard_link":{"description":"Shareable pangram.com analysis link (only when publicDashboardLink=true)","type":"string"}},"required":["headline","prediction","prediction_short","fraction_ai","fraction_ai_assisted","fraction_human","num_ai_segments","num_ai_assisted_segments","num_human_segments","version","windows"],"additionalProperties":{}}}}},"402":{"description":"Payment Required"}}}},"/api/detect/image":{"post":{"operationId":"detect_image","summary":"AI image detection powered by BitMind — detect whether an image (http(s) URL or base64 data URL) is AI-generated or a deepfake. Returns isAI plus a 0-1 confidence score.","tags":["Detect"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.020000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"image":{"type":"string","minLength":1,"description":"Image to analyze. Either a public http(s) URL or a data URL (data:image/png;base64,...). Supported formats: JPEG, PNG, GIF, BMP, WebP, AVIF."}},"required":["image"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"isAI":{"type":"boolean","description":"Whether the image is AI-generated"},"confidence":{"type":"number","description":"0-1; >= 0.7 either way is a strong signal"},"similarity":{"description":"Similarity to known AI-generated content","type":"number"}},"required":["isAI","confidence"],"additionalProperties":{}}}}},"402":{"description":"Payment Required"}}}},"/api/detect/video":{"post":{"operationId":"detect_video","summary":"AI video detection powered by BitMind — detect whether a video (direct URL, YouTube, Twitter/X, or TikTok link) is AI-generated or a deepfake. Optional startTime/endTime/fps trim and downsample the analyzed segment. Returns isAI plus a 0-1 confidence score.","tags":["Detect"],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.100000"},"protocols":[{"x402":{}},{"mpp":{"method":"tempo","intent":"charge","currency":"0x20c000000000000000000000b9537d11c60e8b50"}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"video":{"type":"string","format":"uri","description":"Video to analyze. Direct video URLs plus YouTube, Twitter/X, and TikTok links are supported."},"startTime":{"description":"Start of the segment to analyze, in seconds","type":"number","minimum":0},"endTime":{"description":"End of the segment to analyze, in seconds","type":"number","minimum":0},"fps":{"description":"Frames per second to sample","type":"integer","minimum":1,"maximum":30}},"required":["video"]}}}},"responses":{"200":{"description":"Successful response","content":{"application/json":{"schema":{"type":"object","properties":{"isAI":{"type":"boolean","description":"Whether the video is AI-generated"},"confidence":{"type":"number","description":"0-1; >= 0.7 either way is a strong signal"},"similarity":{"description":"Similarity to known AI-generated content","type":"number"}},"required":["isAI","confidence"],"additionalProperties":{}}}}},"402":{"description":"Payment Required"}}}}}}