REST API v1

API Reference

Integrate Forge (AI detection bypass), Utilities, and Studio (image/video generation) into your own platform. Authenticate with an API key, submit jobs, and poll until results are ready.

How to use the API

1

Auth — API key Bearer token

Create a key under Settings → API Keys (shown once). Send Authorization: Bearer phg_… on every request. Keys are rate-limited (default 100 req/min).

2

Credits

Check balance with GET /api/v1/credits. Credits are deducted when a job is accepted and refunded if processing fails. Forge uses 1–3 credits per image; Studio image jobs cost 3 paid credits; Studio video cost depends on model/resolution/duration.

3

Forge vs Studio

Forge (/api/v1/process) takes an existing photo and stealth-processes it against AI detectors. Studio (/api/v1/studio/jobs) generates or edits images and videos from a prompt (and optional references). Utilities remain under /api/v1/utilities.

4

Submit, then poll

Every async endpoint returns a jobId with 202. Poll the matching GET …/jobs/:jobId every 2–5s until status is done or failed. Studio responses never include your prompt text.

BASE URL

https://phlegethon.icu/api/v1

Rate Limits & Errors

Default rate limit

100 requests/minute per API key. Exceeding returns 429 Too Many Requests.

Error format

All errors return JSON: { error: string, message: string }

Credits

Forge: 1 credit base (camera +1, double-pass +1). Studio image: 3 paid credits. Studio video: quoted by model/resolution/duration. Deducted on submit; refunded on failure.

Job polling

Poll every 2–5 seconds. Jobs typically complete in 5–20 seconds. Timed-out jobs are automatically restarted once.

Endpoints

Utilities API

Apply professional image tools to any photo — background removal, enhancement, colorization, and more. Each tool is an async job: submit, get a jobId, then poll for the result.

Studio API

Generate or edit images and videos with the same Creative Studio pipeline used in the product UI. Submit a prompt (and optional references), receive a jobId, then poll for an outputUrl. Prompts are never returned in API responses. Video models are Styx, Styx Prime, and Styx Light. Quote credits with POST /api/v1/studio/quote. Styx Light always includes automatic audio.

Pipeline Reference

FORGE INTENSITY

ValueCreditsDescription
lightRECOMMENDED1Enough for most images. Virtually no visible change to the human eye.
normal1Slightly stronger. Still very clean output.
aggressive1Noticeable artifacts on close inspection. Use when light/normal fail.
max1Maximum processing. Significant visible artifacts. Last resort only.

TARGET DETECTORS

ValueStatusDescription
truthscanAvailableBypasses TruthScan, ZeroGPT, Decopy AI, and more. Recommended.
sightengineComing SoonSightengine & Hive Moderation support — in development.

FORGE OPTIONS

OptionExtra CostDescription
cameraMode=true+1 creditInjects authentic camera sensor EXIF data. Recommended for forensic-level detectors.
doublePass=true+1 creditRuns the pipeline twice for deeper stealth. Best when a single pass isn't enough.
deviceProfilefreeSets a specific device EXIF profile (e.g. iphone15). Requires cameraMode=true.

FAQ & Troubleshooting

My image still gets flagged after processing. What should I do?
Try increasing the intensity: start with 'light', then try 'normal', 'aggressive', and finally 'max'. You can also enable cameraMode=true for an extra layer of forensic masking. If the image still fails, enable doublePass=true. Note that AI detectors evolve constantly — no bypass is 100% guaranteed.
How long does processing take?
Most jobs complete in 5–20 seconds. Occasionally a job may take up to 60 seconds under high load. If a job is stuck in 'running' for more than 2 minutes, it will be automatically retried once. If it fails, the credit is refunded.
I got a 402 Insufficient Credits error.
Your account doesn't have enough credits for the requested operation. Check your balance with GET /api/v1/credits. Camera mode costs 2 credits, double pass adds 1 more. Purchase credits at phlegethon.icu/pricing.
I got a 429 Too Many Requests error.
You've exceeded your API key's rate limit (default: 100 requests/minute). Implement exponential backoff and retry after the Retry-After header value. You can set a custom rate limit when creating a key.
Can I process NSFW or adult content?
Yes. Phlegethon imposes no content restrictions on the images you process. We do not review or store your images beyond the processing session.
Does the API support batch processing?
Currently each API call processes one image. For batch workflows, submit multiple jobs in parallel and poll each jobId independently. We recommend a concurrency limit of 5 simultaneous jobs per account.
What image formats are supported?
JPEG, PNG, and WebP. Maximum file size is 20MB. For best results, use the original AI-generated image without any prior compression or resizing.
My API key was compromised. What should I do?
Immediately delete the compromised key via DELETE /api/v1/keys/:id or from Settings → API Keys in the dashboard. Create a new key and update your integration. Old keys are invalidated instantly upon deletion.
Can I use the API for white-label or reseller products?
Yes. The API is designed for platform integrations and white-label use cases. Credits are consumed from your account regardless of who triggers the processing. For high-volume reseller pricing, contact us.
Why does the processed image URL expire?
Processed images are stored for 30 days and then purged. Download and store the result URL on your own infrastructure if you need long-term access.

Ready to integrate?

Generate your first API key from the dashboard and start forging.

Get API Key