How to Delete Task
Cancel a running task or delete a completed prediction.
Endpoint
DELETE https://api.get3w.com/api/v3/predictions/{task-id}Request
bash
curl -X DELETE "https://api.get3w.com/api/v3/predictions/pred_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"python
import requests
response = requests.delete(
"https://api.get3w.com/api/v3/predictions/pred_abc123",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
print(response.json())javascript
const response = await fetch(
"https://api.get3w.com/api/v3/predictions/pred_abc123",
{
method: "DELETE",
headers: { "Authorization": "Bearer YOUR_API_KEY" }
}
);
const data = await response.json();
console.log(data);Response
json
{
"code": 200,
"message": "success",
"data": {
"id": "pred_abc123",
"status": "deleted"
}
}Behavior
| Task Status | Delete Behavior |
|---|---|
created | Task is canceled before processing starts |
processing | Task is canceled (may not stop immediately) |
completed | Outputs are deleted; content URLs become invalid |
failed | Task record is removed |
Notes
- Deleting a task does not issue a refund for processing that already occurred
- Output URLs become invalid immediately after deletion
- This action is irreversible
Next Steps
- How to Submit Task — Submit new tasks
- How to Get Result — Check task status