Skip to main content
For Developers

Use AI workflows as an API

Trigger, check results, respond to approvals, and fetch artifacts—all over REST, with no model calls, retries, or queues to maintain yourself.

14 v1 endpoints6 permission scopes7-language sandbox
braidrun v1 APIREST · JSON
# Trigger an execution
POST /api/webhooks/{id}/trigger{"executionId": "exec_51a2"}

# Poll status: this one paused at manual approval
GET  /api/v1/executions/exec_51a2{"status": "AWAITING_APPROVAL"}

# Continue after approval (values can be edited before approving)
POST /api/v1/approvals/{approvalId}/approve

# Fetch the result and artifacts once done
GET  /api/v1/executions/exec_51a2/result
GET  /api/v1/executions/exec_51a2/artifacts
Integration path

15 minutes, from creating a Webhook to getting your first result

Four HTTP requests run the whole flow, no SDK needed; any language that can make requests can integrate.

01Create a Webhook, get the URL and KeyAdd a Webhook trigger to your workflow in the console to get a dedicated URL; then create an API Key with the WEBHOOK_TRIGGER scope.
WEBHOOK_TRIGGERX-API-Key
02One POST triggers an executionTop-level JSON fields map automatically to workflow variables of the same name, or you can map explicitly with variableMapping; the payload is capped at 1MB.
POST≤ 1MB
03Poll the execution status and get the resultUse the returned executionId to check execution details; once done, get the output from the result endpoint and download files from the artifacts endpoint.
GET /api/v1/executions/{id}EXECUTION_READ
04Actions needing human review go through the approval APIThe execution pauses at a manual_approval step; use the approval endpoints to list pending items and approve or reject, and on rejection or timeout nothing changes.
APPROVAL_RESPONDAuto-reject on timeout
terminalX-API-Key · JSON ≤ 1MB
# Step 2: send a POST from your system
curl -X POST https://your-host/api/webhooks/{id}/trigger \
  -H "X-API-Key: <your-api-key>" \
  -d '{"ticket_id": "T-1024", "lang": "zh"}'
# Top-level fields map automatically to workflow variables of the same name
{"executionId": "exec_51a2"}

# Step 3: poll status and get the result once done
curl https://your-host/api/v1/executions/exec_51a2/result \
  -H "X-API-Key: <your-api-key>"
Capability list

Six things developers care about

Sandboxed code steps in 7 languagesWrite in Python, JavaScript, TypeScript, Bash, Ruby, Lua, or the CLI; variables are injected as WF_VAR_* environment variables, the default timeout is 30 seconds, and in production it runs in a Docker sandbox with controlled egress.
WF_VAR_*30s timeout
YAML definitions that fit your Git workflowA workflow is a single YAML file: commit, diff, and roll back all happen in the repo you already know; the canvas and YAML stay in two-way sync, so edit either side.
workflow.yamlgit diff
MCP for connecting your own toolsWrap an internal service as an MCP Server and attach it to an Agent, and AI steps can call your system directly, without waiting for the platform to build a connector.
MCPagent tools
Breakpoint Debugger9 breakpoint types pause on a hit so you can edit variables and continue; after a failure, rerun from a specified step, with completed LLM steps not billed again.
9 breakpointsPro
14-endpoint v1 API, least privilegeTriggering executions, checking results, responding to approvals, and downloading artifacts each have their own permission scope; combine the 6 scopes as needed and issue each connected system its own Key.
v16 scopes
Chained triggers with DELAYED_COMPLETIONAfter A finishes, B triggers automatically N seconds later, with a settable maxRuns cap; split a long process into segments, each with its own logs and cost.
DELAYED_COMPLETIONmaxRuns
Honest boundaries

Three Things, Said Upfront

So you don't find out halfway through integrating.

No hundreds of SaaS connectorsCalls to external systems go in code steps, or wrap them as MCP tools attached to an Agent; for a team that writes code, this step is just a few lines of HTTP requests.
No pre-run cost estimate APIEach execution's token usage and cost are recorded per run, so after-the-fact accounting is granular; but there's no quote before running, so budget control relies on approval gates and maxRuns.
Limits Stated Plainly UpfrontWebhook payload capped at 1MB; code steps default to a 30-second timeout; HMAC-SHA256 signatures are kept only as a compatibility mode, and new integrations use API Key.
Connect your first workflow to your system
The Free plan lets you build a workflow and run it manually; upgrade to Pro when you need Webhook triggers and scheduling.