Echo

Introduction

Echo

Echo is billing infrastructure for AI applications that turns your OpenAI imports into revenue-generating user accounts across React, Next.js, Node.js, and CLI tools.

Why use Echo?

Building AI apps means handling payments, user auth, usage tracking, and API key management. Each user needs their own balance, every LLM call needs metering, and you're stuck building Stripe flows instead of features.

Echo standardizes AI billing like Clerk standardized auth. Drop in our SDK, set your markup percentage, and your existing OpenAI code instantly gets user accounts with usage-based billing. No payment processing, no surprise bills, no exposed API keys.

Result: Your users get one universal balance that works across all Echo-powered apps, creating network effects that grow your user base while you focus on building.

For example, here's how you can add complete user management and LLM billing to your app:

import { EchoProvider, EchoTokens, useEchoModelProviders } from '@merit-systems/echo-react-sdk';
import { generateText } from 'ai';

function App() {
  return (
    <EchoProvider config={{ appId: 'your-app-id' }}>
      {/* Complete user management - handles auth, billing, sign-out */}
      <EchoTokens showAvatar={true} />
      
      <ChatComponent />
    </EchoProvider>
  );
}

function ChatComponent() {
  const { openai } = useEchoModelProviders();
  
  const handleGenerate = async () => {
    const { text } = await generateText({
      model: openai('gpt-5'),
      prompt: 'Hello world'
    });
    return text;
  };
  
  return <button onClick={handleGenerate}>Ask AI</button>;
}

export default App

Three integration patterns:

  • React SDK — OAuth2 + PKCE for secure client-side LLM calls
  • Next.js SDK — Server-side auth with automatic token management
  • TypeScript SDK — API keys for backends and CLI tools

The React and Next.js SDKs are opinionated wrappers around the TypeScript SDK, providing framework-specific patterns while the TypeScript SDK offers direct API access for maximum flexibility.

On this page