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

Terminal window
npm install @topolo/nexus-client

2. 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 completion
const result = await nexus.text('Explain quantum computing');
console.log(result.text);
// Chat completion
const 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:

ProviderCapabilitiesModels
AnthropicTextClaude Opus 4, Claude Sonnet 4, Claude Haiku
OpenAIText, Image, Audio, EmbeddingGPT-4o, GPT-4o-mini, DALL-E, Whisper
GoogleTextGemini 2.0 Flash, Gemini 1.5 Pro
CloudflareTextLlama 3.3 70B (free)
ReplicateImage, VideoFlux, 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:

  1. Navigate to Nexus Dashboard → API Keys
  2. Add key for OpenAI, Anthropic, or Google
  3. Keys are encrypted at rest
  4. 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/month

When 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

EndpointMethodDescription
/api/ai/completionsPOSTGenerate AI completion
/api/ai/modelsGETList available models
/api/usage/overviewGETGet usage statistics
/api/usage/dailyGETGet daily usage data
/api/keysGET/POSTManage API keys
/api/preferencesGET/PUTModel preferences
/api/appsGETList registered apps

See the full API reference for details.

Pricing

Platform Keys (Default)

10% markup on provider costs:

ProviderModelInputOutput
AnthropicClaude Sonnet 4$3.30/M$16.50/M
OpenAIGPT-4o$2.75/M$11.00/M
OpenAIGPT-4o-mini$0.17/M$0.66/M
GoogleGemini 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