Developers

Flow2 API

REST endpoints to generate flows, edit blocks, swap themes, and pull previews. Build the full agentic editing loop without leaving the API.

Quick Start

Create a presentation with a single API call:

curl -X POST https://flow2.co/api/create-flow \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "content": "Benefits of remote work for modern teams",
    "slide_count": 5
  }'

Endpoints

POST /api/signup

Get an API key with just an email. No account required, no verification.

Request Body

Parameter Type Description
email required string Your email address

Response

{
  "message": "You're in! Here's your API key.",
  "api_key": "fvapi_abc123...",
  "credits": 0,
  "status": "free_tier",
  "next_steps": {
    "1": "Try creating a flow: POST /api/create-flow",
    "2": "You'll need credits - grab some at /pricing"
  }
}

Note: New signups start with 0 credits. Purchase credits at /pricing to create flows.

POST /api/create-flow

Start async AI presentation generation. Returns a job_id to poll for status.

Request Body

Parameter Type Description
content required string The topic or content for your presentation
title optional string Custom title (auto-generated if not provided)
slide_count optional integer Number of slides (1-20, default: 5)
tone optional string professional, casual, formal, friendly, authoritative
audience optional string Target audience (e.g., "investors", "students")
goal optional string Inform/Educate, Persuade/Sell, Inspire/Motivate, Report/Update
key_points optional string Key points to emphasize
generate_images optional boolean Generate AI images (default: true)

Response

{
  "success": true,
  "job_id": "FuhqTD270ZwzXdoL",
  "status": "pending",
  "poll_url": "/api/job-status/FuhqTD270ZwzXdoL"
}
GET /api/job-status/:job_id

Poll for job completion. Returns flow URL when complete.

Response (complete)

{
  "job_id": "FuhqTD270ZwzXdoL",
  "status": "complete",
  "flow_id": "53f5",
  "url": "/m/53f5",
  "edit_url": "/flow/53f5/edit",
  "title": "Team Collaboration SaaS Platform",
  "images_generated": 3
}
GET /api/credits

Check your credit balance.

Response

{
  "success": true,
  "balance": 487,
  "monthly_allowance": 500,
  "tier": "pro"
}
GET /api/jobs

List your recent API jobs.

🆕 Agentic Editing API

Agents can now READ, EDIT, and PREVIEW flows. Not just create them.

Generate a flow. Read its visual preview. Refine specific blocks. Re-render. Ship. The full agentic editing loop is live as of April 2026, with mobile-first R2-cached previews and a structured update contract. Call GET /api/blocks/schema. The response is the docs (machine-readable, no auth required).

Full agent docs →

Read

GET /api/blocks/schema

Self-describing block + endpoint catalogue. Public, no auth. Returns every block kind, mutation verb, and an example payload for each. Make this your first call. Agents can bootstrap from the response without docs in their prompt.

GET /api/flows/:id

Full flow JSON + per-screen preview URLs. Returns screen_count, preview_urls[], and content.presentation.screens[].blocks[] with their addressable ids.

GET /api/flows/:id/screens/:n

One screen + its preview URL. Use when you only need to inspect or edit a single screen.

GET /api/flows/:id/preview/:n

Visual preview image URL for screen n. Lazy-rendered + R2-cached, ~50ms after first hit. Pass ?redirect=1 to 302 straight to the image. Cache-buster auto-rotates on edit.

Edit

PATCH /api/flows/:id

Flow-level: change theme or title. Body: {"theme":"neon-pulse"} or {"title":"..."}.

PATCH /api/flows/:id/screens/:n/blocks/:bid

Edit one block. Body's type field selects the operation: text, image, stat, chart, timeline, cta-button, bullet-list, video, team, comparison-table, comparison-slider, set-background, set-video-background, remove-background. See /api/blocks/schema for payload shapes.

POST /api/flows/:id/screens/:n/blocks

Insert a block. Body: {"blockContent": {"id": "...", "type": "...", ...}}. Send your own id in blockContent if you want to address the block later.

DELETE /api/flows/:id/screens/:n/blocks/:bid

Delete a block.

POST /api/flows/:id/screens

