SDK Reference
Gemini Provider
Wrapper around google-genai's Client. Provides a model-centric interface matching how GenerativeModel was used in the old SDK.
Usage
# Before
from google import genai
client = genai.Client(api_key="...")
response = client.models.generate_content(
model="gemini-2.0-flash", contents="Hello"
)
# After
from kostrack import GenerativeModel
model = GenerativeModel(
"gemini-2.0-flash",
tags={"project": "openmanagr", "feature": "document-ocr"},
)
response = model.generate_content("Extract text from this document...")
SDK version
Kostrack uses the new google-genai package (not the deprecated google-generativeai). Install with pip install google-genai.
API key
Pass api_key= to the constructor, or set GEMINI_API_KEY (or GOOGLE_API_KEY) as an environment variable.
Supported models
| Model | Input / 1M | Output / 1M |
|---|---|---|
| gemini-2.0-flash | $0.10 | $0.40 |
| gemini-2.0-flash-lite | $0.075 | $0.30 |
| gemini-1.5-pro | $1.25 | $5.00 |
| gemini-1.5-flash | $0.075 | $0.30 |