Check Grammar
POST/language/grammar-check
Check grammar and spelling in text.
Authentication
Authorization: Bearer vm_sk_… with the media.write permission (or all.write). See Authentication.
Request body
application/json
| Field | Type | Description |
|---|---|---|
check_grammar | boolean | |
check_spelling | boolean | |
check_style | boolean | |
dialect | DialectCode | |
formality_level | string | formal, informal, neutral |
language* | LanguageCodeone of en, es, fr, de, it, pt, ru, zh, ja, ko, ar, hi, nl, pl, tr, sv, da, no, fi, el, he, cs, hu, ro, th, vi, id, ms, auto | Common language codes (ISO 639-1). |
suggest_alternatives | boolean | |
text* | string | Text to check |
Response
200 application/json
| Field | Type | Description |
|---|---|---|
corrected_text | string | |
errors* | GrammarError[] | |
formality_score | number | |
language_variety | string | |
readability_score | number | |
total_errors* | integer | |
total_suggestions* | integer | |
total_warnings* | integer |
{
"errors": [
{
"end_position": 0,
"error_text": "string",
"error_type": "string",
"message": "string",
"severity": "string",
"start_position": 0,
"suggestions": [
"string"
]
}
],
"total_errors": 0,
"total_suggestions": 0,
"total_warnings": 0
}Errors
401 | Missing, wrong, revoked or expired key. |
403 | The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client. |
402 | Not enough credits, or the key reached its spending cap. |
422 | The request failed validation; `detail` lists the fields. |
429 | Over a rate limit; retry after `Retry-After` seconds. |
All statuses: Errors.
Example
curl -X POST "https://api.voicemint.io/api/v1/language/grammar-check" \
-H "Authorization: Bearer $VOICEMINT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"language": "en",
"text": "string"
}'