TopoloNexus
Central AI gateway providing unified AI access, usage tracking, and cost management across all Topolo applications.
Overview
TopoloNexus is Topolo’s AI command center. It acts as a unified gateway between all Topolo applications and AI providers, providing:
- Centralized AI Gateway - One API for all AI providers
- Usage Tracking - Real-time monitoring of tokens and costs
- Cost Control - Monthly budgets with enforcement
- BYOK Support - Bring your own API keys
- Model Preferences - Choose default models per use case
- Multi-Modal - Text, image, video, audio, and embeddings
Architecture
┌─────────────────────────────────────────────────────────────────┐│ Your Applications ││ TopoloBugFix TopoloSocialize TopoloShowcase Your 3rd Party │└───────────────────────────┬─────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────────────────────────────┐│ NEXUS GATEWAY ││ • Unified API • Usage Tracking • Cost Management ││ • Key Management • Model Routing • Budget Limits │└───────────────────────────┬─────────────────────────────────────┘ │ ▼┌─────────────────────────────────────────────────────────────────┐│ AI Providers ││ OpenAI Anthropic Google Replicate │└─────────────────────────────────────────────────────────────────┘Quick Start
1. Install the SDK
npm install @topolo/nexus-client2. Initialize
import { NexusClient } from '@topolo/nexus-client';
const nexus = new NexusClient({ gatewayUrl: 'https://nexus-gateway.topolo.io', authToken: 'your_jwt_token', appId: 'your-app-slug',});3. Make Requests
// Simple text completionconst result = await nexus.text('Explain quantum computing');console.log(result.text);
// Chat completionconst chat = await nexus.chat([ { role: 'system', content: 'You are a helpful assistant.' }, { role: 'user', content: 'Hello!' },]);Features
Multi-Provider Support
Nexus supports multiple AI providers:
| Provider | Capabilities | Models |
|---|---|---|
| Anthropic | Text | Claude Opus 4, Claude Sonnet 4, Claude Haiku |
| OpenAI | Text, Image, Audio, Embedding | GPT-4o, GPT-4o-mini, DALL-E, Whisper |
| Text | Gemini 2.0 Flash, Gemini 1.5 Pro | |
| Cloudflare | Text | Llama 3.3 70B (free) |
| Replicate | Image, Video | Flux, SDXL, Runway |
Usage Tracking
Every request is automatically logged with:
- Organization and user ID
- Application identifier
- Capability type (text, image, video, audio)
- Provider and model
- Token/unit count
- Cost (raw and billed)
- Latency
BYOK (Bring Your Own Key)
Users can add their own API keys:
- Navigate to Nexus Dashboard → API Keys
- Add key for OpenAI, Anthropic, or Google
- Keys are encrypted at rest
- No markup when using own keys
When no user key exists, Topolo’s platform keys are used with a 10% markup.
Budget Management
Set monthly spending limits:
Organization Budget: $500/month├── TopoloSocialize: $200/month├── TopoloShowcase: $200/month└── Other apps: $100/monthWhen budget is exceeded, requests return 402 Payment Required.
Dashboard
Access the Nexus dashboard at https://nexus.topolo.io to:
- View real-time usage statistics
- See cost breakdown by application
- Manage API keys
- Set budget limits
- Configure model preferences
API Reference
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/ai/completions | POST | Generate AI completion |
/api/ai/models | GET | List available models |
/api/usage/overview | GET | Get usage statistics |
/api/usage/daily | GET | Get daily usage data |
/api/keys | GET/POST | Manage API keys |
/api/preferences | GET/PUT | Model preferences |
/api/apps | GET | List registered apps |
See the full API reference for details.
Pricing
Platform Keys (Default)
10% markup on provider costs:
| Provider | Model | Input | Output |
|---|---|---|---|
| Anthropic | Claude Sonnet 4 | $3.30/M | $16.50/M |
| OpenAI | GPT-4o | $2.75/M | $11.00/M |
| OpenAI | GPT-4o-mini | $0.17/M | $0.66/M |
| Gemini Flash | $0.08/M | $0.33/M |
Own Keys (BYOK)
Pay providers directly at their standard rates - no Topolo markup.
Migration
If your application currently makes direct AI API calls, see the Migration Guide to switch to Nexus.
Benefits of Migration
- Centralized usage tracking
- No more API key management per app
- Budget controls
- Cross-app analytics
- User-configurable model preferences