BlitFlow

Quickstart

Create a token, explore the node palette, and run your first workflow.

Create an access token

In the Studio, open Settings → API tokens and create a personal access token. It looks like blit_… and is shown once — store it somewhere safe (an environment variable, a secret manager).

export BLITFLOW_TOKEN="blit_..."

All authenticated calls send it as a bearer token: Authorization: Bearer $BLITFLOW_TOKEN. See Authentication for the details (and for blitflow login, the browser-based alternative for your dev machine).

Explore the node palette

Nodes are the units of work: image models, LLMs, media utilities. Search the palette to find what you need:

curl "https://studio.blitflow.com/api/v1/nodes?q=image&limit=5" \
  -H "Authorization: Bearer $BLITFLOW_TOKEN"

Each result is a node spec listing the node's exact input and output ports, including defaults and allowed enum values. Always read the spec before calling a node — enum values are not guessable, and a wrong value fails validation. See Nodes & specs.

Run a workflow

A run takes either an inline workflow definition or a reference to a published workflow (<id>@<version>), plus input values. The response is a stream of events, ending in run.completed with the outputs.

import { BlitClient } from "@blitflow/sdk";

const client = new BlitClient({ apiKey: process.env.BLITFLOW_TOKEN });

// Run a workflow you published from the Studio editor:
// (or "abc123@2.1.0", or an inline Workflow object)
const outputs = await client.run("abc123@latest", {
  prompt: { value: "a brass key on black velvet" },
});

run() streams the events for you and resolves with the final outputs (or throws if the run fails). Use startRun() instead if you want to observe per-step progress — see Running workflows.

Read the outputs

Outputs are Artifacts. Small values (text, numbers) arrive inline; binary results (images, audio, video) arrive as a ref — a URL you fetch to get the bytes:

{
  "image": {
    "kind": "image",
    "ref": "https://…/output.png",
    "mimeType": "image/png"
  }
}
const artifact = outputs.image;
if ("ref" in artifact) {
  const bytes = await fetch(artifact.ref).then((r) => r.arrayBuffer());
}

Next steps

On this page