LLM cost and usage observability SDK
Project description
prism-llm
LLM cost and usage observability SDK. Drop-in replacement for the OpenAI client.
Install
pip install prism-llm
Usage
from prism import OpenAI
client = OpenAI(
api_key="sk-...", # your OpenAI key
prism_key="prism_live_...", # your Prism API key
project="my-project",
environment="production",
)
# Use exactly like openai.OpenAI
response = client.chat.completions.create(
model="gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
)
Configuration
| Env var | Description |
|---|---|
PRISM_API_KEY |
Your Prism API key (Tinybird ingest token) |
PRISM_PROJECT |
Project name for attribution |
PRISM_TEAM |
Team identifier |
PRISM_ENVIRONMENT |
production / staging / development |
PRISM_TINYBIRD_INGEST_URL |
Override Tinybird ingest URL (for non-EU regions) |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
prism_llm_labs-0.1.0.tar.gz
(6.3 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 prism_llm_labs-0.1.0.tar.gz.
File metadata
- Download URL: prism_llm_labs-0.1.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2511ef6aabc87557fa51848241c4358c24c20263fda24ce8046689a77a1b0fbd
|
|
| MD5 |
4ba988e27734c5a3cb40679de108cad4
|
|
| BLAKE2b-256 |
d98616ceff2bb993ccd6f279df56f61e5330cf186f4e644da0bcfbade75ee525
|
File details
Details for the file prism_llm_labs-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prism_llm_labs-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0f5977141682192294f77873d2abf2c1f2326006479c8542d25f7174e3734bd
|
|
| MD5 |
9cfbee9bb51e76e6102e96c67e0a1345
|
|
| BLAKE2b-256 |
8310c1624722b66f816e3b2eec9c05593bd6302670e8acb0ab28d550fc90b7d0
|