base_url to https://router.flatkey.ai/v1 and use your Flatkey API key. Every other SDK feature — streaming, function calling, async clients, retry logic — works exactly as before.
Installation
Basic setup
Chat completions
Streaming
Function calling / tool use
python
Using non-OpenAI models
You can call any Flatkey-supported model using the same client — just change themodel parameter:
python
Async client
python