Skip to main content
POST
Stealth Agent
The /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).
For production integrations, workflow engines, or UI backends, use the async POST /api/stealthify/agent/runs endpoint. It returns immediately with a runId, supports idempotency-key, and can send a webhook callback.

Authentication

string
required
Your Stealth API token from the Stealth API dashboard.

Request body

Send JSON with a required preset that selects one of three shapes (discriminated union). Unknown fields are rejected (strict schema).

Academic

string
required
Must be "academic".
string
required
Topic or instructions for the academic-style document (non-empty).
boolean
default:"false"
When true, runs a fact-check pass on the draft and applies fixes before humanization.
boolean
default:"false"
When true, may embed generated images in the final markdown where supported.

SEO

string
required
Must be "seo".
string
required
Topic or brief for SEO-oriented content (non-empty).
boolean
default:"false"
Same behavior as academic.
boolean
default:"false"
Same behavior as academic.

Social

string
required
Must be "social".
string
required
Topic or brief for the social post (non-empty).
string
required
Target platform: "linkedin" or "medium".
boolean
default:"false"
Same behavior as academic.
boolean
default:"false"
Same behavior as academic.

Successful response (200)

string
Identifier of the Stealth Agent run (stored server-side).
string
Identifier of the saved document record for this run.
string
Echoes the request preset: academic, seo, or social.
string
Final content as markdown (same primary output that is stored for the document; may include embedded images when enableImageGeneration is true).
number
Word count of result used for billing.
number
Stealth API words charged for this request (see Pricing).
number
Prepaid word balance after this charge (metered usage may still be reported separately).
string
"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.
number
Words billed to metered usage for this request (0 when fully prepaid).

Errors

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 the async runs endpoint when retries are possible: POST /api/stealthify/agent/runs supports idempotency-key.
  • Retry synchronous requests with care: each successful 200 run creates a new run and document and charges credits again.