Stealth Agent
Endpoints
Stealth Agent
Long-form Stealth Agent generation via POST /api/stealthify/agent
POST
Stealth Agent
TheDocumentation 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/agent endpoint runs a Stealth Agent pipeline: research, generation, humanization, and optional fact-checking and image insertion. It uses the same Stealth API word balance and pay-as-you-go rules as /api/stealthify.
Requests can take several minutes. Use a client timeout of at least 10 minutes (the server allows up to 600 seconds).
Authentication
Your Stealth API token from the Stealth API dashboard.
Request body
Send JSON with a requiredpreset that selects one of three shapes (discriminated union). Unknown fields are rejected (strict schema).
Academic
Must be
"academic".Topic or instructions for the academic-style document (non-empty).
When
true, runs a fact-check pass on the draft and applies fixes before humanization.When
true, may embed generated images in the final markdown where supported.SEO
Must be
"seo".Topic or brief for SEO-oriented content (non-empty).
Same behavior as academic.
Same behavior as academic.
Social
Must be
"social".Topic or brief for the social post (non-empty).
Target platform:
"linkedin" or "medium".Same behavior as academic.
Same behavior as academic.
Successful response (200)
Identifier of the Stealth Agent run (stored server-side).
Identifier of the saved document record for this run.
Echoes the request preset:
academic, seo, or social.Final content as markdown (same primary output that is stored for the document; may include embedded images when
enableImageGeneration is true).Word count of
result used for billing.Prepaid word balance after this charge (metered usage may still be reported separately).
"prepaid" when the request was covered from balance, or "payg" when metered pay-as-you-go usage was applied for part or all of the charge.Words billed to metered usage for this request (0 when fully prepaid).
Errors
| Status | Meaning |
|---|---|
| 400 | Invalid JSON or validation error. Body may include message and info (issue details). |
| 401 | Missing api-token header or token not found. |
| 402 | Insufficient credits, pay-as-you-go not available, payment method missing, or billing cap delay. message describes the case. |
| 499 | Request was aborted (client disconnect or cancellation). |
| 500 | Server error. message may contain a short description. |
Example: academic
Example: social
Usage notes
- Billing uses output words only: charged words =
ceil(outputWords × 10)toward your Stealth API balance (see Pricing). - You must have prepaid words or accepted pay-as-you-go terms with a valid payment method when balance is low—same rules as other Stealth API endpoints.
- Prefer idempotent retries with care: each successful
200run creates a new run and document and charges credits again.