Skip to content
RSFlowHub
  1. Home
  2. APIs
  3. Text & Language
  4. AI Grammar Fix & Sentence Enhancer API
Text & Language API

AI Grammar Fix & Sentence Enhancer API

Automated spelling, punctuation, and grammar correction API with tone adjustment and error explanations.

POST https://rsflowhub.com/api/v1/ai/grammar-fix
  • 1 credit per call
  • X-API-Key header
  • JSON in, JSON out
POST /api/v1/ai/grammar-fix
{
    "text": "I went to the store yesterday bcuz I need milk.",
    "tone": "professional",
    "dialect": "US",
    "return_explanations": true
}
200 OK response.json
{
    "result": {
        "corrected_text": "We have received your request and will reply within two business days.",
        "changes_made": true,
        "explanations": [
            {
                "original": "We has received",
                "corrected": "We have received",
                "reason": "Subject-verb agreement"
            },
            {
                "original": "two buisness days",
                "corrected": "two business days",
                "reason": "Spelling"
            }
        ]
    }
}
Definition

What is the AI Grammar Fix & Sentence Enhancer API?

AI Grammar Fix & Sentence Enhancer API is a REST API on RSFlowHub for web, mobile and AI agent applications. Send a JSON request to POST /api/v1/ai/grammar-fix with your API key; RSFlowHub runs it on a tuned AI model, falls back to a backup provider if needed, and returns a structured JSON result, usually within 1 to 3 seconds.

Try it without code or signup: Free grammar checker

Endpoint
POST /api/v1/ai/grammar-fix
Authentication
X-API-Key header
Price
1 credit per call
Rate limit
10 to 120 requests / minute by plan
Typical response
1 to 3 seconds
Format
JSON, UTF-8

Request parameters

Send these fields as a JSON body. An invalid or missing field returns a 422 error that names the field.

FieldTypeRequiredDescription
text string Required The raw text to be corrected (Max: 5,000 characters).
tone string Optional Desired tone of the corrected text (e.g., "professional", "casual", "academic"). Default is "auto" (keeps original tone).
dialect string Optional Target English dialect (e.g., "US", "UK", "AU"). Adjusts localized spellings like color vs colour. Default is "US".
return_explanations boolean Optional Optional. If true, the API will return an array detailing exactly what was changed and why (similar to Grammarly).

Code examples

Copy, replace rfh_your_api_key with your key and run. Prefer a client library? See the official SDKs.

request.sh
curl -X POST "https://rsflowhub.com/api/v1/ai/grammar-fix" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rfh_your_api_key" \
  -d '{"text":"I went to the store yesterday bcuz I need milk.","tone":"professional","dialect":"US","return_explanations":true}'

Response

Every RSFlowHub endpoint uses the same envelope, so one parser handles all of them. Failed calls are not charged.

response.json
{
    "success": true,
    "request_id": "req_3f9a2c7e-5b1d-4e8a-9c2f-7d6e1a0b4c8d",
    "data": {
        "result": {
            "corrected_text": "We have received your request and will reply within two business days.",
            "changes_made": true,
            "explanations": [
                {
                    "original": "We has received",
                    "corrected": "We have received",
                    "reason": "Subject-verb agreement"
                },
                {
                    "original": "two buisness days",
                    "corrected": "two business days",
                    "reason": "Spelling"
                }
            ]
        }
    },
    "meta": {
        "version": "v1",
        "timestamp": "2026-10-05T09:30:00Z"
    }
}
Envelope fields
FieldTypeMeaning
successbooleantrue when the call worked, false on any error.
request_idstringUnique id for this call. Quote it when you contact support.
data.resultobjectThe result of this endpoint (see the example).
errorobjectOnly on failure: code, message and details per field.
metaobjectAPI version and server timestamp.

All error codes: Errors reference

Features

Automated Spelling & Punctuation

Instantly detects and fixes typos, spelling mistakes, missing commas, and run-on sentences.

Tone & Dialect Customization

Adjust writing tone between professional, casual, academic, or technical while switching dialects (US/UK/AU).

Detailed Error Explanations

Optionally returns detailed breakdown array of detected mistakes, grammar rules, and applied corrections.

Markup & Code Protection

Safely preserves HTML tags, markdown elements, and inline code snippets without corrupting markup.

Use cases

How teams use the AI Grammar Fix & Sentence Enhancer API in production.

CMS & Web Apps

User Content & Forum Moderation

Scrub user-submitted blog comments, forum posts, and reviews before saving to database.

Input
I went to the store yesterday bcuz I need milk.
Output
I went to the store yesterday because I needed milk.

Elevates content quality across community platforms.

Helpdesk SaaS

Customer Support Email Polishing

Automatically fix typos and polish support ticket draft responses before sending to clients.

Input
we are working on your issue and will get back to u ASAP
Output
We are working on your issue and will get back to you as soon as possible.

Ensures professional client communication.

EdTech

EdTech & Writing Assistants

Provide real-time feedback and grammar score insights for student essay writing tools.

Input
Their is many reasons why global warming is bad.
Output
There are many reasons why global warming is bad.

Accelerates learning with instant writing correction.

AI Grammar Fix & Sentence Enhancer API vs building it yourself

The same job done three ways.

TopicRSFlowHub APIRaw LLM promptsRules / regex
Output Validated JSON fieldsFree text you have to parseFixed patterns only
Setup One POST request, no promptsWrite and maintain prompts and parsingWrite and maintain rule lists
Provider outage Automatic fallback to a backup modelYou build retries and a second vendorNot applicable
Pricing 1 credit per call, failed calls freePer token, per vendorYour own servers and upkeep
Understands context Yes, AI modelYes, AI modelNo, keywords only

Frequently asked questions

Which programming languages are supported?
RSFlowHub Grammar Fix API is a standard RESTful endpoint accessible via cURL, PHP (Laravel), Node.js / JavaScript, Python, Go, Java, or C#.
How fast is the Grammar Fix API response time?
Grammar Fix requests usually complete in 1 to 3 seconds, depending on input length and the AI model. Identical repeat requests are served from cache and return faster.
Does the API preserve HTML tags and markdown code blocks?
Yes! The API intelligently protects HTML markup (e.g. <b>, <code>), markdown syntax, and variable tags during grammar enhancement.
Can I customize writing tone and English dialects?
Yes. You can specify "tone" (professional, casual, academic) and "dialect" (US, UK, AU) to match your target brand voice.
How many credits are deducted per request?
Standard Grammar Fix API requests consume 1 base credit per call.

Start using the AI Grammar Fix & Sentence Enhancer API

Free plan with 100 credits/month + 1,000 bonus credits when you sign in before 23 Nov. Test it in the playground first, no code needed.

RSFlowHub

Sign in to continue

You'll come straight back to this page.

Forgot password?

New to RSFlowHub? Create a free account