
V3: The Foundation for Verified AI
Today we’re shipping the biggest release in Bem’s history: a redesigned API, first-party SDKs in four languages, a Terraform provider, an MCP server for agent integration, and a CLI. Six releases, one principle — deterministic outcomes from probabilistic systems.
AI is probabilistic. Business outcomes are not.
A 0.5% error rate on claims processing means millions in liability. A missed field in a customs declaration means cargo stuck at port. A hallucinated line item in a financial reconciliation means an audit finding with your name on it.
For the past year, we’ve watched developers build mission-critical systems on Bem - processing millions of transactions across insurance, finance, logistics, and healthcare. We’ve learned what works, what breaks, and where the abstractions leak. V3 is the result: a smaller, sharper API designed around one principle - if your business depends on it, every output should be verified, every decision auditable, every failure traceable.
Today we’re shipping six things.
1. The V3 API
We rewrote the API surface from scratch.
V3 is smaller. Fewer endpoints, clearer resource boundaries, consistent patterns. If you’ve used Stripe’s API, the conventions will feel familiar - cursor-based pagination, predictable error shapes, webhook signatures with HMAC-SHA256 verification.
The core model is unchanged: Functions (typed processing steps), Workflows (directed graphs of functions), Calls (individual executions), Events (outputs), and Subscriptions (webhook bindings). But V3 tightens every seam. Resource creation is more explicit. Workflow composition is more intuitive. Response shapes are consistent across sync and async paths.
Every function type ships at V3:
- Extract - Converts files to schema-enforced JSON with per-field confidence scores
- Classify - Routes documents down different processing paths based on content
- Split - Fragments multi-document files into individual units
- Join - Merges upstream outputs into consolidated payloads
- Enrich - Augments extracted data via semantic search against your collections
- Payload Shaping - Restructures JSON with JMESPath for downstream systems
- Send - Delivers results to webhooks, S3, or Google Drive
With a couple of API calls, you define a function, wire it into a workflow, and start processing:
1# Create an extract function2curl -X POST https://api.bem.ai/v3/functions \3 -H "x-api-key: $BEM_API_KEY" \4 -H "Content-Type: application/json" \5 -d '{6 "functionName": "invoice-extractor",7 "type": "extract",8 "config": {9 "outputSchema": {10 "invoiceNumber": { "type": "string" },11 "vendor": { "type": "string" },12 "lineItems": {13 "type": "array",14 "items": {15 "description": { "type": "string" },16 "amount": { "type": "number" }17 }18 },19 "total": { "type": "number" }20 }21 }22 }'2324# Create a workflow25curl -X POST https://api.bem.ai/v3/workflows \26 -H "x-api-key: $BEM_API_KEY" \27 -H "Content-Type: application/json" \28 -d '{29 "name": "invoice-processing",30 "mainNodeName": "invoice-extractor",31 "nodes": [{32 "name": "invoice-extractor",33 "function": { "functionName": "invoice-extractor" }34 }]35 }'3637# Call it synchronously38curl -X POST "https://api.bem.ai/v3/workflows/invoice-processing/call?wait=true" \39 -H "x-api-key: $BEM_API_KEY" \40 -F "callReferenceID=inv-001" \41 -F "file=@invoice.pdf"
That’s it. Schema in, verified JSON out.
V1 and V2 workflows continue to run - no forced migration. But V3 is where everything new lands.
2. First-Party SDKs
We shipped official client libraries for TypeScript, Python, Go, and C#.
All four share the same resource model and read BEM_API_KEY from the environment by default. Install and go:
TypeScript
1npm install bem-ai-sdk
1import Bem from 'bem-ai-sdk';23const bem = new Bem();45const call = await bem.workflows.call('invoice-processing', {6 callReferenceID: 'inv-001',7 input: { file: './acord_125.pdf' },8 wait: true,9});1011console.log(call.outputs);
Python
1pip install bem-sdk
1from bem import Bem23bem = Bem()45call = bem.workflows.call("invoice-processing",6 call_reference_id="inv-001",7 input={"file": "./acord_125.pdf"},8 wait=True,9)1011print(call.outputs)
Go
1go get github.com/bem-team/bem-go-sdk
1import "github.com/bem-team/bem-go-sdk"23client := bem.NewClient()45call, _ := client.Workflows.Call(ctx, "invoice-processing", &bem.CallParams{6 CallReferenceID: "inv-001",7 Input: bem.FileInput("./acord_125.pdf"),8 Wait: true,9})1011fmt.Println(call.Outputs)
C#
1dotnet add package Bem
1using Bem;23var client = new BemClient();45var call = await client.Workflows.CallAsync("invoice-processing", new CallParams6{7 CallReferenceID = "inv-001",8 Input = new FileInput("./acord_125.pdf"),9 Wait = true,10});1112Console.WriteLine(call.Outputs);
Drop them in wherever your stack lives. Every SDK covers functions, workflows, calls, collections, and subscriptions - the full V3 surface.
3. Terraform Provider
This was the most requested feature from teams running Bem in production.
The Terraform provider lets you define functions, workflows, and their composition as infrastructure-as-code. Version your extraction pipelines the same way you version your databases, queues, and compute.
1terraform {2 required_providers {3 bem = {4 source = "bem-team/bem"5 version = "~> 1.0"6 }7 }8}910provider "bem" {}1112resource "bem_function" "invoice_extractor" {13 function_name = "invoice-extractor"14 type = "extract"1516 config = jsonencode({17 outputSchema = {18 invoiceNumber = { type = "string" }19 vendor = { type = "string" }20 total = { type = "number" }21 }22 })23}2425resource "bem_workflow" "invoice_processing" {26 name = "invoice-processing"27 main_node_name = "invoice-extractor"2829 node {30 name = "invoice-extractor"31 function_name = bem_function.invoice_extractor.function_name32 }33}
terraform plan, terraform apply. Your extraction pipelines are now part of your infrastructure graph. Drift detection, state management, team review - all the things you already do for everything else.
4. MCP Server
Coding agents and research assistants are powerful. But they’re also unpredictable. Pairing the open-endedness of an agent with a reliable transactional backbone is where things get interesting.
The Bem MCP server lets any MCP-compatible agent - Claude, Cursor, your own toolchain - create functions, compose workflows, and execute calls directly:
1client.workflows.call("loss-runs")
Your agents can now spin up Bem workflows and run critical document operations without leaving their context. The agent handles the ambiguity; Bem handles the verification.
5. CLI
For the developers who think in terminals:
1# Install2brew install bem-team/tools/bem34# Call a workflow5bem workflows call invoice-processing --input ./acord_125.pdf67# List recent calls8bem calls list --workflow invoice-processing --limit 10910# Check a specific call11bem calls get call_abc123
Pipe outputs to jq. Script batch processing in shell. Integrate into CI/CD pipelines. The CLI covers the full V3 surface - everything you can do in the API, you can do from your terminal.
See It in Action
Walk through the full quickstart - from creating your account to making your first API call:
The Bigger Picture
Here’s the thing we keep coming back to.
AI is getting better at understanding documents. Models improve every quarter. But understanding a document and reliably processing it in a business workflow are fundamentally different problems.
Extraction is the easy part. The hard part is everything after: enforcing schemas, routing exceptions, handling the 400-page contract the same way you handle the 1-page invoice, maintaining accuracy as your document mix drifts over time, proving to your compliance team that every output is auditable.
That’s what Bem is. Not an agent. Not a copilot. A production layer - the transactional backbone between raw unstructured data and the business systems that depend on it.
V3 is the clearest expression of that idea: a smaller API surface, SDKs in every major language, infrastructure-as-code, agent integration, and a CLI - all built around verified, schema-enforced, confidence-scored outputs. SOC 2 Type II, HIPAA, and GDPR compliant. Processing everything from PDFs and spreadsheets to audio and video.
We’re calling this the foundation for verified AI. Not because it sounds good - because it’s the only framing that’s honest about what production workloads actually need: deterministic outcomes from probabilistic systems.
Get Started
- Sign up free at bem.ai - 100 function calls per month, no credit card
- Read the V3 docs at docs.bem.ai
- Browse the SDKs on GitHub
- Talk to the team - book a call
If you’re already on Bem, V3 is live now. Your existing workflows keep running. Migrate when you’re ready.
If you’re evaluating us for the first time - start with the quickstart. You’ll have a working extraction pipeline in five minutes.
Written by
Bem Team
Apr 28, 2026 · Updates


Ready to see it in action?
Talk to our team to walk through how Bem can work inside your stack.
Talk to the team