Skip to content

AI Workflows

Chain multi-step AI pipelines across providers. LLM calls, image generation, data transforms, and HTTP requests.

$0.001 / step

  • Multi-Provider
  • Step Types
  • Variables
// Define a content pipeline workflow
const workflow = await stack0.workflows.create({
name: 'content-pipeline',
steps: [
{
id: 'research',
type: 'llm',
provider: 'anthropic',
model: 'claude-sonnet-4-20250514',
prompt: 'Research {{variables.topic}} and list key points',
},
{
id: 'draft',
type: 'llm',
provider: 'openai',
model: 'gpt-4o',
prompt: 'Write a blog post using: {{research.output}}',
},
],
})
const result = await stack0.workflows.runAndWait({
workflowId: workflow.id,
variables: { topic: 'AI agent infrastructure' },
})
AnthropicOpenAIGeminiReplicateMulti-StepParallel

Built for production

LLM Steps

Call any LLM with prompt templates and output parsing.

optionsaccepted
{
type: 'llm', provider: 'anthropic', model: 'claude-sonnet-4-20250514',
}

Call any LLM with prompt templates and output parsing.

Image Generation

Generate images with Flux, SDXL, or Stable Diffusion.

optionsaccepted
{
type: 'image', provider: 'replicate', model: 'flux-schnell',
}

Generate images with Flux, SDXL, or Stable Diffusion.

HTTP Requests

Call external APIs and incorporate responses into workflow.

optionsaccepted
{
type: 'http', method: 'POST', url: '{{variables.apiUrl}}',
}

Call external APIs and incorporate responses into workflow.

Data Transforms

Parse, filter, and transform data between steps.

optionsaccepted
{
type: 'transform', operation: 'map', path: 'items[*].name',
}

Parse, filter, and transform data between steps.

Conditionals

Branch workflow based on conditions and comparisons.

optionsaccepted
{
type: 'condition', if: '{{research.length}} > 5',
}

Branch workflow based on conditions and comparisons.

Webhooks

Receive results via webhook when workflow completes.

optionsaccepted
{
webhookUrl: 'https://yourapp.com/webhook',
}

Receive results via webhook when workflow completes.

  • Multi-Provider

    Use Anthropic, OpenAI, Gemini, Replicate, and more in the same workflow.

  • Step Types

    LLM calls, image generation, HTTP requests, data transforms, and conditionals.

  • Variables

    Pass data between steps with interpolation syntax like {{step1.output}}.

  • Retries

    Automatic retry with exponential backoff on transient failures.

  • Parallel Steps

    Run independent steps in parallel for faster execution.

  • Conditionals

    Branch workflow logic based on previous step outputs.

Built for real applications

Content Pipelines

Generate outlines, write drafts, edit, and publish—all in one workflow.

Simple, usage-based

$20/mo includes $10 of usage. Metered beyond that, at the same rate for everyone.

Steps

$0.001/ step


  • LLM calls (+ provider cost)
  • Image generation (+ provider cost)
  • HTTP requests
  • Data transforms
  • Conditionals
  • Automatic retries
  • Webhook notifications
Get Started

Frequently asked questions

Ready to build?

Get started in minutes.

Start Building