Skip to main content

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


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.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prism_llm_labs-0.1.1-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file prism_llm_labs-0.1.1.tar.gz.

File metadata

  • Download URL: prism_llm_labs-0.1.1.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

Hashes for prism_llm_labs-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c0e6fc576ed13193630c6864944ec3f30b3fd2a8db726f7c84199d4d2172bc87
MD5 ba483aa4b871dffdceec1c3a6cd1745b
BLAKE2b-256 ebd8a1ef34088478e5bf8db2aa3ff047c1c9634a01aec2c07b7684c369284725

See more details on using hashes here.

File details

Details for the file prism_llm_labs-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: prism_llm_labs-0.1.1-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

Hashes for prism_llm_labs-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec452186153f58d9c147f24aaefc272fa719f7feeafac47f682b9d35cec6925e
MD5 e854d64425aa997d0a1e79d4267b3eda
BLAKE2b-256 ffbb113976047b7cd9ad4b55a4187f7521cfbe705fc051b53d18b7fe6ab1e820

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page