Skip to Content
Quick Start

Quick Start

Get NeuraMeter running in under 30 seconds.

Prerequisites

  • A NeuraMeter account at meter.neuria.tech 
  • Your NeuraMeter API key (nm_xxx)
  • Your project ID (proj_xxx)

The fastest way — wrap your existing OpenAI client.

1. Install

npm install @neurameter/core

2. Wrap your client

import OpenAI from 'openai'; import { withNeuraMeter } from '@neurameter/core'; const openai = withNeuraMeter(new OpenAI(), { apiKey: 'nm_xxx', // your NeuraMeter API key projectId: 'proj_xxx', // your project ID agentName: 'MyAgent', // optional, default: 'default' });

3. Use it normally

// Non-streaming const response = await openai.chat.completions.create({ model: 'gpt-4o', messages: [{ role: 'user', content: 'Hello' }], }); // Streaming — works too, usage captured on stream completion const stream = await openai.chat.completions.create({ model: 'gpt-4o', messages: [{ role: 'user', content: 'Hello' }], stream: true, }); for await (const chunk of stream) { // each chunk passed through unchanged }

That’s it. Every call is automatically tracked in your NeuraMeter dashboard.

Option B: Proxy (Zero Code Changes)

If you can’t modify your application code, use the proxy.

1. Install

npm install -g @neurameter/proxy

2. Start the proxy

neurameter-proxy \ --api-key nm_xxx \ --project proj_xxx \ --port 3100

3. Point your app at the proxy

OPENAI_BASE_URL=http://localhost:3100/v1 node app.js

No code changes required. The proxy intercepts all OpenAI API calls and tracks them.

Verify

After making an API call, check your dashboard  — you should see the event within a few seconds.

You can also send a test event manually:

curl -X POST https://meter.neuria.tech/api/v1/events \ -H "Authorization: Bearer nm_xxx" \ -H "Content-Type: application/json" \ -d '{"batch":[{"model":"gpt-4o","inputTokens":100,"outputTokens":50}]}'

Next Steps