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",
"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.1.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.1.tar.gz.
File metadata
- Download URL: tokenlab_ai-0.1.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
886a2389d60ef17c2d860c4731156151052ad2e5026b9ebef5356d8fa9212108
|
|
| MD5 |
b400107b1e37c6ea44c4c31cac0b89ce
|
|
| BLAKE2b-256 |
3bfe5d81e51ee4c006c6c5ed5ce9b69e56b05881f1a2dd1211b6a94b45554845
|
File details
Details for the file tokenlab_ai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tokenlab_ai-0.1.1-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.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
badacfa3d2c9f867fa6da77f6ae1387147f67e0bb589f9d9252dd66c1dadf0e7
|
|
| MD5 |
47473e17c3c90822685a9708010f726f
|
|
| BLAKE2b-256 |
c07546f86cfc5504b93160393074b4eeda96b2893d46c8f8bb540f6b8f23dc2b
|