Skip to main content

AI cost observability SDK - see the full spectrum of your AI spend

Project description

Spectracost Python SDK

See the full spectrum of your AI spend.

from openai import OpenAI
from spectracost import instrument

client = instrument(
    OpenAI(),
    api_key="sprc_...",
    team="search",
    service="query-rewriting",
)

# Use exactly like a normal OpenAI client - now with cost tracking
response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)

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

spectracost-0.2.1.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

spectracost-0.2.1-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file spectracost-0.2.1.tar.gz.

File metadata

  • Download URL: spectracost-0.2.1.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spectracost-0.2.1.tar.gz
Algorithm Hash digest
SHA256 f8006dddab1c5fc9dfed982ef371b8f575b30ec81ee73d4da8359c923a6dccac
MD5 92416d5050572f52098e1dcf86987a28
BLAKE2b-256 397d34d3421bca6c58781c41b75bd1bbc9b99beea7836dd24fa09dd6f3df11fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracost-0.2.1.tar.gz:

Publisher: python-sdk.yml on intUnderflow/spectracost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file spectracost-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: spectracost-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for spectracost-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a6be3b6d415972ef5468b0af595ba272ffb95f3417b37bc8979ae46f5acb6a8a
MD5 dd384b165f71fa0f54e6373c58dfea04
BLAKE2b-256 b46ee1e9f363ee9dc57f63308a8df3d51d618ad9b532949ffead7727a01ed4cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for spectracost-0.2.1-py3-none-any.whl:

Publisher: python-sdk.yml on intUnderflow/spectracost

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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