AI Connections (9Router)
AI Connections (9Router)
The AI Connections page lets you manage integrations with AI services and large language models (LLMs). This is where you configure how your AI agents connect to AI providers.
What are AI Connections?
AI Connections are links between your OpenCloud applications and external AI services (like OpenAI's GPT, Anthropic's Claude, or other AI models). Instead of configuring each AI connection separately in every application, you can manage them centrally from this page.
OpenCloud uses 9Router — a lightweight proxy and management tool — as the engine behind AI Connections. It acts as a central hub that sits between your applications and AI providers, giving you a single place to manage all your AI connections.
Your Apps → 9Router → OpenAI, Anthropic, Google, etc.
Key features
| Feature | Description |
|---|---|
| Central API management | Configure all AI provider keys in one place |
| Provider routing | Route requests to different AI providers based on rules |
| Load balancing | Spread requests across multiple API keys or providers |
| Observability | Track all AI API calls — see which apps use what, how much, and when |
| Model aliases | Create shortcut names for AI models (e.g., "smart" → "gpt-4o") |
| API key management | Create API keys for your apps to use when connecting through AI Connections |
| Proxy pools | Manage multiple proxies for API connections |
| Login protection | Password-protected admin interface |
When should you use AI Connections?
Use AI Connections if you:
- Have multiple applications that use AI models
- Want to manage all AI API keys in one place
- Need to track AI usage across your applications
- Want to route between providers (e.g., use Anthropic for some tasks, OpenAI for others)
Requirements on OpenCloud
| Requirement | Details |
|---|---|
| Type | Addon (system service) |
| Database | None required |
| Plan | Fixed addon plan (1 CPU, 1 GB RAM, ~$0.50/month) |
| Default port | 20128 |
Installation
Step-by-step deployment
- Deploy 9Router
9Router is deployed as an addon (a lightweight system service):- Go to Applications > Create Application (or look for the Addons section)
- Select 9Router
- The plan is fixed: 1 CPU, 1 GB RAM, 5 GB storage (~$0.50/month)
- Select your project
- Click Deploy
- Get your login password
- Go to your 9Router application > Environment Variables
- Find
INITIAL_PASSWORD— this is your admin login password
- Access 9Router
Open the 9Router link and log in with your password.
Setting up AI providers
After logging in, add your AI provider connections:
- Go to Provider Connections in the 9Router dashboard
- Click Add Provider
- Enter your AI provider details:
- Provider name (e.g., "OpenAI", "Anthropic")
- API Key — Your provider's API key
- Base URL — The API endpoint (e.g.,
https://api.openai.com/v1)
- Click Save
- Repeat for each AI provider you want to use
Creating API keys for your apps
To let your other applications connect through 9Router:
- Go to API Keys in the 9Router dashboard
- Click Create API Key
- Give it a name (e.g., "n8n-key", "openclaw-key")
- Copy the generated key
- In your application's environment variables, set the AI API key to this 9Router key, and the API base URL to your 9Router's address
Setting up model aliases
Model aliases let you create friendly names for AI models:
- Go to Model Aliases in the dashboard
- Add an alias:
- Alias name:
smart(or any name you like) - Target model:
gpt-4o(the actual model name)
- Alias name:
- Now your apps can request model
smartand 9Router routes it togpt-4o
Configuration
| Setting | Default | Description |
|---|---|---|
INITIAL_PASSWORD | Auto-generated | Admin login password |
ROUTER_PORT | 20128 | API/UI port |
| Observability | Enabled | Tracks up to 1,000 API call records |
| Login required | Yes | Password protection is on by default |
Observability
9Router tracks all API calls passing through it. In the dashboard, you can see:
- Total number of API calls
- Calls per provider
- Calls per application
- Response times
- Error rates
This data helps you understand your AI usage patterns and costs.
Troubleshooting
| Problem | Solution |
|---|---|
| Can't log in | Check INITIAL_PASSWORD in environment variables |
| Apps can't connect | Verify the 9Router URL and API key in your app's config |
| Provider errors | Check that your AI provider API key is valid and has credit |