Sapling AI Documentation
website·Indexed 38 days ago
https://sapling.ai/docsTechnical documentation for Sapling's suite of AI writing and analysis tools. Includes API references for grammar and spell checking, AI detection, content safety, PII redaction, sentiment analysis, and language detection. Provides implementation guides for JavaScript, Python, and PHP, covering endpoints for text classification, data extraction, and style guide compliance.
What's inside Sapling
- Advanced Edits provide customizable proofreading settings for English text that go beyond basic spelling and grammar. These settings help improve writing style by identifying adverbs, complex phrases, hard-to-read sentences, passive voice, and qualifiers, as well as ensuring Diversity, Equity, and Inclusion (DEI) compliance. Advanced Edits can be configured globally for an account or specified on a per-API call basis.
Overview of the Sapling AI Detector API
The AI Detector API computes the probability that text is AI-generated (AI slop). It supports various LLM vendors including OpenAI (GPT), Google (Gemini), Anthropic (Claude), Llama, Mistral, DeepSeek, Qwen, and Kimi. The API provides scores at the document, sentence, and token levels. It is optimized for English text.Overview of Sapling.ai Developer Platform
Sapling.ai is a platform for building language model applications. It provides a suite of tools for text preprocessing, classification, prediction, and correction. Developers can integrate these capabilities via three primary methods:
- HTTP API: Direct endpoints for language processing tasks.
- SDK: Convenient wrappers around the API and UI components for web application integration.
- Sapling MCP Server: For using Sapling's language tools directly from an AI assistant.
Overview of the Sapling Grammar Check API
The Sapling Grammar Check API analyzes text and returns grammar, spelling, and stylistic corrections as JSON 'edits'. Each edit includes the sentence, character offsets for the span to replace, a suggested replacement, and an error-type label. The API allows applications to decide how to render or apply these edits (e.g., inline underlines or auto-correct).Overview of Sapling MCP Server connection methods
The Sapling MCP Server integrates Sapling's language APIs into assistants that support the Model Context Protocol (MCP), such as Claude Desktop, Claude Code, and ChatGPT connectors. There are two primary ways to connect:
- Hosted Server: Uses Streamable HTTP via
https://mcp.sapling.ai/mcp. It is recommended for most users and supports OAuth sign-in or API key headers. - Local Server: Runs on the user's machine via
npxusingstdiotransport. This is required for clients that only support local servers or for connections to on-premises Sapling deployments.
- Hosted Server: Uses Streamable HTTP via
Sapling SDK Accessibility features
The Sapling SDK includes built-in accessibility features to support users with visual impairments and comply with regulations such as Section 504 of the Rehabilitation Act:
- Screen Reader Support: Interactive elements include
aria-labelproperties. - Keyboard Navigation: Implemented keyboard shortcuts allow users to tab through interactive elements and perform 'accept' or 'ignore' actions via the keyboard.
- Screen Reader Support: Interactive elements include
Analyze content for SEO using the SEO Analysis API
The SEO Analysis API analyzes a page or article to provide deterministic on-page statistics, keyword density for target phrases, top terms found in the text, and LLM-generated SEO suggestions (title tags, meta descriptions, URL slugs, and focus keywords). It is designed for content teams and CMS integrations to verify keyword coverage and generate metadata during publishing workflows.curl -X POST https://api.sapling.ai/api/v1/seo \ -H "Content-Type: application/json" \ -d '{"key":"<api-key>", "text":"A grammar checker does more than fix typos...", "keywords": ["grammar checker"]}'Deploy Sapling on-premises for data compliance
Sapling offers a self-hosted, on-premises version of its services designed for companies in highly-regulated sectors (such as financial services and healthcare) that must meet HIPAA, PCI, and other data compliance standards. This deployment ensures security and complete control over data, preventing the sharing of sensitive information with third parties and providing audit logs for data access.Understand Sapling Grammar Check API capabilities
The Sapling Grammar Check API is an HTTP endpoint that analyzes text and returns a list of suggested corrections as JSON edits. Each edit includes the sentence, character offsets for the span to be replaced, the suggested replacement text, and an error-type label. This allows applications to render, filter, or apply corrections programmatically rather than receiving a fully rewritten block of text.Evaluate Sapling for business writing assistance
Sapling is a language model copilot designed for business teams (such as customer support or inside sales). It utilizes machine learning models trained on millions of sentences to provide rich writing suggestions. Key features include:
- Grammar checking and writing assistance for agents.
- A management dashboard providing actionable insights.
- Support for both cloud-based and on-premises (self-hosted) deployments.
- HIPAA-compliant options for healthcare data.
Analyze text syntactic information using the Analysis API
Theanalysis_h1endpoint computes syntactic information about input text, including parts of speech (adverbs), sentence voice (active vs. passive), readability difficulty (hardorvery_hard), and suggested simplifications for complex phrases.POST https://api.sapling.ai/api/v1/analysis_h1
Request Body Parameters:
key(String): 32-character API key.text(String): Text to analyze.session_id(Optional String): Unique identifier for the document/text portion. Defaults to current date inYYYYMMDDformat.
Clean up NLP output with the Postprocess endpoint
The Postprocess endpoint is used to repair text outputs from NLP or AI systems, such as transcriptions or captions. It provides the following operations:
- Fixing or restoring punctuation
- Fixing capitalization
- Fixing or restoring whitespace
- Splitting long sentences into shorter ones
For a more comprehensive solution that includes spelling and grammar checks, use the Edits endpoint instead.