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

Text Rewriter

Rewrites the input text.#

POST/lmkit/v1/rewrite

Rewrites the provided content using the specified or default rewriting model. You can optionally specify the target language and the desired communication style. Returns the rewritten 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 rewriting model to be used. If not provided, the default model will be applied.

inputrequiredstring

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

communication_stylerequired

Specifies the desired communication style for the rewritten text (e.g., concise, professional, friendly).

languagerequired

Specifies the target language for the rewritten text. Must be one of the supported languages.

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/rewrite" \
  -H "Authorization: Bearer $LMKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "",
  "input": "",
  "communication_style": "Concise",
  "language": "English"
}'