nerovai
v0.1.0
Published
Real-time AI spend tracking for OpenAI, Anthropic, Google, Mistral, and more. One line to track every token, cost, and latency.
Maintainers
Readme
nerovai
Real-time AI spend tracking for developers. Track every OpenAI, Anthropic, Google, Mistral, DeepSeek, Groq, Kimi, Cohere, and Perplexity call — automatically.
Install
npm install nerovaiQuick start
const { track } = require('nerovai')
const OpenAI = require('openai')
const openai = new OpenAI()
// Wrap your existing call — response is returned untouched
const response = await track(
openai.chat.completions.create({
model: 'gpt-4o',
messages: [{ role: 'user', content: 'Hello' }]
})
)Set your API key (get it from nerovai.com/app):
NEROVAI_API_KEY=nuerova_xxxx node your-app.jsOptions
await track(operation, {
project_id: 'your-project-id', // organize by project
endpoint_name: '/chat', // tag by route
metadata: { userId: '123' }, // any extra data
cost: 0.005, // override auto-calculated cost
provider: 'openai', // override auto-detected provider
})Environment variables
| Variable | Description |
|----------|-------------|
| NEROVAI_API_KEY | Your API key from nerovai.com/app |
| NEROVAI_ENDPOINT | Custom endpoint (default: https://api.nerovai.com/api/logs) |
Supported providers
OpenAI · Anthropic · Google · Mistral · DeepSeek · Groq · Kimi · Cohere · Perplexity
Cost is calculated automatically from the response's token usage for all supported models.
