Lightweight Python client for TokenLab discovery, OpenAI-compatible APIs, and native endpoints.
Project description
TokenLab Python SDK
Lightweight Python client for TokenLab discovery, OpenAI-compatible APIs, and native endpoint families.
Install from PyPI:
pip install tokenlab-ai
Usage
from tokenlab import TokenLabClient
with TokenLabClient(api_key="YOUR_TOKENLAB_API_KEY") as tokenlab:
models = tokenlab.list_models(category="chat")
response = tokenlab.create_response({
"model": "gpt-5.5",
"input": "Hello from TokenLab",
})
Native Endpoints
tokenlab.create_anthropic_message({
"model": "claude-sonnet-5.5",
"max_tokens": 512,
"messages": [{"role": "user", "content": "Hello"}],
})
tokenlab.create_gemini_content("gemini-3.5-flash", {
"contents": [{"role": "user", "parts": [{"text": "Hello"}]}],
})
Discovery Helpers
tokenlab.get_models_json()
tokenlab.get_pricing_json()
tokenlab.get_integrations_json()
Base URLs
- API:
https://api.tokenlab.sh - OpenAI-compatible SDK base URL:
https://api.tokenlab.sh/v1 - OpenAPI:
https://docs.tokenlab.sh/openapi.json
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
tokenlab_ai-0.1.0.tar.gz
(3.1 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 tokenlab_ai-0.1.0.tar.gz.
File metadata
- Download URL: tokenlab_ai-0.1.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4f4fb5f6d61c4ee95194355aec56271ba95b7344f982580260499f5cc6b870f
|
|
| MD5 |
37a8f5a56835faa882afd50c8e30b741
|
|
| BLAKE2b-256 |
7be1a8e24befe6ecb4ad13c506936114e7b4718e8721499c564603a863348acd
|
File details
Details for the file tokenlab_ai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tokenlab_ai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
568531615f0185e15468a2c544450d14dd0a946bfe26bfd4e0c9733cc7d11e08
|
|
| MD5 |
3ae1a69b6706f44c92c1525ab8ff50df
|
|
| BLAKE2b-256 |
dc75179e038bd5867532daa37ab8a124c94e50aa6afafba61063536539e214db
|