Skip to main content

openaiisrich

openai is rich -- pricing information of openai models as JSON, incl. prompt and completion costs (n_context_tokens_total, n_generated_tokens_total).

pull requests welcome to keep the information up-to-date.

automatically updated on PyPi at each commit.

Usage

Usage in Python

Install with pip install openaiisrich

Then

import openaiisrich

print("cost ", openaiisrich.cost("gpt-4", 507, 2987))

Usage in Javascript

TODO

License

MIT

Metadata

Release files for openaiisrich 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for openaiisrich 0.6.0
File Interpreter ABI Platform Actions
openaiisrich-0.6.0-py3-none-any.whl Python 3 none any Details for openaiisrich-0.6.0-py3-none-any.whl

Release files / openaiisrich-0.6.0-py3-none-any.whl

Download URL openaiisrich-0.6.0-py3-none-any.whl
Size 2.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f5be86f8af39d52838d6c67c169f099993a0c6040eef47f2b8b58f57ec8b39b0
BLAKE2b-256 checksum
How to use checksums
a2bece8e40f5c8e6ce2bf385463146f1aa639da6a865ecb67990df11b3b8267c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.0.0 CPython/3.12.4

Security for openaiisrich 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page