OpenAI SDK
The OpenAI Python SDK works out of the box with ARouter.Installation
Basic Usage
Multi-Provider Routing
Switch providers by changing the model string:Streaming
Async
Embeddings
Anthropic SDK
The Anthropic Python SDK works natively.Installation
Basic Usage
Streaming
Gemini SDK
The Google Generative AI Python SDK works by configuring the API endpoint.Installation
Basic Usage
The
transport="rest" parameter is required. The Gemini SDK defaults to gRPC,
which is not supported by ARouter.