Setup Python SDK
How to setup the Python SDK
Install Konko AI's Python SDK
1. Enable a Python3.8+ environment
2. Install the SDK
pip install konko
3. Set API Keys
Option 1: Set Environment Variables
-
You can set environment variables for
KONKO_API_KEY
(Required)-
OPENAI_API_KEY
(Optional if you enable OpenAI for your account on the API Keys page ➡️)
- In your current shell session, use the export command:
export KONKO_API_KEY=KONKO_API_KEY
export OPENAI_API_KEY=OPENAI_API_KEY # Optional if you enabled OpenAI on API Keys page
Option 2: Set API Keys Programmatically
konko.api_key = 'KONKO_API_KEY'
konko.openai_api_key = 'OPENAI_API_KEY' # Optional if you enabled OpenAI on API Keys page
4. Verify Installation & Authentication
# Confirm konko has installed successfully
import konko
# Confirm you receive a valid response indicating Konko API key is successfully set
konko.models.list()
Updated 8 months ago
What’s Next