Skip to main content

Import

Constructor

Parameters

api_key
str
Your KiteFishAI API key. Falls back to the KITEFISH_API_KEY environment variable. Raises AuthenticationError if neither is set.
base_url
str
API base URL. Defaults to https://api.kitefishai.com/v1. Falls back to KITEFISH_BASE_URL env var. Override for on-prem deployments.
timeout
float
Request timeout in seconds. Default 60.0.
max_retries
int
Number of retries on network errors and timeouts. Default 2. Set to 0 to disable.
http_client
httpx.Client
Bring your own httpx.Client for custom TLS, proxies, or connection pooling.

Resources

Context manager

The client can be used as a context manager — the underlying HTTP connection is closed automatically:

Manual close