Skip to main content

TokenWise Python SDK

Spend less, agent more. Token optimization SDK for Agentic AI.

pip install tokenwise
from tokenwise import TokenWise

tw = TokenWise(api_key="sk-...")
response = tw.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(tw.print_savings())

See GitHub for full documentation.

Release files for tokenwise-ai 0.1.0

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

Source distribution (sdist)

Source distribution for tokenwise-ai 0.1.0
File Size Uploaded
tokenwise_ai-0.1.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tokenwise-ai 0.1.0
File Interpreter ABI Platform
tokenwise_ai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / tokenwise_ai-0.1.0.tar.gz

Download URL tokenwise_ai-0.1.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
47493e1c6faf5ade22492e3c6c4d30a41e0651f9b4f856949485b72a2dd87d81
BLAKE2b-256 checksum
How to use checksums
79bdafa4d1374d18eddac2459df77734a72736057ef8f4a8f14b4bf095d9abb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release files / tokenwise_ai-0.1.0-py3-none-any.whl

Download URL tokenwise_ai-0.1.0-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
55169775470a2c7881645d51cb6c7f8f014b9c999bba48fccde710edf4f784a1
BLAKE2b-256 checksum
How to use checksums
344e0092833a7950f8241584b5572a84ad2b1c0f4ca21c4da50d53b8e57c7be9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.8

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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