Work in ProgressAlpha

inferpipeDocumentation

Learn how to build, test, and deploy AI pipelines with our visual workflow builder and backend SDK integration.

Quick Start

Get started with your first AI workflow in minutes using our visual builder.

Start Building

SDK Integration

Integrate AI workflows into your application using our backend SDK.

View SDK Docs

API Reference

Complete API documentation for advanced integrations and custom workflows.

API Docs

Getting Started

1. Create Your First Workflow

Start by creating a workflow in the visual builder. Choose from pre-built templates or create a custom pipeline:

  • Content generation and editing
  • Data extraction and analysis
  • Sentiment analysis and classification
  • Translation and localization
  • Image and document processing

2. Test Your Pipeline

Use the built-in testing tools to validate your workflow:

  • Test with sample data and see real-time results
  • Debug step-by-step execution
  • A/B test different prompts and models
  • Monitor performance and cost metrics

3. Deploy to Production

Once tested, deploy your workflow and integrate it into your application using our SDK or webhooks.

SDK Integration

Installation

# Install the inferpipe SDK
npm install @inferpipe/sdk

Basic Setup

import { InferPipe } from '@inferpipe/sdk';

const inferpipe = new InferPipe({
  apiKey: process.env.INFERPIPE_API_KEY,
  workspaceId: process.env.INFERPIPE_WORKSPACE_ID,
});

Execute Workflows

// Synchronous execution (wait for completion)
const result = await inferpipe.execute({
  workflowId: 'content-generation',
  input: {
    topic: 'AI automation',
    length: 'medium',
    tone: 'professional'
  }
});

console.log(result.data);

Async Execution with Webhooks

// Asynchronous execution (immediate return)
const execution = await inferpipe.executeAsync({
  workflowId: 'document-analysis',
  input: { documentUrl: 'https://example.com/doc.pdf' }
});

// Results delivered to configured webhook endpoint
console.log('Execution ID:', execution.id);

Framework Examples

Next.js API Route

// pages/api/analyze.ts
export default async function handler(req, res) {
  const result = await inferpipe.execute({
    workflowId: 'sentiment-analysis',
    input: { text: req.body.text }
  });
  
  res.json(result.data);
}

Express.js Route

// routes/ai.js
app.post('/extract', async (req, res) => {
  const result = await inferpipe.execute({
    workflowId: 'data-extraction',
    input: req.body
  });
  
  res.json(result.data);
});

Best Practices

Security

  • • Keep API keys server-side only
  • • Use environment variables for configuration
  • • Verify webhook signatures
  • • Implement rate limiting in your app

Performance

  • • Use executeAsync() for long-running workflows
  • • Implement caching for repeated requests
  • • Monitor execution costs and performance
  • • Use batch processing for multiple items

Error Handling

  • • Implement proper try/catch blocks
  • • Configure retry logic for transient failures
  • • Log execution IDs for debugging
  • • Set up monitoring and alerting

Testing

  • • Test workflows in the dashboard first
  • • Use test environments for development
  • • Mock inferpipe responses in unit tests
  • • A/B test different prompts and models

API Reference

Core Methods

execute(options)

Execute a workflow synchronously and wait for completion. Best for workflows that complete quickly (< 30 seconds).

Promise<ExecutionResult>

executeAsync(options)

Execute a workflow asynchronously with immediate return. Results delivered via configured webhooks.

Promise<ExecutionInfo>

executeStream(options)

Execute a workflow with streaming responses. Perfect for real-time AI interactions.

AsyncIterable<StreamChunk>

Configuration Options

interface ExecuteOptions {
  workflowId: string;
  input: Record<string, any>;
  timeout?: number;
  retryConfig?: {
    attempts: number;
    backoff?: 'fixed' | 'exponential';
    maxDelay?: number;
  };
  metadata?: Record<string, any>;
}

Ready to Start Building?

Create your first AI workflow in minutes with our visual builder and integrate it into your application.