Skip to main content
POST
/
api
/
ult
curl --request POST \
--url https://whetdata.com/api/ult/api/ult \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '{
"action": "classification",
"ruleset": "product_description",
"text": "Premium wireless headphones with active noise cancellation, 30-hour battery life, and crystal-clear audio quality.",
"threshold": 0.8
}'
{
  "success": true,
  "action": "classification",
  "ruleset": "product_descriptions",
  "result": {
    "valid": true,
    "confidence": 0.5,
    "score": 0.5,
    "reason": "<string>",
    "threshold": 123
  },
  "rateLimit": {
    "dailyRemaining": 123,
    "monthlyRemaining": 123
  }
}

Overview

Automatically fix spelling and grammar errors in your text. This action analyzes your content and returns a corrected version with all spelling and grammar mistakes fixed. The endpoint is POST /api/ult; the request body sets action: "clean".

Parameters

action
string
required
Must be "clean".
text
string
required
Input text (max 5,000 characters).

Example

cURL
curl -X POST https://whetdata.com/api/ult \
  -H "x-api-key: whet_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "action": "clean",
    "text": "This is a sentance with speling and grammer erors that need to be fixed."
  }'

title: “Clean” openapi: “POST /api/ult”

Overview

The clean action automatically fixes spelling and grammar errors in your text. It returns both the corrected text and a detailed list of all corrections made.

Use This Action To

  • Fix spelling mistakes in product descriptions
  • Correct grammar errors in marketing copy
  • Clean up user-generated content
  • Improve text quality before publishing

Parameters

action
string
required
Must be "clean"
text
string
required
Text to fix (max 5,000 characters)

Tips

The clean endpoint is perfect for preprocessing user-generated content before displaying it on your site.
The maximum text length is 5,000 characters. For longer texts, split them into chunks.

Authorizations

x-api-key
string
header
required

Your Whetdata API key. Get a free key here.

Body

application/json
action
enum<string>
default:classification
required

Action type: classification | nudges | clean

Available options:
classification,
nudges,
clean
text
string
default:Premium wireless headphones with active noise cancellation, 30-hour battery life, and crystal-clear audio quality.
required

Input text (max 5,000 characters)

Maximum length: 5000
ruleset
enum<string>
default:product_description

Ruleset name (required for classification and nudges)

Available options:
product,
product_description,
marketing_copy,
product_review,
technical_documentation,
date_online
threshold
number
default:0.7

Classification threshold (0.0 to 1.0)

Required range: 0 <= x <= 1

Response

Successful response

  • Option 1
  • Option 2
  • Option 3
success
boolean
Example:

true

action
string
Example:

"classification"

ruleset
string
Example:

"product_descriptions"

result
object
rateLimit
object
I