Configuration
All configuration is passed to the client constructor. There are no global singletons or environment variable lookups — every setting is explicit.
new BimpeAI({
apiKey: string, // required
baseUrl?: string, // default 'https://api.bimpe.ai'
timeout?: number, // per-request ms; default 30_000
maxRetries?: number, // default 2
fetch?: typeof fetch, // override for tests or edge runtimes
defaultHeaders?: Record<string, string>,
logger?: { debug; warn }, // structured hooks; off by default
});The SDK targets the /api/v1/console paths under baseUrl. The fetch option accepts any function with the same signature as the platform fetch — use it in test environments or on runtimes that do not expose fetch globally. The logger hooks, if provided, receive a message and an optional context object; nothing is logged by default.
BimpeAI(
api_key="sk_...", # required
base_url="https://api.bimpe.ai", # default
timeout=30.0, # seconds, per request
max_retries=2,
default_headers=None, # sent on every request
http_client=None, # inject an httpx.Client / AsyncClient
)AsyncBimpeAI takes the same arguments; only http_client differs, expecting an httpx.AsyncClient. The SDK targets the /api/v1/console paths under base_url.
Pass http_client when you need to configure a proxy, custom TLS settings, or connection pool limits. The SDK uses the client you provide and leaves closing it to you.
import httpx
with httpx.Client(proxy="http://localhost:8080") as http:
client = BimpeAI(api_key="sk_...", http_client=http)
client.agents.list()Options reference
| Option | TS | Python | Default | Description |
|---|---|---|---|---|
| API key | apiKey | api_key | — | Required. Sent as Authorization: Bearer <key> |
| Base URL | baseUrl | base_url | https://api.bimpe.ai | Root URL for all requests |
| Timeout | timeout | timeout | 30000 ms / 30.0 s | Per-request wall-clock limit |
| Max retries | maxRetries | max_retries | 2 | Automatic retry budget |
| Default headers | defaultHeaders | default_headers | null | Merged into every request |
| HTTP client | fetch | http_client | platform default | Override transport for tests or proxies |