> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uniblock.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-routing

> Intelligent request routing across multiple blockchain providers for maximum reliability and cost efficiency.

# What is auto-routing?

Auto-routing automatically directs your API calls to the best available blockchain data provider based on reliability, cost, and performance. Instead of managing multiple provider keys and handling failovers manually, Uniblock routes requests intelligently and switches providers seamlessly when issues occur.

**Use auto-routing when you need:**

* Guaranteed uptime with automatic failover
* Cost-optimized provider selection
* Multi-provider redundancy without manual configuration
* Verified data accuracy across providers

<Info>
  Auto-routing is enabled by default for all Uniblock API keys. No setup required.
</Info>

***

## Quick example

See auto-routing in action with a simple API call:

```bash Standard API call with auto-routing theme={null}
curl --location \
'https://api.uniblock.dev/uni/v1/token/balances?chainId=1&address=0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb' \
--header 'x-api-key: YOUR_API_KEY'
```

**Behind the scenes, Uniblock:**

1. Routes to the optimal provider (e.g., Alchemy)
2. If Alchemy fails, retries 3 times
3. If still failing, switches to backup (e.g., Infura)
4. Returns the response seamlessly

**You don't need to change anything in your code.** Auto-routing handles all provider management automatically.

***

## How it works

When you make an API call with your Uniblock key:

1. **Route selection** - Uniblock evaluates available providers for cost and reliability
2. **Primary request** - Your call is routed to the optimal provider
3. **Auto-retry** - If the call fails, it's automatically retried with the same provider
4. **Failover** - After max retries, the request routes to the next best provider
5. **Data verification** - (Pro+ plans) Response data is verified across multiple providers

<Frame caption="Auto-routing flow with automatic failover">
  <img src="https://mintcdn.com/uniblock/AAmZ2PQpKS7NEhKq/images/docs/2b3f324-image_4_1.png?fit=max&auto=format&n=AAmZ2PQpKS7NEhKq&q=85&s=067c6cba05a655ded8929a40e01c4ac5" width="5760" height="4096" data-path="images/docs/2b3f324-image_4_1.png" />
</Frame>

***

## Core features

### Default routing

Access all Uniblock-integrated providers with a single API key. No provider selection or configuration required.

**Available on:** All plans (including free)

**Key benefits:**

* Instant access to 30+ blockchain data providers
* Pre-configured backup provider list
* Works immediately with free tier

[Learn more about default routing →](/guides/uniblock/autorouting/uniblock-default-routing)

### Backup providers

Automatic failover to backup providers when the primary provider is unavailable or rate-limited.

**Available on:** All plans (including free)

**Key benefits:**

* Zero downtime during provider outages
* Seamless failover without code changes
* Configurable priority list for custom routing

**Example scenario:**
Your app makes 1,000 requests/minute. Your primary provider (Alchemy) hits rate limits at request #500. Auto-routing automatically switches to your backup provider (Infura) for requests #501-1000 without dropping a single call.

[Learn more about backup providers →](/guides/uniblock/autorouting/uniblock-backup)

### Data consensus

<Note>Available on Pro plans and above</Note>

Verifies response data across multiple providers to ensure accuracy.

**Key benefits:**

* Eliminates incorrect data from single-provider errors
* Detects and filters outlier responses
* Ensures data consistency for critical operations

**Example scenario:**
Your app requests the current ETH price. Data consensus queries 3 providers:

* Provider A: \$2,500.00
* Provider B: \$2,501.50
* Provider C: \$25,000.00 (outlier)

The system detects Provider C's outlier and returns the consensus value of \~\$2,500, preventing a critical pricing error.

<Frame caption="Data consensus verification across providers">
  <img src="https://mintcdn.com/uniblock/ce6MWTwGsgFUjX8w/images/docs/a803dd3-data_consensus_image.png?fit=max&auto=format&n=ce6MWTwGsgFUjX8w&q=85&s=56a391feda6643ac23cafd70a26548e8" width="5760" height="4096" data-path="images/docs/a803dd3-data_consensus_image.png" />
</Frame>

[Learn more about data consensus →](/guides/uniblock/autorouting/uniblock-data-consensus)

***

## Common use cases

<CardGroup cols={2}>
  <Card title="Production reliability" icon="shield-check">
    Ensure 99.99% uptime with automatic failover across multiple providers.
  </Card>

  <Card title="Cost optimization" icon="dollar-sign">
    Automatically route to the cheapest provider without sacrificing reliability.
  </Card>

  <Card title="Rate limit management" icon="gauge">
    Seamlessly switch providers when rate limits are hit.
  </Card>

  <Card title="Data accuracy" icon="check-double">
    Verify critical data across multiple sources with data consensus.
  </Card>
</CardGroup>

***

## Next steps

<CardGroup cols={2}>
  <Card title="Default routing" icon="route" href="/guides/uniblock/autorouting/uniblock-default-routing">
    Learn how default routing works and try it without an API key.
  </Card>

  <Card title="Backup providers" icon="life-ring" href="/guides/uniblock/autorouting/uniblock-backup">
    Configure custom failover lists for maximum reliability.
  </Card>

  <Card title="Routing optimization" icon="gauge-high" href="/guides/uniblock/autorouting/uniblock-routing-optimization">
    Optimize for cost and performance automatically.
  </Card>

  <Card title="Data consensus" icon="check-double" href="/guides/uniblock/autorouting/uniblock-data-consensus">
    Verify data accuracy across multiple providers.
  </Card>
</CardGroup>

***

## Common pitfalls

<Warning>
  **Free tier limitations** - Default routing on the free tier has rate limits suitable for testing only. Upgrade to Growth or higher for production use.
</Warning>

<Warning>
  **Data consensus latency** - Data consensus adds \~100-200ms latency as it queries multiple providers. Only enable for critical data where accuracy is paramount.
</Warning>

<Warning>
  **Retry latency** - Auto-retry adds latency to failed requests (1-7 seconds depending on configuration). Factor this into timeout settings.
</Warning>

***

<Card title="Ready to get started with Uniblock?" icon="rocket" href="https://dashboard.uniblock.dev">
  Create your free account and start building with unified blockchain infrastructure across 100+ chains.
</Card>

<CardGroup cols={2}>
  <Card title="View API reference" icon="book" href="/reference/unified-api-reference-overview">
    Explore all available endpoints and interactive playgrounds
  </Card>

  <Card title="Join our community" icon="discord" href="https://discord.gg/uniblock">
    Get help from our team and connect with other developers
  </Card>
</CardGroup>
