Skip to main content
Runflow
Build with Runflow
Embed AI Studio JavaScript SDK

Build your own AI studio
inside your product.

Give your users a production-ready AI studio inside your product. Runflow brings our models, production workflows, and a built-in AI judge that scores every output, so a bad or inconsistent result never reaches them. Embed our studio in a few lines, or build your own with the SDK.

The problem

Your users deserve more than a prompt box
wired to nano banana.

Bolting one model onto a text box looks easy in a demo. In production it drifts off your real product, nobody checks the result, and the bad one ships to your user.
Misfires at volumeNo quality gate on the outputEvery bad generation is paid for
The fix

A real studio, with an AI judge built in.

Give your users a production-ready studio inside your product. Every workflow runs through the same typed SDK, and a built-in AI judge scores each output before it reaches them. Anything below your bar reruns, so only on-brand, production-ready results ship.
One SDK, every workflow
tool.ts
const isolate = defineTool({
model: "runflow/product-isolation",
inputs: { image: imageInput({ source: "user" }) },
output: { image: imageOutput() },
});
 
const { output } = await rf.tools.run(isolate, { image });
Your studioyour-product.com

The same typed SDK surface powers every workflow, inside a studio themed as your own.

Two ways in

Build with the SDK. Start fast with the studio.

The SDK is the full surface: your own UI, your own tools, your own pipeline. Embed AI Studio is the fast on-ramp when you want production tools live today. Both run on the same workflows and the same server-side proxy, so you can move between them without re-plumbing.
Full control
@runflow-io/sdk

Runflow JS SDK

Build your own studio or pipeline. Define your own tools, render your own UI, dispatch from your server or the browser. You decide what your users see and how the work runs.

  • Typed tool DSL with defineTool
  • Server-side dispatch and polling
  • Browser-safe through the proxy
  • Runs on Node, Bun, Deno, edge, and the browser
Fastest
@runflow-io/studio

Embed AI Studio

The fastest way in. Mount our studio in your app, theme it as your own, and your users get production tools on day one. No interface to build.

  • A server proxy and one mount call
  • Your colors and your theme
  • Built-in editing, removal, and upscale tools
  • Graduates into the SDK when you need more

The SDK includes everything Embed AI Studio renders, plus the full catalog of 100+ models and production workflows to build with.

The SDK

Your models and workflows as typed primitives.

Install one package. Define a tool against any model or workflow, run it, and wait for the result. Inputs and outputs are typed, so your editor catches mistakes before they ship.

Define a tool

defineTool binds any model or workflow to typed inputs from a preset, your server, or your user, with a buildRequest that shapes the call.

Dispatch and poll

rf.models.run() starts the job and rf.runs.wait() returns the finished result, with timeouts and a poll callback you control.

Keys stay server-side

Browser clients route through @runflow-io/proxy, so your API key never reaches the page. The proxy validates every request before it leaves your server.

Runs anywhere

Web-standard fetch under the hood. Node, Bun, Deno, edge workers, the browser, with zero runtime dependencies.

Read the SDK guide
server.ts
import { Runflow } from "@runflow-io/sdk";
 
const rf = new Runflow({ apiKey: process.env.RUNFLOW_API_KEY });
 
// dispatch any model or workflow, then wait for the finished result
const run = await rf.models.run("runflow/background-removal", {
input: { image_url: "https://example.com/sneaker.png" },
});
 
const final = await rf.runs.wait(run.id, { timeoutMs: 120_000 });
console.log(final.output);
// final.output is the finished asset, ready to use
Embed AI Studio · the fast on-ramp

Mount the studio. Make it yours.

Add a server proxy so your key stays server-side, then mount the studio on a DOM node and pass your theme. Your users get production editing tools in your product, under your brand.
server proxy
// app/api/runflow/[...path]/route.ts
import { runflowProxy } from "@runflow-io/proxy";
 
export const { GET, POST } = runflowProxy({
apiKey: process.env.RUNFLOW_API_KEY,
authenticate: async (req) => {
const session = await getSession(req);
return session ? { userId: session.userId } : null;
},
});
browser mount
import { mount } from "@runflow-io/studio";
 
