Daydreams Router
AI model routing with authentication and payments
Router
The Daydreams Router acts as an intelligent gateway between your application and AI models, providing unified access to multiple AI providers through a single API.
🌐 Live Service: router.daydreams.systems
Key Features
- Unified Interface: Single API for OpenAI, Anthropic, Google, and more
- Model Routing: Automatic selection and fallback between providers
- Dual Authentication: API keys or x402 USDC micropayments
- OpenAI Compatibility: Works with existing OpenAI SDK clients
- Cost Tracking: Monitor usage across all providers
How It Works
The router standardizes interactions across AI providers:
- Request Reception: Accepts OpenAI-format requests
- Provider Translation: Converts to provider-specific formats
- Response Normalization: Returns standardized OpenAI-format responses
- Error Handling: Automatic retries and provider fallbacks
Architecture
Your App → Dreams Router → Provider (OpenAI/Anthropic/Google/etc)
↓
Auth Layer (API Key or x402)
↓
Response Standardization
Getting Started
- Quickstart Guide - Make your first API call in 5 minutes
- Dreams SDK Integration - Use with Vercel AI SDK and Daydreams
- API Reference - Complete endpoint documentation
Example Applications
Nanoservice (Paid AI Assistant)
The nanoservice example demonstrates a complete AI service with x402 payments:
// Payment-enabled AI assistant
const { dreamsRouter } = await createDreamsRouterAuth(account, {
payments: {
amount: "100000", // $0.10 USDC per request
network: "base-sepolia",
},
});
const agent = createDreams({
model: dreamsRouter("google-vertex/gemini-2.5-flash"),
contexts: [assistantContext],
});
Next Steps
- Start with the Quickstart Guide
- Explore Dreams SDK integration for TypeScript projects
- Learn about x402 payments for micropayment integration
- View complete examples