Skip to content
VoiceMint Developers

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

FieldTypeDescription
check_grammarboolean
check_spellingboolean
check_styleboolean
dialectDialectCode
formality_levelstringformal, informal, neutral
language*LanguageCode
one 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_alternativesboolean
text*stringText to check

Response

200 application/json

FieldTypeDescription
corrected_textstring
errors*GrammarError[]
formality_scorenumber
language_varietystring
readability_scorenumber
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

401Missing, wrong, revoked or expired key.
403The key lacks media.write, the route is not available to keys, or the key's IP allow-list refuses this client.
402Not enough credits, or the key reached its spending cap.
422The request failed validation; `detail` lists the fields.
429Over 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"
}'