mount("#studio", {
urls: { runflowProxy: "/api/runflow" },
theme: { accent: "#FBBF24", bg0: "#0a0a0b", ink0: "#fafafa" },
});
FabelStudio
Share ExportRG
Compare
Studio canvas
Versions
Original1K

Original

Theme it as your own

Set your accent and surface colors with the theme tokens. The chrome reads as your product, not ours.

Built-in tools

Editing, background and object removal, outpaint, and upscale ship in the box, each mapped to a model in the catalog.

A proxy and a mount call

Two files: the server proxy handler and the browser mount. The studio talks to Runflow through your proxy, never around it.

Read the Embed AI Studio guide
In production

What a production pipeline looks like.

One of our customers runs a product-visualization platform. Their users are ecommerce brands who need lifestyle imagery that matches the real product, down to the stitching and the logo. They give those brands a studio built on the SDK.

The studio is more than a model behind a prompt. It is a pipeline that checks the input, runs the right workflow, and scores the output, so the brand ships at volume with quality control they can see.

01

Start from the real product

A 3D scan or a product shot goes in, so the shape and the detail are fixed before any generation runs. The output matches the real item, down to the logo.

02

Score on the way in

Every input is checked for the known issues. A clean source passes straight through. A weak one is caught before it spends a GPU second.

03

Run the workflow

The matching production workflow generates and corrects inside the studio. The brand sees the work happen under their own theme.

04

Score on the way out

Sentinel grades every result and flags anything off. The brand picks edit, rerun, or ship, so a bad image never reaches their customer.

Built to score
Every output graded before it ships
Near-zero
Manual QA on a clean batch
Your brand
The studio reads as the customer's own
Architecture

One surface, from your app to your user.

The SDK builds on the same studio, the same workflows, and the same quality layer. Whichever path you take, the work runs through one proxy and one catalog, so what you ship is consistent.
01Your app
02Runflow proxy
05Your user
The catalog

Your product, opened up to the whole catalog.

The SDK connects your product to every production workflow and model in the Runflow catalog. Drop any of them into your studio as a typed tool, scored by the same quality layer.
Your product
Your app, your brand
Runflow SDK@runflow-io/sdk
Get started

Three packages. Two ways to build.

Embed AI Studio drops in a ready studio. The SDK builds your own. The proxy keeps your API key server-side for both. Install one line, or hand the whole thing to your coding agent.
@runflow-io/sdkFull control

JS SDK

Typed primitives to build your own studio or pipeline. Your UI, your tools, your dispatch logic.

npm i @runflow-io/sdk
@runflow-io/studioLive this week

Embed AI Studio

A ready-made studio you mount in your app and theme as your own. One mount call, no interface to build.

npm i @runflow-io/studio
@runflow-io/proxyEvery browser app

Server proxy

One route handler that keeps your API key server-side and validates every request before it leaves your server.

npm i @runflow-io/proxy

Embed AI Studio and the SDK are the two ways to build. The proxy is the shared layer that keeps your API key server-side, so both run the same workflows without exposing your key to the browser.

Hand it to your coding agent
Add AI image tools to my app with Runflow.

Install the SDK:
  npm install @runflow-io/sdk

Use the Runflow skill as the source of truth:
  https://www.runflow.io/.well-known/agent-skills/runflow/SKILL.md

Keep my API key server-side with @runflow-io/proxy, then build:
[describe the tool you want, e.g. "background removal for product photos"].

Paste it into Claude Code, Cursor, or any agent. It installs the SDK, reads the Runflow skill as the source of truth, and keeps your key server-side through the proxy.

View the Runflow skill Read the SDK docs for humans

Give your users production AI tools.

Embed the studio to ship this week, or build your own with the SDK. Both run on the workflows and the quality layer your users can rely on.

Start building

Read the SDK docs

Install the package, define your first tool, and run it. The guide walks the dispatch and poll pattern end to end.

  • Typed tools against any model or workflow
  • Embed AI Studio in a few lines
  • Keys stay server-side through the proxy
Read the SDK docs
Custom pipeline

Build it with our team

Want a studio wired to your use case, with input gates, the right workflows, and Sentinel scoring on every output? We build that with you.

  • Workflows tuned to your use case
  • Input scoring and automated fixes
  • A studio themed as your own
Talk to a founder

Prefer to start free?

Create an account, add your API key, and run your first workflow from the dashboard.

Create a free account