> ## Documentation Index
> Fetch the complete documentation index at: https://apidocs.overtenai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Text editing

> Humanize, rewrite, and draft sections — the same writing tools that power the Overten web app.

When you don't need to build an entire document, three focused endpoints let
you work with short snippets of text: humanize a machine-sounding draft,
rewrite a passage to a custom instruction, or draft a fresh section from a
prompt. All three return structured JSON — no file is produced.

These are the same helpers the Overten web app uses inside its inline
editor, exposed for your own integrations with one `sk_live_*` key.

## Humanize

Rewrite text so it reads like a person wrote it — keeps meaning, drops AI
tells.

```bash theme={null}
curl -X POST "https://backend.overtenai.com/api/v1/text/humanize" \
  -H "X-API-Key: $OVERTEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "In conclusion, it is imperative that stakeholders engage..."
  }'
```

```json Response theme={null}
{
  "text": "To wrap up: stakeholders need to get involved..."
}
```

## Rewrite

Rewrite text to your own instruction — tone, length, style, audience, etc.

```bash theme={null}
curl -X POST "https://backend.overtenai.com/api/v1/text/rewrite" \
  -H "X-API-Key: $OVERTEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Make it more formal and trim it to one sentence",
    "text": "Hey team — just a heads up, the release is pushed to Friday because of the flaky test."
  }'
```

```json Response theme={null}
{
  "text": "The release has been rescheduled to Friday due to an intermittent test failure."
}
```

The `prompt` field carries the instruction; the `text` field is the
passage to transform.

## New content

Draft a fresh section from a prompt. Useful for filling in a missing
section of an outline before you generate the full document.

```bash theme={null}
curl -X POST "https://backend.overtenai.com/api/v1/text/new-content" \
  -H "X-API-Key: $OVERTEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A 3-paragraph executive summary about Q3 EMEA revenue slipping 4% from forecast, mostly driven by DACH softness.",
    "file_name": "Q3_review.docx"
  }'
```

```json Response theme={null}
{
  "text": "Executive summary\n\nQ3 EMEA revenue came in 4% below forecast..."
}
```

`file_name` is an optional hint — the model uses it to tune tone/length to
the target document type (a `.docx` briefing reads differently from a
`.pptx` slide). Leave it out if you don't care.

## Request limits

| Endpoint            | `text` max   | `prompt` max |
| ------------------- | ------------ | ------------ |
| `/text/humanize`    | 20,000 chars | —            |
| `/text/rewrite`     | 20,000 chars | 2,000 chars  |
| `/text/new-content` | —            | 5,000 chars  |

For longer bodies, chunk on paragraph or section boundaries and stitch
results client-side.

## Errors

Same shape as the rest of the API:

```json theme={null}
{
  "success": false,
  "error": "permission_denied",
  "message": "Your viewer role in this workspace doesn't allow creating content."
}
```

See [Errors](/errors) for the full list.

<Tip>
  These endpoints run on a smaller, faster model than `/excel/generate`
  et al. — most calls return in under 3 seconds. No sync/async split; you
  always get the answer in the response.
</Tip>
