SDKs¶
Venturi ships and maintains first-party, fully typed SDKs for TypeScript and
Python. Both are generated from the same OpenAPI 3.1 document that defines
the REST API, so the client surface always matches the contract. Each
SDK builds in the platform conventions you would otherwise implement by hand:
token refresh, cursor-pagination iterators, idempotency-key generation,
Retry-After-aware backoff, and typed problem+json errors.
Generated, never hand-written
The SDKs are regenerated from each released OpenAPI version and pinned for reproducible builds. The generated client cannot drift from the published contract — a mismatch fails CI — so the methods, models, and error types you use are exactly the API's.
Install¶
Configure the client¶
The base URL is your Venturi instance, since the platform runs inside your trust boundary. Supply a token (or API key) and the client manages refresh.
Reading attribution¶
Every record carries the interpretation evidence card — stage_origin,
confidence, confidence_band, evidence_basis, model_version,
degradation_state, freshness, and export_eligibility — fully typed.
Pagination — transparent iterators¶
Paginated resources expose an async iterator that follows cursors for you. You never construct, sign, or carry a cursor by hand.
The iterator walks next_cursor to exhaustion, returning each record exactly
once. See pagination for the underlying contract.
Idempotency — automatic¶
The SDK attaches a fresh Idempotency-Key to every mutating call by default, so
a transient network retry never creates a duplicate. Pass your own key to make a
specific operation safe to retry across process restarts.
Rate limits and backoff — automatic¶
On a 429, the SDK honors Retry-After and retries with jittered backoff. After
exhausting retries it raises a typed RateLimitError rather than a bare HTTP
error, so you can branch deliberately.
Typed errors¶
Errors are deserialized into a typed union derived from the published
error catalog. Branch on the error_code, not on prose.
Verifying webhooks¶
Each SDK ships a signature-verification helper so you do not reimplement the HMAC check. See webhooks.
Sample apps¶
Each SDK publishes runnable reference apps you can clone and point at the sandbox:
- Chargeback exporter — generates a FOCUS export and downloads the result.
- Webhook receiver — verifies signatures and processes events.
- Anomaly-alert forwarder — relays
anomaly.detectedevents to your channel.
Versioning¶
SDK major versions track API major versions. A breaking API change ships alongside a coordinated new SDK major version, and the changelog records the mapping. Within a major version, upgrades are additive and safe. See versioning and rate limits.