Requirements
Python 3.10 or higher is required.Install with pip
Install the SDK using pip:Install with uv
For faster installation, you can use uv:Optional Dependencies
The SDK includes optional dependencies for enhanced functionality:aiohttp (Faster Async Performance)
By default, the SDK uses httpx for both sync and async operations. For improved async performance, install with aiohttp support:trust_env=True to match httpx’s default behavior. You can pass additional aiohttp.ClientSession.request() arguments through HttpOptions:
local-tokenizer (Local Token Counting)
For local token counting and computation without API calls, install with tokenizer support:LocalTokenizer class:
Verify Installation
Verify your installation by checking the SDK version:Core Dependencies
The SDK automatically installs these core dependencies:anyio>=4.8.0, <5.0.0- Async I/O supportgoogle-auth[requests]>=2.47.0, <3.0.0- Google authenticationhttpx>=0.28.1, <1.0.0- HTTP clientpydantic>=2.9.0, <3.0.0- Data validation and typingrequests>=2.28.1, <3.0.0- HTTP librarytenacity>=8.2.3, <9.2.0- Retry logicwebsockets>=13.0.0, <17.0- WebSocket supporttyping-extensions>=4.11.0, <5.0.0- Type hints backport
Next Steps
Quickstart
Get started with your first API call
Authentication
Configure API keys and credentials