Skip to main content
WebRun charges for session time and token usage. Three quick changes can cut your costs by 50% or more.

Quick Wins

1. Terminate Sessions Explicitly

Set terminateOnCompletion: true on your final task, or call terminate explicitly. This alone reduces costs by 50% if you’re currently letting sessions timeout.

2. Write Concise Task Descriptions

Shorter descriptions = fewer input tokens. Be specific, not verbose. Verbose (150 tokens):
Concise (35 tokens):
Impact: 75% reduction in input tokens for this task.

3. Set startingUrl When Known

Skip navigation by providing the starting URL directly.
Impact: Saves 5-10 seconds and ~500-1000 tokens per task.

Additional Optimizations

Set Appropriate maxDuration

Limit task duration to prevent runaway costs:
Guidelines:
  • Simple searches: 30,000ms (30s)
  • Form filling: 60,000ms (1 min)
  • Multi-step workflows: 120,000ms (2 min)

Reuse sessions for related tasks instead of creating new ones. Expensive:
Optimized:
Impact: 3x reduction in session overhead costs.

Limit Token Usage

For simple tasks, reduce token limits:

Use Policies to Prevent Detours

Use automation policies with domain rules to block unnecessary domains and prevent wasted navigation.

Use Custom Proxies for High-Bandwidth Tasks

WebRun-managed proxies cost $2 per GB of data transfer. For tasks that download large files or scrape image-heavy pages, use your own proxy to avoid per-GB charges. Only enable proxies when you actually need geographic targeting or IP management. Each proxied session adds 2-3 seconds of cold-start latency.
See the Proxies guide for configuration details.

Monitoring Costs

Real-time: Check usage.cost in every API response.
Dashboard: View historical usage at app.webrun.ai/usage. During polling: The usage object updates in real-time as tasks execute.

Cost Optimization Checklist

  • Use /start/run-task for single tasks (auto-terminates)
  • Set terminateOnCompletion: true on final tasks in multi-task workflows
  • Write concise, specific task descriptions
  • Provide startingUrl when the starting point is known
  • Set appropriate maxDuration based on task complexity
  • Batch related tasks into single sessions
  • Limit maxInputTokens and maxOutputTokens for simple tasks
  • Use policies to prevent accidental navigation
  • Use custom proxies instead of WebRun-managed for high-bandwidth tasks
  • Monitor usage.cost in responses to track spending

Example: Before & After

Before: Expensive
After: Optimized
Savings: ~70% cost reduction from session reuse, concise prompts, and explicit termination.

Pricing

Understand WebRun’s pricing model

Session Control

Manage session lifecycle

Multi-Task Workflows

Chain tasks efficiently

Structured Output

Request minimal, structured responses