SDKsPython

Configuration

Constructor options and per-call overrides for the BimpeAI Python SDK.

Both BimpeAI and AsyncBimpeAI accept the same constructor arguments.

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
)

The SDK targets the /api/v1/console paths under base_url and identifies itself with a User-Agent like bimpeai-python/<version> (Python/<py>; <os>).

AsyncBimpeAI takes the same arguments; only http_client differs, expecting an httpx.AsyncClient instead of httpx.Client.

Per-call options

The write methods accept idempotency_key, timeout, max_retries, and headers as keyword arguments alongside the body fields. Each overrides the client-level setting for that one call. See Retries & idempotency for details.

Types

Response models are Pydantic models that are frozen and tolerant of unknown fields, so a new field added server-side will not break deserialization and is reachable as an attribute. Request bodies are TypedDicts, and the create and update methods accept them as typed keyword arguments via Unpack, so a type checker flags an unknown or mistyped field at the call site.

Requirements

Python 3.10, 3.11, 3.12, 3.13, and 3.14 are supported and tested.

On this page