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-0.1.0.tar.gz
(10.0 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
File details
Details for the file nirixa-0.1.0.tar.gz.
File metadata
- Download URL: nirixa-0.1.0.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6fda4978e0e66a6c0a0b92f32246470dd58452f0e7de75c6b8f65d0e56da32c
|
|
| MD5 |
e0f22d5c8502e64807df99bb830bf443
|
|
| BLAKE2b-256 |
e63c934802b753402180e923871ae96f4cfd9f0846afc9be86f1c6451f119870
|
File details
Details for the file nirixa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: nirixa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 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 |
a0d69d550657a1a52c22944ce35a20db771839da105c8c33ff9ed530211c7d15
|
|
| MD5 |
9b34c2c043e4d2307c26bcdcabb5b905
|
|
| BLAKE2b-256 |
6abbe586c6edd8d84d0caba98cb3af7ae7f395e3349d7b9400dd1a3209e39caf
|