# Bad Character Scanner™ & BCorrect™ API > Deterministic Unicode security ecosystem and FMM (Fractal Morphological Machine) Spelling & Grammar Correction API powered by the H-Manifold™ geometric engine. ## Machine-Readable API Documentation (For AI Agents & Tools) - [Complete API Documentation (Markdown / Single File)](https://badcharacterscanner.com/llms-full.txt): Full BCorrect™ v1.2.0 API reference including base URLs, authentication, all REST/SSE/WebSocket endpoints, request/response schemas, profiles, dialects, error handling, and code examples. - [API Reference (Markdown)](https://badcharacterscanner.com/api/docs.md): Direct Markdown documentation at `/api/docs.md`. - [OpenAPI 3.1 Specification (JSON)](https://badcharacterscanner.com/openapi.json): Machine-readable OpenAPI schema for automated client generation and agent tool calling. ## Core Products & Web Pages - [BCorrect™ API Overview & Pricing](https://badcharacterscanner.com/api): Enterprise REST API for deterministic spelling and grammar correction. Sub-15ms internal processing, zero data retention, and ~94% lower cost than token-based LLMs. - [BCorrect™ Direct API Documentation (Stripe Credits)](https://badcharacterscanner.com/api/docs): Technical specifications, endpoints, authentication, schemas, and SDK integration guides (cURL, JavaScript, TypeScript, Python, PHP, Go, React, Vue 3, Nuxt 3, Svelte 5, Leptos, React Native, Zig). - [BCorrect™ RapidAPI Documentation](https://badcharacterscanner.com/api/docs/rapidapi): Marketplace integration guide for RapidAPI Hub subscribers (`https://rapidapi.com/BCSC/api/bcorrect-api`). - [BCorrect™ Engine Versions & Known Issues (v1.2.0)](https://badcharacterscanner.com/api/versions): Production release ledger, verified benchmarks, Direct vs. RapidAPI gateway parity, and active remediation issues. - [BCorrect™ API Terms of Service](https://badcharacterscanner.com/api/terms): Legal disclaimers, zero-retention guarantees, and acceptable use policies. - [BCorrect™ Pro Web Demo](https://badcharacterscanner.com/free-tools/bcorrect-pro): Live interactive browser demonstration of the H-Manifold™ grammar engine. - [Bad Character Scanner™ Main](https://badcharacterscanner.com/): Free multi-engine Unicode security scanner detecting zero-width spaces, bidirectional Trojan Source attacks (CVE-2021-42574), homoglyphs, and invisible steganography. - [Research Blog](https://badcharacterscanner.com/blog): Engineering updates, benchmark notes, and Unicode security articles. - [Contact & Support](https://badcharacterscanner.com/contact): Direct portal for enterprise inquiries, API defect submissions, and support (`shoy@badcharacterscanner.com`). ## Base URLs & Authentication - **Direct API (Stripe Credits)**: `https://bcorrect-api.fly.dev/api/v1` - Auth Header: `X-API-Key: sk_YOUR_KEY_HERE` - **RapidAPI Hub Gateway**: `https://bcorrect-api.p.rapidapi.com/api/v1` - Auth Headers: `X-RapidAPI-Key: YOUR_RAPIDAPI_KEY` and `X-RapidAPI-Host: bcorrect-api.p.rapidapi.com` - Marketplace Listing: `https://rapidapi.com/BCSC/api/bcorrect-api` - Both gateways run the exact same **v1.2.0** engine core in memory with 100% parity. ## API Endpoints Summary - `GET /api/v1/health`: Engine health, version, vocabulary size, and uptime (no authentication required). - `POST /api/v1/check`: Primary spelling and grammar correction endpoint (supports `mode: "correct" | "candidates"`, `profile: "standard" | "fast" | "deep" | "academic"`, `exact_quotes`, and `options`). - `POST /api/v1/batch`: Parallel spell and grammar checking for up to 50 texts (`{ "texts": [...] }`). - `POST /api/v1/check/stream`: Server-Sent Events (SSE) progressive chunked checking for long documents. - `WS /ws/keystroke`: Sub-5ms bidirectional WebSocket protocol for live typing extensions. - `GET /api/v1/usage`: Credit balance, daily/monthly character usage, and account quota limits. - `GET /api/v1/monitoring/reynolds`: Manifold flow stability telemetry (laminar vs. turbulent regime). ## Pricing Structure (Direct API Credits, 1 Character = 1 Credit) - **Starter**: $5 for 2 Million characters ($0.0025 per 1K chars). - **Pro**: $20 for 25 Million characters ($0.0008 per 1K chars, ~94% lower than LLM token pricing). - **Pro+**: $100 for 120 Million characters ($0.00083 per 1K chars). - **Enterprise**: Custom high-volume pricing. Contact `shoy@badcharacterscanner.com`. ## Key Architectural Properties - **Deterministic**: Same input and parameters always produce the exact same output with zero generative hallucinations. - **Zero Data Retention**: Text is processed strictly in volatile RAM and discarded immediately after the response is serialized. Never stored, logged, or used for model training (PIPEDA, UK/EU GDPR, CCPA/CPRA aligned). - **UTF-8 Byte Offsets**: `positionInOriginal` and `positionInCorrected` use UTF-8 byte offsets; convert to UTF-16 code units in JavaScript before slicing non-ASCII strings, and apply replacements right-to-left. - **Cold-Start Resilience**: On HTTP `502` or `503`, wait 3 seconds (`Retry-After: 3`) and retry up to 2 times.