AI Observability & Cost Intelligence — track token costs, latency, and hallucination risk
Project description
nirixa
AI Observability & Cost Intelligence — track token costs, latency, and hallucination risk for every LLM call.
pip install nirixa
Quick Start
from nirixa import NirixaClient
import openai
client = NirixaClient(api_key="nirixa-your-key")
# Wrap any LLM call — zero changes to your existing code
response = client.track(
feature="/api/chat",
fn=lambda: openai.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello!"}]
)
)
# response is the original OpenAI response — unchanged
print(response.choices[0].message.content)
Module-level API
import nirixa
import openai
nirixa.init(api_key="nirixa-your-key")
response = nirixa.track(
feature="/api/summarize",
fn=lambda: openai.chat.completions.create(...)
)
Auto-patch (track everything automatically)
from nirixa import NirixaClient
from nirixa.middleware import patch_openai
client = NirixaClient(api_key="nirixa-your-key")
patch_openai(client, feature="/api/chat")
# All openai calls now tracked automatically — no changes needed
import openai
openai.chat.completions.create(...)
Anthropic Support
from nirixa import NirixaClient
import anthropic
client = NirixaClient(api_key="nirixa-your-key")
claude = anthropic.Anthropic()
response = client.track(
feature="/api/analyze",
model="claude-3-5-sonnet-20241022",
fn=lambda: claude.messages.create(
model="claude-3-5-sonnet-20241022",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello!"}]
)
)
What gets tracked
| Metric | Description |
|---|---|
| Token cost | Per-call USD cost by feature and model |
| Latency | p50/p95/p99 response times |
| Hallucination risk | LOW / MEDIUM / HIGH scoring |
| Prompt drift | Output variance over time |
| Error rate | Failed calls by endpoint |
Dashboard
View all your data at nirixa.in
निरीक्षा — Observe everything.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nirixa-1.0.5.tar.gz
(11.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
nirixa-1.0.5-py3-none-any.whl
(11.0 kB
view details)
File details
Details for the file nirixa-1.0.5.tar.gz.
File metadata
- Download URL: nirixa-1.0.5.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d70a601ac04b7c66e2c9b5843c5e55656c4ea6a9ddb9e0fbd429af8b55d9d93
|
|
| MD5 |
e3fc5911f47793f9c2275f797b576645
|
|
| BLAKE2b-256 |
aee041a5122f846af911c5fa8121bbe81468268fa9378598b49a2700ed8ade40
|
File details
Details for the file nirixa-1.0.5-py3-none-any.whl.
File metadata
- Download URL: nirixa-1.0.5-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ef24cd41d296c8e2d4256213f7fae57e72073e80cea0ace3efef2ef5a5558b8
|
|
| MD5 |
7b5313282e2431bec77791f573a77bee
|
|
| BLAKE2b-256 |
a9bbd6bbe686e7ec6054249225a477af14fb3c775542e07ce90165bb42d22900
|