Routing Strategies
Learn how AnySolver routes tasks to the optimal provider based on cost, speed, or reliability.
Overview
AnySolver can automatically select the best provider for each task based on your preferred optimization strategy. Configure your default routing mode in the dashboard under API Keys, or override it per-request.
One Balance, Many Providers
Your AnySolver balance works across all providers. You don't need separate accounts or balances for each provider.
Available Strategies
Strategy Details
Auto Cheapest
Selects the provider with the lowest price for the requested task type.
- Data Source: Static pricing metadata (no database queries)
- Speed: Instant routing decision
- Best For: High-volume, cost-sensitive workloads
Pricing is determined from each provider's published rates. When prices are equal, a deterministic order is used.
Auto Fastest
Selects the provider with the lowest average solve time based on recent performance data.
- Data Source:
provider_statstable (aggregated hourly) - Time Windows: Checks 12h → 48h → 30d windows
- Minimum Sample: Requires 10+ completed tasks in the window
- Fallback: If no stats available, falls back to Cheapest mode.
Auto Most Reliable
Selects the provider with the highest success rate based on recent performance data.
- Data Source:
provider_statstable (aggregated hourly) - Time Windows: Checks 48h → 30d windows
- Minimum Sample: Requires 10+ completed tasks in the window
- Fallback: If no stats available, falls back to Cheapest mode.
Priority Mode
Uses your custom provider order. You define which providers to use and in what order.
- Data Source: Your API key configuration
- Configuration: Set via dashboard under API Keys → Edit → Provider Priority
- No Fallback: If none of your configured providers support the task, the request fails with
TASK_NOT_SUPPORTED
Priority Mode Limitation
Priority mode does not automatically fall back to other providers. If your preferred providers don't support a task type, the request will fail.
Key Pool Mode
Controls which provider keys are eligible for your tasks:
| Mode | Description |
|---|---|
all (default) | All available keys, including community-contributed keys from the Provider Exchange. |
platformOnly | Platform-managed keys only. Useful for privacy-sensitive workloads. |
Keep it on 'all' unless you have a reason not to
all gives you a larger key pool with fewer rate limits and faster solves. Switch to platformOnly only if you
need tasks routed exclusively through platform keys (e.g. for privacy).
Set per API key in the dashboard, or override per-request with keyPoolMode in createTask. See Provider Exchange for more on how community keys are used.
How to Configure
- Go to Dashboard → API Keys
- Click Edit on your API key
- Select your preferred Routing Mode
- For Priority mode, drag and drop providers to set your order
- Click Save Changes
All new tasks using that API key will use the configured routing mode.
Statistics Collection
Auto Fastest and Auto Most Reliable modes rely on performance statistics:
- Aggregation Job: Runs hourly via
stats-aggregator - Metrics Tracked: Solve time (ms), success/failure counts
- Time Windows:
- 12 hours: Reacts to immediate performance changes
- 48 hours: Stable recent trends
- 30 days: Long-term reliability baseline
Routing Limitations
All routing strategies currently operate at the task type level only. Provider selection is based on:
- Task type (e.g.,
ReCaptchaV2Token,PopularCaptchaToken) - Aggregated performance statistics (solve time, success rate)
- Static pricing metadata (published rates per task type)
Task Parameters Not Considered
Routing decisions do not consider task-specific parameters such as:
- Website domain or URL
- Site key characteristics
- Provider-specific flags or restrictions (e.g., "most unflagged provider")
- Task complexity indicators
- Historical success rates for specific websites
All tasks of the same type are routed identically, regardless of their individual parameters.
This limitation exists because:
- Dynamic data collection: We don't currently have mechanisms to collect and analyze task-specific performance data dynamically
- Insufficient static data: We lack enough testers and historical data to create reliable static mappings for task-specific routing
For use cases requiring provider selection based on task parameters, use Priority mode to manually configure your preferred providers.
You can override the default routing mode for individual requests by including the selectionMode parameter:
{ "clientKey": "your-api-key-from-dashboard", "task": { "websiteURL": "https://www.google.com/recaptcha/api2/demo", "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", "pageTitle": "reCAPTCHA demo", "isInvisible": false, "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36", "cookies": "NID=511=example; 1P_JAR=2026-03-01-12;", "pageAction": "verify", "apiDomain": "www.recaptcha.net", "isSession": false, "recaptchaDataSValue": "data-s_example_value", "type": "ReCaptchaV2TokenProxyLess" }, "provider": "CapSolver", "selectionMode": "autoCheapest", "keyPoolMode": "all"}Valid values: autoCheapest, autoFastest, autoMostReliable, priority