API Overview

The Autoflowly API provides programmatic access to MVP generation, diagnostics, and deployment.

Base URL

https://api.autoflowly.com/api

All API requests must be made over HTTPS.

Authentication

Include your JWT token in the request header:

curl -H "Authorization: Bearer YOUR_JWT_TOKEN" \ https://api.autoflowly.com/api/conversational-mvp/quick

This is the same backend the web app and the MCP integration use — if you want ChatGPT, Claude, or Gemini to build/operate apps on your behalf without writing any HTTP calls yourself, use the MCP server instead of this API directly.

Core Endpoints

App Generation

MethodEndpointDescription
POST/conversational-mvp/quickGenerate a full-stack app from a description, with smart defaults
POST/conversational-mvp/chatConversational generation with follow-ups
GET/conversational-mvp/session/{id}Get session state and generated files

Editor & SmartDoctor

MethodEndpointDescription
POST/conversational-mvp/editor/doctor/diagnoseDiagnose issues in an app
POST/conversational-mvp/editor/doctor/fixAuto-fix all detected issues
POST/conversational-mvp/editor/save-fileSave a file change

App Branching

MethodEndpointDescription
POST/conversational-mvp/{mvp_id}/branchesFork the app's current files into a named branch
GET/conversational-mvp/{mvp_id}/branchesList an app's branches
POST/conversational-mvp/{mvp_id}/branches/{branch_id}/activateOpen a branch's live preview
DELETE/conversational-mvp/{mvp_id}/branches/{branch_id}Discard a branch

Quick Start Example

Generate an app with a single API call:

const response = await fetch('https://api.autoflowly.com/api/conversational-mvp/quick', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_JWT_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ app_name: "Budget Tracker", description: "Personal budget tracker for freelancers with expense categories, income tracking, and monthly reports" }) }) const data = await response.json() console.log(data.preview_url) // https://mvp-budget-tracker.preview.autoflowly.com

Diagnose and Fix

Run SmartDoctor diagnostics on a generated MVP:

// Step 1: Diagnose const diagnosis = await fetch('https://api.autoflowly.com/api/conversational-mvp/editor/doctor/diagnose', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_JWT_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ session_id: "your-session-id", mvp_id: "your-mvp-id" }) }) const report = await diagnosis.json() // report.health_score: 85 // report.issues: [{ severity: "warning", title: "Missing dependency", ... }] // Step 2: Fix all issues const fix = await fetch('https://api.autoflowly.com/api/conversational-mvp/editor/doctor/fix', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_JWT_TOKEN', 'Content-Type': 'application/json' }, body: JSON.stringify({ session_id: "your-session-id", mvp_id: "your-mvp-id", auto_redeploy: true, create_snapshot: true }) })

AI Providers

Generation uses Claude by default and automatically falls back to OpenAI if the primary provider is unavailable or errors — this is handled for you, no provider selection required.

Rate Limits

Generation and editor endpoints are rate-limited per account to prevent abuse; limits scale with your plan. If you hit one, the response is a 429 with a Retry-After header.

Error Responses

All errors follow a consistent format:

{ "detail": "Description of the error", "status_code": 400 }
CodeMeaning
400Invalid request parameters
401Missing or invalid authentication
404Resource not found
429Rate limit exceeded
500Internal server error