Text Rewriter
Rewrites the input text.#
/lmkit/v1/rewriteRewrites 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 ·
| Property | Type | Description |
|---|---|---|
model | string | Specifies the identifier of the text rewriting model to be used. If not provided, the default model will be applied. |
inputrequired | string | 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
| Status | Type | Description |
|---|---|---|
| 200 | OK | |
| 202 | Accepted | |
| 400 | Bad Request | |
| 500 | application/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"
}'