Pipelines (visual builder & agents)
Pipelines are JSON documents — a DAG of steps, each step calling one API operation. The format is designed to be written by hand, drawn in the visual builder, or produced/modified by an LLM agent:
{
"name": "clean podcast",
"inputs": {"audio": {"type": "audio", "required": true}},
"steps": [
{"id": "transcribe", "op": "audio.transcriptions", "model": "whisperx",
"inputs": {"file": "$.inputs.audio"}},
{"id": "enhance", "op": "audio.enhance",
"inputs": {"audio": "$.inputs.audio"}}
],
"outputs": {"transcript": "$.steps.transcribe.outputs.text"}
}
opvalues are theoperationIds from openapi.yaml — the spec is the machine-readable palette (pricing unit and latency class are inx-pricing-unit/x-latency-class).- Wiring is by reference:
$.inputs.<name>and$.steps.<id>.outputs.<name>. The DAG derives from references; cycles and dangling references are validation errors. - Agents modify pipelines with edit operations (
add_step,remove_step,update_step,set_input,set_output,set_meta) applied atomically and re-validated — a bad batch is rejected whole with a precise error.
Pipeline execution runs on the data plane; each step is billed as the underlying API call.
Agent-designed pipelines (API)
The canvas agent is also an endpoint: POST /v1/pipelines/design takes a
plain-language request and returns a validated pipeline.
curl https://api.inferencebrain.com/v1/pipelines/design \
-H "Authorization: Bearer $IB_API_KEY" \
-d '{
"request": "Change what he says — instead of \"Why is the fish so expensive?\" make it \"Why does the fish smell so good?\" Swap his face for Nadia from our character studio, then have him sniff the fish until his head explodes.",
"input_file_ids": ["file_abc123"]
}'
Returns schema-v1 JSON — every step, model, and parameter, wired:
{
"pipeline": {
"name": "fish-smells-good",
"input": "file_abc123",
"steps": [
{ "id": 1, "op": "transcribe", "model": "whisperx",
"find": "Why is the fish so expensive" },
{ "id": 2, "op": "revoice", "model": "f5-tts",
"voice": "clone:speaker_1", "text": "Why does the fish smell so good" },
{ "id": 3, "op": "lipsync", "model": "latentsync", "audio": "$2.audio" },
{ "id": 4, "op": "faceswap", "model": "facefusion",
"face": "studio://nadia", "restore": "codeformer" },
{ "id": 5, "op": "extend", "model": "wan-2.2-i2v",
"prompt": "sniffs the fish, head explodes", "seconds": 6 },
{ "id": 6, "op": "export", "upscale": "real-esrgan",
"interpolate": "rife", "fps": 60 }
]
},
"valid": true,
"estimate": { "usd": 0.38, "seconds": 250 }
}
Nothing runs until you send the pipeline to POST /v1/pipelines/run — edit it
first if you like (by hand, on the canvas, or with another design call
passing the existing pipeline to modify). Both endpoints are planned until
the gateway ships; the schema is stable now so integrations can build against it.