Writer & Humanizer Async Runs
Endpoints
Writer & Humanizer Async Runs
Create and poll asynchronous humanization runs with optional webhook callbacks
POST
Writer & Humanizer Async Runs
The async Writer & Humanizer API lets you humanize existing text without keeping a long HTTP connection open. Use it for Zapier, n8n, agent platforms, workflow engines, or any integration where the synchronousDocumentation Index
Fetch the complete documentation index at: https://docs.stealthgpt.ai/llms.txt
Use this file to discover all available pages before exploring further.
/api/stealthify request may exceed the caller’s timeout.
The existing
POST /api/stealthify endpoint is unchanged and remains supported for current API clients. This async API is an alternative for long-running humanization, not a replacement.Flow
Create a run
Send
POST /api/stealthify/runs with text to humanize. Optionally include webhookUrl, webhookSecret, and idempotency-key.Authentication
Your Stealth API token from the Stealth API dashboard.
Create a run
POST https://stealthgpt.ai/api/stealthify/runs
Headers
Your Stealth API token.
Must be
application/json.Optional key, 1-255 characters. Reuse the same key when retrying the same create request to avoid enqueueing duplicate runs.
Request body
Existing text to humanize. This endpoint does not generate a new essay from a prompt.
"quality" runs quality checks and repairs. "fast" performs a faster single-pass rewrite."heavy" uses the full StealthGPT humanizer pipeline. "lite" is faster and intended for light AI-smell cleanup."text" returns plain text. "markdown" preserves/restores markdown formatting where supported.Optional URL that receives a
POST callback when the run reaches a terminal status.Optional signing secret, 16-255 characters. When present, StealthGPT signs webhook callbacks with HMAC-SHA256.
Response: 202 Accepted
Identifier of the queued humanization run.
Always
"queued" for a successful create response.Relative polling URL:
/api/stealthify/runs/{runId}.Poll run status
GET https://stealthgpt.ai/api/stealthify/runs/{runId}
Headers
Your Stealth API token. The run must belong to this token’s account.
Path parameters
The
runId returned from POST /api/stealthify/runs.Queued response
Running response
Completed response
The completed polling response is also the successful webhook callback body.Humanized output text.
Human-likeness score from 0 to 100. Higher is better: a higher score means the result 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.)
Total billed words for this run: input words plus output words.
Credits charged for this run. Humanization bills 1 credit per word, so this
equals
wordsSpent.Prepaid word balance after this charge.
"prepaid" when covered from balance, or "payg" when metered usage was applied.Words billed to metered usage for this request (0 when fully prepaid).
Failed response
error.code values:
| Code | Meaning |
|---|---|
humanize_failed | The humanization pipeline failed before output was available. |
payg_terms_required | The user ran out of prepaid credits and has not accepted pay-as-you-go terms. |
payment_required | Credits or pay-as-you-go access were not available when billing was finalized. |
billing_delayed | Billing was temporarily delayed; create a new run later if needed. |
result_unavailable | The run completed, but its linked humanized result is no longer available. |
cancelled | The run was cancelled before completion. |
Webhook callbacks
IfwebhookUrl is present in the create request, StealthGPT sends a best-effort POST when the run reaches a terminal status: completed, failed, or cancelled.
Headers
application/jsonStealthGPT-API-Webhook/1.0stealthify.run.completed, stealthify.run.failed, or stealthify.run.cancelled.The run id.
Unix timestamp in seconds. Present on every webhook callback.
Present when
webhookSecret was provided. Format: v1={hex_hmac_sha256}.Delivery behavior
- Webhook delivery uses a 10-second timeout.
- Network errors, timeouts,
429, and5xxresponses are retried up to 3 attempts. 4xxresponses other than429are treated as final failures.- Webhook delivery is best-effort: a failed callback does not change the run status.
- The callback body is the same terminal payload returned by
GET /api/stealthify/runs/{runId}. - When
webhookSecretis provided, the signature is computed over${timestamp}.${rawBody}using HMAC-SHA256. - Reject signed callbacks with old timestamps. A 5-minute tolerance is recommended.
Verify a signature
Use the raw request body exactly as received. Re-serializing parsed JSON can change whitespace and produce a different signature.nodejs
Examples
Errors
| Endpoint | Status | Meaning |
|---|---|---|
POST /api/stealthify/runs | 400 | Invalid request body or idempotency-key. |
POST /api/stealthify/runs | 401 | Missing api-token header or token not found. |
POST /api/stealthify/runs | 402 | Insufficient credits, pay-as-you-go not available, or payment method missing. |
POST /api/stealthify/runs | 500 | Server error while creating the run. |
GET /api/stealthify/runs/{runId} | 400 | Invalid runId. |
GET /api/stealthify/runs/{runId} | 401 | Missing api-token header or token not found. |
GET /api/stealthify/runs/{runId} | 404 | Run not found or belongs to another account. |
GET /api/stealthify/runs/{runId} | 500 | Server error while reading status. |
Usage notes
- Use
idempotency-keywhenever your create request can be retried by a queue, workflow engine, or HTTP client. - Poll every 5-15 seconds; there is no benefit to polling every second.
- Store
runId,statusUrl, and your own job id together so webhook handlers can reconcile callbacks with queued work. - This endpoint only humanizes existing text. To generate a new essay or article from a prompt, keep using
POST /api/stealthifyorPOST /api/stealthify/agent, depending on the workflow.