Jobs
Delete a job
Delete a job and its result files, for good.
DELETE
https://api.sangtao.ai/v2/jobs/{jobId}Authorization
X-Api-Keystring · headerrequiredYour API key, from the API keys page of your account.
Path parameters
jobIdstringrequiredThe jobId in the path.
Deleting removes the job and its result files (images, videos) for good — their URLs stop working. It cannot be undone.
Key access
The API key needs Write access to Jobs. A read-only key gets 403.
Errors
| Status | errorCode | When |
|---|---|---|
| 403 | FORBIDDEN | The key has no Write access to Jobs |
| 404 | JOB_NOT_FOUND | No job of yours with this jobId |
| 409 | JOB_PUBLISHED | The job is public in the gallery — take it down first |
DELETE
/jobs/{jobId}curl -X DELETE "https://api.sangtao.ai/v2/jobs/img-456" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": {
"deleted": 1
}
}DELETE
/jobs/{jobId}curl -X DELETE "https://api.sangtao.ai/v2/jobs/img-456" \
-H "X-Api-Key: YOUR_API_KEY"{
"success": true,
"data": {
"deleted": 1
}
}