LM-Kit OneDocs2026.8.10lm-kit.com
AI Generation

Text Correction

Corrects the input text by checking for grammar and spelling errors.#

POST/lmkit/v1/correct

Corrects the provided content using the specified or default text correction model. The correction process includes checking for grammar and spelling mistakes. Returns the corrected text. If processing exceeds the configured timeout, returns 202 Accepted with a job_id. Poll GET /lmkit/v1/jobs/ for status and results.

Request body

application/json ·

PropertyTypeDescription
modelstring

Specifies the identifier of the text correction model to be used. If not provided, the default model will be applied.

inputrequiredstring

Specifies the original text that is to be corrected. This field is required and must contain a non-empty plain text string.

Responses

StatusTypeDescription
200

OK

202

Accepted

400

Bad Request

500application/json

Internal Server Error

404

Not Found

curl -X POST "$LMKIT_ONE_URL/lmkit/v1/correct" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "",
  "input": ""
}'