Documentation Index
Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
What are Web Tasks?
The Web Tasks API lets you describe a web task in plain English and have it executed for you—scraping a directory, filling a multi-page form, downloading a batch of files, or pulling data out of a table. You send a task description, a starting URL, any parameters it needs, and the shape of the output you want back. The API runs the task and returns the result. Under the hood, the AI decides which parts of the task benefit from being code, writes that code on the fly, and reuses it on later runs. Across repeat calls with the samereuseKey, executions get faster, cheaper, and more consistent—because each run executes saved code instead of re-exploring the site from scratch.
Web Tasks are workspace-scoped. Unlike Projects, you don’t create, deploy, or maintain anything. You call the API and get a result.
When to use Web Tasks
Use Web Tasks when:- The task benefits from generated code—crawling pages, extracting data across many entities, repeated multi-step actions.
- You’ll run the same task (or variations of it) more than once. The payoff comes from reuse.
- You want the API to write and maintain the automation for you instead of owning the code yourself.
- You want to write, debug, and own the automation code yourself, in the online IDE or locally with the CLI.
- You need full visibility into the code and every execution—browser traces, logs, and attempt timeline.
- You want advanced issue monitoring and auto-maintenance via self-healing projects.
- You need platform features like AuthSessions, Jobs and scheduling, or Sinks.
Core concepts
Start and result
Web Tasks use a two-call lifecycle, same as other long-running Intuned APIs:POST /{workspaceId}/web-tasks/start— submit the task. Returns awebTaskIdimmediately.GET /{workspaceId}/web-tasks/{webTaskId}/result— poll for status and result.
Request fields
| Field | Required | Description |
|---|---|---|
task | Yes | Natural-language instruction describing the task. |
startUrl | No | Optional hint telling the agent where to start in the browser. If omitted, the agent decides from the task description. |
parameters | No | Structured inputs that may change between runs (for example, { "batch": "S24" }). |
outputSchema | No | JSON Schema (draft 2020-12) for the desired result shape. If omitted, the system infers a format from the task. |
reuseKey | No | Label that ties this run to a reusable automation. See Reuse and the reuseKey. If omitted, the server generates one for you. |
model | No | Model the agent runs with: haiku, sonnet, or opus. Defaults to haiku. Heavier models help on harder tasks at higher cost. |
Status model
A Web Task moves through these states:pending— created, not yet executing.started— executing.completed— finished. The response includes anoutcomeofsuccessorfailed.
completed—the outcome distinguishes them. Failed runs never update saved reusable code.
Result delivery
The server decides how to return the result:- Inline — small outputs (booleans, short text, small arrays, small objects) come back directly in the response under
result.data. - File — large outputs come back as a downloadable URL under
result.file, often with apreview(row count and a small sample). File URLs are signed and expire after 7 days.
Cost
Final responses include cost when available:cost.aiUsd— AI/model cost in dollars.cost.compute— runtime compute usage in hours.
Reuse and the reuseKey
reuseKey is the mechanism that makes Web Tasks get cheaper and faster over time.
With a reuseKey, the system loads any code saved under that key and tries to run it. If the existing code works, it returns the result. If not, the AI repairs or updates the code. On success, the improved code is saved back under the same key. On failure, the previous code is left untouched.
Without a reuseKey, the server still creates a reusable bundle for the run. It auto-generates a wtr_-prefixed key, saves code under it, and returns it on the result as reuse.key. Pass that key on later calls when you want to reuse the same automation.
Same reuseKey means the same reusable automation, regardless of URL or parameters. If you want different automations, use different keys (yc_companies, wellfound_companies, shopify_products).
For the full execution model and reuse rules, see How Web Tasks work.
Example
The simplest path is the SDKrun() helper, which submits the task and polls for the result for you. Default poll interval is 5 seconds; you can pass an optional timeout.
Limits
- Each workspace can run up to 10 Web Tasks concurrently.
- Same-
reuseKeyruns are serialized: runs that share areuseKeyexecute one at a time so two runs don’t update the same code concurrently. Runs with different keys can run in parallel. - Failed runs return
outcome: "failed"with anerror.code. Possible codes:workspace-rate-limited,unauthenticated,no-ai-credits-left,timeout,rejected,internal-error. - No webhooks, AuthSessions, or queue inspection in v1.
Next steps
How Web Tasks work
Execution model and reuse rules in detail
API reference
Start and result endpoints
CLI reference
Run Web Tasks from the
intuned platform webtasks commands