// API DOCS
Phlegethon Public API
Integrate the same multi-layer forge pipeline that powers phlegethon.icu. Base URL: https://phlegethon.icu.
Authentication
All endpoints require a Bearer API key. Generate keys at Settings → API Keys on the live site. Rate limit: 60 requests/minute per key. Credits are shared with your web account.
Authorization: Bearer phg_your_api_key
GET/api/v1/credits
Get Credit Balance
Returns the current credit balance for the authenticated account.
curl
curl -X GET "https://phlegethon.icu/api/v1/credits" \\
-H "Authorization: Bearer phg_your_api_key"
javascript
const response = await fetch("https://phlegethon.icu/api/v1/credits", {
headers: {
"Authorization": "Bearer phg_your_api_key"
}
});
const data = await response.json();
console.log(data.credits); // 14.0
python
import requests
response = requests.get(
"https://phlegethon.icu/api/v1/credits",
headers={"Authorization": "Bearer phg_your_api_key"}
)
data = response.json()
print(data["credits"]) # 14.0
POST/api/v1/process
Process Image
Submit an image for AI detection bypass processing. Accepts either a file upload or a URL. Returns a job ID — poll GET /api/v1/jobs/:jobId for the result.
| Field | Type | Required | Description |
|---|
image | File | no | Image file (JPEG, PNG, WebP, max 20MB). Use multipart/form-data. |
imageUrl | string | no | URL of an image to process (alternative to file upload). |
cameraMode | boolean | no | Enable camera mode (+1 credit). Adds authentic EXIF camera sensor metadata. |
doublePass | boolean | no | Run the pipeline twice for deeper stealth. Works best when intensity alone isn't enough (+1 credit). |
curl
# File upload
curl -X POST "https://phlegethon.icu/api/v1/process" \\
-H "Authorization: Bearer phg_your_api_key" \\
-F "image=@/path/to/image.jpg" \\
-F "detector=truthscan" \\
-F "mode=standard"
# URL-based
curl -X POST "https://phlegethon.icu/api/v1/process" \\
-H "Authorization: Bearer phg_your_api_key" \\
-H "Content-Type: application/json" \\
-d '{"imageUrl":"https://example.com/photo.jpg","detector":"truthscan"}'
javascript
// File upload
const form = new FormData();
form.append("image", fileInput.files[0]);
form.append("detector", "truthscan");
form.append("mode", "standard");
const res = await fetch("https://phlegethon.icu/api/v1/process", {
method: "POST",
headers: { "Authorization": "Bearer phg_your_api_key" },
body: form,
});
const { jobId } = await res.json();
// Poll for result
const poll = async () => {
const r = await fetch(\
python
import requests, time
# File upload
with open("/path/to/image.jpg", "rb") as f:
res = requests.post(
"https://phlegethon.icu/api/v1/process",
headers={"Authorization": "Bearer phg_your_api_key"},
files={"image": f},
data={"detector": "truthscan", "mode": "standard"}
)
job_id = res.json()["jobId"]
# Poll for result
while True:
r = requests.get(
f"https://phlegethon.icu/api/v1/jobs/{job_id}",
headers={"Authorization": "Bearer phg_your_api_key"}
)
job = r.json()
if job["status"] == "done":
print(job["processedUrl"])
break
elif job["status"] == "failed":
raise Exception(job["errorMessage"])
time.sleep(2)
GET/api/v1/jobs/:jobId
Get Job Status
Poll this endpoint after submitting a job. Status transitions: queued → running → done | failed.
curl
curl -X GET "https://phlegethon.icu/api/v1/jobs/abc123xyz" \\
-H "Authorization: Bearer phg_your_api_key"
javascript
const res = await fetch("https://phlegethon.icu/api/v1/jobs/abc123xyz", {
headers: { "Authorization": "Bearer phg_your_api_key" }
});
const job = await res.json();
// job.status: "queued" | "running" | "done" | "failed"
// job.processedUrl: URL when done
python
response = requests.get(
"https://phlegethon.icu/api/v1/jobs/abc123xyz",
headers={"Authorization": "Bearer phg_your_api_key"}
)
job = response.json()
print(job["status"]) # "done"
print(job["processedUrl"]) # https://...
GET/api/v1/jobs
List Jobs
Returns a list of your most recent jobs, ordered by creation date.
| Field | Type | Required | Description |
|---|
limit | number | no | Max number of jobs to return (default: 20, max: 100) |
curl
curl -X GET "https://phlegethon.icu/api/v1/jobs?limit=10" \\
-H "Authorization: Bearer phg_your_api_key"
javascript
const res = await fetch("https://phlegethon.icu/api/v1/jobs?limit=10", {
headers: { "Authorization": "Bearer phg_your_api_key" }
});
const { jobs } = await res.json();
python
response = requests.get(
"https://phlegethon.icu/api/v1/jobs",
params={"limit": 10},
headers={"Authorization": "Bearer phg_your_api_key"}
)
jobs = response.json()["jobs"]
GET/api/v1/keys
List API Keys
Returns all API keys for your account (key values are never returned after creation).
curl
curl -X GET "https://phlegethon.icu/api/v1/keys" \\
-H "Authorization: Bearer phg_your_api_key"
javascript
const res = await fetch("https://phlegethon.icu/api/v1/keys", {
headers: { "Authorization": "Bearer phg_your_api_key" }
});
const { keys } = await res.json();
python
response = requests.get(
"https://phlegethon.icu/api/v1/keys",
headers={"Authorization": "Bearer phg_your_api_key"}
)
keys = response.json()["keys"]
POST/api/v1/keys
Create API Key
Creates a new API key. The full key is returned only once — store it securely.
| Field | Type | Required | Description |
|---|
rateLimit | number | no | Requests per minute (default: 100, max: 1000). |
expiresAt | ISO date string | no | Optional expiration date. |
curl
curl -X POST "https://phlegethon.icu/api/v1/keys" \\
-H "Authorization: Bearer phg_your_api_key" \\
-H "Content-Type: application/json" \\
-d '{"name":"Production","rateLimit":100}'
javascript
const res = await fetch("https://phlegethon.icu/api/v1/keys", {
method: "POST",
headers: {
"Authorization": "Bearer phg_your_api_key",
"Content-Type": "application/json"
},
body: JSON.stringify({ name: "Production", rateLimit: 100 })
});
const { key } = await res.json();
// Store key securely — shown only once!
python
response = requests.post(
"https://phlegethon.icu/api/v1/keys",
headers={
"Authorization": "Bearer phg_your_api_key",
"Content-Type": "application/json"
},
json={"name": "Production", "rateLimit": 100}
)
key = response.json()["key"]
# Store securely — shown only once!
DELETE/api/v1/keys/:id
Delete API Key
Permanently deletes an API key. All requests using this key will immediately fail.
curl
curl -X DELETE "https://phlegethon.icu/api/v1/keys/key_abc" \\
-H "Authorization: Bearer phg_your_api_key"
javascript
await fetch("https://phlegethon.icu/api/v1/keys/key_abc", {
method: "DELETE",
headers: { "Authorization": "Bearer phg_your_api_key" }
});
python
requests.delete(
"https://phlegethon.icu/api/v1/keys/key_abc",
headers={"Authorization": "Bearer phg_your_api_key"}
)
GET/api/v1/usage
Get Usage Stats
Returns API usage statistics for the current key over the last 24 hours.
curl
curl -X GET "https://phlegethon.icu/api/v1/usage" \\
-H "Authorization: Bearer phg_your_api_key"
javascript
const res = await fetch("https://phlegethon.icu/api/v1/usage", {
headers: { "Authorization": "Bearer phg_your_api_key" }
});
const { last24Hours } = await res.json();
python
response = requests.get(
"https://phlegethon.icu/api/v1/usage",
headers={"Authorization": "Bearer phg_your_api_key"}
)
stats = response.json()["last24Hours"]
Utilities & Gen AI API
Additional endpoints cover the full catalog of utility tools and Gen AI styles:
GET /api/v1/utilities/tools — list utility tools
POST /api/v1/utilities/run — run a utility tool
GET /api/v1/utilities/jobs/:jobId — utility job status
GET /api/v1/genai/styles — list Gen AI styles
POST /api/v1/genai/run — run a Gen AI style
GET /api/v1/genai/jobs/:jobId — Gen AI job status
Authenticate every request with Authorization: Bearer phg_your_api_key. Create keys in the live dashboard under Settings.