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

# Writer & Humanizer

> Generate or rephrase content with the /api/stealthify endpoint

The `/api/stealthify` endpoint is the core of the StealthGPT API, allowing you to generate new content or rephrase existing text to be undetectable by AI detection tools.

<Info>
  For integrations that cannot keep a request open while humanization runs, use the async [`POST /api/stealthify/runs`](/api-reference/endpoints/stealthify-runs) flow. This synchronous endpoint remains unchanged for existing API clients.
</Info>

## Request Parameters

<ParamField header="api-token" type="string" required>
  Your unique API authentication token. You can find this in your StealthGPT dashboard under the API Key tab.
</ParamField>

<ParamField body="prompt" type="string" required>
  The text prompt for content generation or the text to be rephrased. Maximum 3,000 words per request.
</ParamField>

<ParamField body="rephrase" type="boolean" required>
  Set to `true` to rephrase the provided prompt text, or `false` to generate new content based on the prompt
</ParamField>

<ParamField body="tone" type="string">
  Controls the style and complexity of the generated content

  <Expandable title="Available tone options">
    <ResponseField>
      <ResponseField name="Standard" type="default">
        Ideal for casual writing. Easy to read and understand, suitable for general purposes.
      </ResponseField>

      <ResponseField name="HighSchool">
        Mimics the style of high school level writing. May contain grammatical errors. Scores high on Flesch-Kincaid Readability.
      </ResponseField>

      <ResponseField name="College">
        Semi-complex style typical of college-level writing. May include minor grammatical errors. Moderate Flesch-Kincaid Readability score.
      </ResponseField>

      <ResponseField name="PhD">
        Complex, sophisticated style. No grammatical errors. Low Flesch-Kincaid Readability score, ideal for academic writing.
      </ResponseField>
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="mode" type="string">
  Indicates the detail level of the response

  <Expandable title="Available mode options">
    <ResponseField>
      <ResponseField name="High">
        Maximum detail and elaboration in the response
      </ResponseField>

      <ResponseField name="Medium">
        Balanced level of detail
      </ResponseField>

      <ResponseField name="Low">
        Concise response with minimal detail
      </ResponseField>
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="qualityMode" type="string" default="quality">
  Controls rewrite quality vs speed.

  <Expandable title="Available qualityMode options">
    <ResponseField>
      <ResponseField name="quality">
        Default. Runs our quality checks/repairs for better reliability and lower detection risk.
      </ResponseField>

      <ResponseField name="fast">
        Skips quality checks/repairs and performs a single-pass rewrite. Output may have more errors and be more detectable.
      </ResponseField>
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="model" type="string" default="heavy">
  Selects the humanizer model. If omitted, requests use `heavy`.

  <Expandable title="Available model options">
    <ResponseField>
      <ResponseField name="heavy">
        Default. Runs the full StealthGPT humanizer pipeline and is designed for AI detector bypass.
      </ResponseField>

      <ResponseField name="lite">
        Fast AI-smell cleanup that keeps the text mostly unchanged. This mode is **not** designed to bypass AI detectors.
      </ResponseField>
    </ResponseField>
  </Expandable>
</ParamField>

<ParamField body="business" type="boolean" default="false" deprecated>
  Removed. The 10x premium engine has been replaced by the [Stealth Agent](/api-reference/endpoints/stealthify-agent) endpoint, which runs a full research → write → humanize pipeline (with optional fact-checking and image generation).

  The `business` field is still accepted in the request body for backward compatibility, but it has no effect: all `/api/stealthify` requests run on the standard engine and are billed at the standard rate. For premium-quality, long-form output, send your prompt to `POST /api/stealthify/agent` instead. See the [Stealth Agent overview](/api-reference/stealth-agent/overview) and [guide](/api-reference/stealth-agent/guide).
</ParamField>

<ParamField body="isMultilingual" type="boolean" default="true">
  Controls how non-English input is returned after processing.
  When `true` (default), non-English input will be kept in its localized language.
  When `false`, non-English input will be returned in English.
</ParamField>

<ParamField body="detector" type="string" default="turnitin" deprecated>
  Deprecated. Retained for backward compatibility only and has no effect on model behavior.
  You can safely omit this field; all requests use the same model.
</ParamField>

<ParamField body="outputFormat" type="string" default="text">
  Controls the formatting of the returned content.

  <Expandable title="Available output formats">
    <ResponseField>
      <ResponseField name="text">
        Default format. Returns plain text output.
      </ResponseField>

      <ResponseField name="markdown">
        Returns formatted content with markdown syntax (headings, lists, bold, etc.).
      </ResponseField>
    </ResponseField>
  </Expandable>
