Guides

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

OptionTSPythonDefaultDescription
API keyapiKeyapi_keyRequired. Sent as Authorization: Bearer <key>
Base URLbaseUrlbase_urlhttps://api.bimpe.aiRoot URL for all requests
Timeouttimeouttimeout30000 ms / 30.0 sPer-request wall-clock limit
Max retriesmaxRetriesmax_retries2Automatic retry budget
Default headersdefaultHeadersdefault_headersnullMerged into every request
HTTP clientfetchhttp_clientplatform defaultOverride transport for tests or proxies

On this page