There's no bulk-delete button in the dashboard yet, but you can clear all your tasks with the API instead: list your tasks with POST /Task/List, then call POST /Task/InputOutputDelete for each one. Each call deletes that task's output files and the input files you uploaded for it, from our storage and the CDN.
The task token is the socketaccesstoken field. It's returned by /Run and included on every row of /Task/List.
Example script (Node.js)
Install axios (npm install axios), replace YOUR_API_KEY with your project's API key, and run the script with node. It works the same for 50 tasks or 5,000.
const axios = require("axios");
const API = "https://api.wiro.ai/v1";
const HEADERS = {
"x-api-key": "YOUR_API_KEY",
"Content-Type": "application/json"
};
const DONE = ["task_postprocess_end", "task_cancel"];
const sleep = ms => new Promise(r => setTimeout(r, ms));
(async () => {
let start = 0, deleted = 0;
while (true) {
const { data } = await axios.post(`${API}/Task/List`,
{ start: String(start), limit: "100" }, { headers: HEADERS });
const tasks = data.tasklist || [];
if (tasks.length === 0) break;
for (const t of tasks) {
if (!DONE.includes(t.status)) continue; // still running, skip it
try {
const res = await axios.post(`${API}/Task/InputOutputDelete`,
{ tasktoken: t.socketaccesstoken }, { headers: HEADERS });
if (res.data.result) deleted++;
} catch (e) {
console.error(`skipped ${t.socketaccesstoken}: ${e.message}`);
}
await sleep(100);
}
start += tasks.length;
}
console.log(`${deleted} tasks cleared`);
})();
Good to know
Finished or cancelled tasks only. Running tasks are rejected, so the script skips them. Run it again once they finish.
Safe to re-run. Calling it on a task that's already cleared just returns success.
It can't be undone. Files are removed from storage and the CDN, so any link you've shared or embedded stops working. Download anything you want to keep first.
The task records stay. Each task remains in your history with empty outputs, which is why the script pages forward with
start. If you also want the records removed, send us a message.Signature-based projects: generate a fresh
x-nonceandx-signaturefor every request in the loop (see Authentication).
Prefer not to run a script? Send us a message with your account email and what you want cleared (everything, or tasks older than a certain date), and we'll do it for you.
API reference: https://wiro.ai/docs/tasks