</ParamField>

## Response

<ResponseField name="result" type="string">
  The generated or rephrased content
</ResponseField>

<ResponseField name="howLikelyToBeDetected" type="number">
  Human-likeness score from 0 to 100. **Higher is better**: a higher score means the content reads as more human and is less likely to be flagged as AI; a lower score means it is more likely to be detected as AI-generated. (The field name is historical — treat a higher value as the better result.)
</ResponseField>

<ResponseField name="remainingCredits" type="number">
  Number of words remaining in your account after this request
</ResponseField>

<ResponseField name="wordsSpent" type="number" new>
  New: Replaces tokensSpent. Number of words used for the content generation or rephrasing.
</ResponseField>

<ResponseField name="billingMode" type="string" new>
  Whether the request was billed from prepaid words (`prepaid`) or pay-as-you-go metered billing (`payg`).
</ResponseField>

<ResponseField name="meteredChargedCredits" type="number" new>
  If billed via pay-as-you-go, the number of words added to metered usage for this request (0 when billed from prepaid).
</ResponseField>

<ResponseField name="tokensSpent" type="number" deprecated>
  Number of tokens used for the content generation or rephrasing
</ResponseField>

<ResponseField name="totalTokensSpent" type="number" deprecated>
  Total number of tokens consumed by this request
</ResponseField>

<ResponseField name="systemTokensSpent" type="number" deprecated>
  Number of tokens used by the system for processing the request
</ResponseField>

## Example Request

<CodeGroup>
  ```bash curl-example theme={null}
  curl --location 'https://stealthgpt.ai/api/stealthify' \
      --header 'api-token: YOUR_API_TOKEN' \
      --header 'Content-Type: application/json' \
      --data '{
          "prompt": "Explain the benefits of renewable energy",
          "rephrase": false,
          "tone": "College",
          "mode": "Medium",
          "qualityMode": "quality",
          "model": "heavy",
          "isMultilingual": true,
          "outputFormat": "markdown"
      }'
  ```

  ```python python-example theme={null}
  import requests

  response = requests.post(
      'https://stealthgpt.ai/api/stealthify',
      headers={
          'api-token': 'YOUR_API_TOKEN',
          'Content-Type': 'application/json'
      },
      json={
          'prompt': 'Explain the benefits of renewable energy',
          'rephrase': False,
          'tone': 'College',
          'mode': 'Medium',
          'qualityMode': 'quality',
          'model': 'heavy',
          'isMultilingual': True,
          'outputFormat': 'markdown'
      }
  )

  print(response.json())
  ```

  ```javascript nodejs-example theme={null}
  const axios = require('axios');

  axios.post('https://stealthgpt.ai/api/stealthify', {
      prompt: 'Explain the benefits of renewable energy',
      rephrase: false,
      tone: 'College',
      mode: 'Medium',
      qualityMode: 'quality',
      model: 'heavy',
      isMultilingual: true,
      outputFormat: 'markdown'
  }, {
      headers: {
          'api-token': 'YOUR_API_TOKEN',
          'Content-Type': 'application/json'
      }
  }).then(response => {
      console.log(response.data);
  });
  ```
</CodeGroup>

## Example Response

```json theme={null}
{
  "result": "Renewable energy offers several significant advantages in our modern world. Students and researchers point to multiple benefits like reduced carbon emissions, which helps fight climate change. These energy sources, including solar and wind power, represent inexhaustible resources unlike finite fossil fuels. Many communities find economic advantages through job creation in the growing renewable sector. Additionally, these technologies typically require less maintenance after installation and reduce dependency on foreign energy imports. Advancements continue making these options more cost-competitive, with prices dropping significantly over recent years. While challenges exist in implementation, the long-term benefits to environmental health, economic stability, and energy independence make renewable energy sources increasingly attractive options for our global energy needs.",
  "howLikelyToBeDetected": 92,
  "wordsSpent": 260,
  "remainingCredits": 985000,
  "billingMode": "prepaid",
  "meteredChargedCredits": 0,
  "systemTokensSpent": 0,
  "tokensSpent": 0,
  "totalTokensSpent": 0
}
```

## Usage Notes

* For optimal performance, we recommend keeping responses under 2,000 characters
* The quality and relevance of generated content depends on the phrasing of your prompts
* For more advanced usage techniques, see our [Advanced Usage Guide](/api-reference/advanced-usage)