Insert a screen. Body: {"position": 3, "screenContent": {"screenType": "content", "blocks": [...]}}. Omit position to append.

DELETE /api/flows/:id/screens/:n

Delete a screen.

Sign in to mint a token at /developers. Tokens read, write, and edit any flow you own. All editing endpoints are free (0 credits) once you've paid the 10-credit cost to mint the flow.

The Loop

1 Generate. POST /api/create-flow with a topic or detailed prompt. AI streams a 5–15 screen presentation in 30–90 seconds.
2 Inspect. GET /api/flows/:id returns the structure; GET /api/flows/:id/preview/:n returns the visual.
3 Refine. Use the block ids to PATCH text, swap images, replace charts, reskin the theme. Add screens, remove blocks. As many edits as needed. They're free.
4 Re-preview. The cache-buster on preview URLs auto-rotates after each edit; agents see the new render immediately.
5 Ship. Send the recipient https://flow2.co/m/:id. Mobile-optimized, instant share, embed-friendly.
⏱ ~60s end-to-end 💰 10 credits to generate, edits free 📱 Mobile-first, native share 🔗 Every viewer is a free billboard

Full Example

Create a presentation and wait for completion:

# Start generation
JOB=$(curl -s -X POST https://flow2.co/api/create-flow \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content": "Q3 Sales Report", "slide_count": 6, "tone": "professional"}')

JOB_ID=$(echo $JOB | jq -r '.job_id')

# Poll until complete
while true; do
  STATUS=$(curl -s "https://flow2.co/api/job-status/$JOB_ID")
  STATE=$(echo $STATUS | jq -r '.status')

  if [ "$STATE" = "complete" ]; then
    echo "Flow created: https://flow2.co$(echo $STATUS | jq -r '.url')"
    break
  elif [ "$STATE" = "failed" ]; then
    echo "Error: $(echo $STATUS | jq -r '.error')"
    break
  fi

  sleep 2
done

Credits & Access

API access requires a Premium or Pro subscription. PRO users receive 500 credits/month.

Each presentation generation costs 5 credits. Images cost 2 credits each. AI refinements are free. Check your balance with GET /api/credits.

Why an API for interactive content?

Every AI agent can generate text. Most can generate images. But very few can generate interactive experiences: structured, navigable, visual content that an audience can actually engage with.

Flow2 bridges that gap. Your agent describes what it wants. The API returns a shareable link to a beautiful, mobile-optimized interactive flow. No templates. No manual work.

🤖 AI Agents Deliver reports, proposals, and summaries as interactive flows instead of flat PDFs
🏢 Sales Enablement CRM triggers generate personalized pitch decks per prospect automatically
📊 Automated Reporting Pipe data into Flow2 and get visual, interactive reports on a schedule
📱 Customer Onboarding Create personalized welcome flows triggered automatically at signup

Agentic Workflow Example

Here's how an AI agent might use Flow2 in a sales pipeline:

1 CRM webhook fires: "New lead qualified"
2 Agent pulls lead data (company, industry, pain points)
3 Agent calls POST /api/create-flow with personalized content
4 Flow2 generates a 6-screen interactive flow with custom images, navigation, and CTAs
5 Agent sends flow link to sales rep (or directly to the lead)
⏱ ~60 seconds 💰 ~13 credits ✨ Unique for every prospect

MCP Server Live

Connect Claude (or any MCP-compatible client) directly to your Flow2 account. 14 tools spanning generation, reading, and editing — create a flow from a prompt, swap themes, edit blocks one at a time, all from chat.

Endpoint
https://mcp.flow2.co/
Auth
OAuth 2.1 with PKCE
Tools
14 (8 read-only, 6 write)
Setup & tools on GitHub → Add to Claude.ai →

Coming Soon

Webhooks
Get notified when flows are viewed or completed
Analytics API
Pull view counts, engagement metrics, and click data
Template API
Create flows from custom templates programmatically
Batch Generation
Create multiple flows in a single API call

🔧 API is in active development

We're building the API alongside the product. If you're working on an agentic workflow and need a specific endpoint, reach out and we'll prioritize what developers actually need.

Token copied to clipboard!