API Reference

Readability Analyzer

Analyze text readability using Flesch-Kincaid, Gunning Fog, and other indices

Score and analyze text content for readability using industry-standard metrics like Flesch-Kincaid, Gunning Fog, and Coleman-Liau indices. Content teams, educators, and compliance officers use readability analysis to ensure documents, marketing copy, and legal text meet their target audience's comprehension level.

Flesch-KincaidGunning FogColeman-Liausentence statistics

Endpoint

POST /v1/text/readability
Authentication: Include your API key in the X-API-Key header with every request. All requests go through the API gateway which handles authentication, rate limiting, and usage tracking.
Open Swagger UI (interactive docs)

Request

{
  "text": "The quick brown fox jumps over the lazy dog. This sentence is simple and easy to read."
}

Request Fields

FieldTypeDescription
text string Text content to analyze

Response

{
  "fleschKincaid": {
    "readingEase": 92.3,
    "gradeLevel": 2.1
  },
  "gunningFog": 3.4,
  "colemanLiau": 4.2,
  "automatedReadability": 1.8,
  "wordCount": 17,
  "sentenceCount": 2,
  "avgWordsPerSentence": 8.5
}

Response Fields

FieldTypeDescription
fleschKincaid object Nested object with properties
gunningFog number Field value
colemanLiau number Field value
automatedReadability number Field value
wordCount integer Field value
sentenceCount integer Field value
avgWordsPerSentence number Field value

Error Codes

StatusMeaning
200Request completed successfully
400Bad request — invalid or missing parameters
401Missing or invalid X-API-Key header
429Rate limit exceeded — check Retry-After header
500Internal server error

Common Error Scenarios

400 Empty content

Request that triggers this:

{"text": ""}

Error response:

{"type": "/problems/validation-error", "title": "Empty Content", "status": 400, "detail": "Text content cannot be empty"}

How to fix: Provide non-empty text content. The minimum length is 1 character.

413 Content too large

Request that triggers this:

{"text": "[very large content > 100MB]"}

Error response:

{"type": "/problems/payload-too-large", "title": "Payload Too Large", "status": 413, "detail": "Content exceeds maximum size of 100MB"}

How to fix: Reduce content size or split into multiple requests. Compress text before sending if applicable.

Code Examples

curl -X POST /v1/text/readability \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "text": "The quick brown fox jumps over the lazy dog. This sentence is simple and easy to read."
}' 
// Node.js (18+) or modern browser
const response = await fetch("/v1/text/readability", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "text": "The quick brown fox jumps over the lazy dog. This sentence is simple and easy to read."
}),
});

const data = await response.json();
console.log(response.status, data);
import requests

response = requests.post(
    "/v1/text/readability",
    headers={
        "X-API-Key": "YOUR_API_KEY",
        "Content-Type": "application/json",
    },
    json={
    "text": "The quick brown fox jumps over the lazy dog. This sentence is simple and easy to read."
},
)

print(response.status_code)
print(response.json())
package main

import (
	"fmt"
	"io"
	"net/http"
	"strings"
)

func main() {
	body := strings.NewReader(`{
  "text": "The quick brown fox jumps over the lazy dog. This sentence is simple and easy to read."
}`)
	req, _ := http.NewRequest("POST", "/v1/text/readability", body)
	req.Header.Set("X-API-Key", "YOUR_API_KEY")
	req.Header.Set("Content-Type", "application/json")

	resp, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	data, _ := io.ReadAll(resp.Body)
	fmt.Println(resp.StatusCode)
	fmt.Println(string(data))
}
{
  "name": "readability",
  "description": "Analyze text readability using Flesch-Kincaid, Gunning Fog, and other indices",
  "inputSchema": {
    "type": "object",
    "properties": {
      "api_key": {"type": "string", "description": "Your Orovai API key"},
      "request": {"type": "object", "description": "Request body"}
    },
    "required": ["api_key", "request"]
  },
  "endpoint": "/v1/text/readability",
  "method": "POST",
  "headers": {
    "X-API-Key": "{{api_key}}",
    "Content-Type": "application/json"
  }
}

API Reference