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-mvp
Core Endpoints
MVP Generation
| Method | Endpoint | Description |
|---|---|---|
POST | /conversational-mvp/quick-mvp | Generate a full-stack MVP from a description |
POST | /conversational-mvp/chat | Conversational MVP generation with follow-ups |
GET | /conversational-mvp/session/{id} | Get session state and generated files |
Editor & SmartDoctor
| Method | Endpoint | Description |
|---|---|---|
POST | /conversational-mvp/editor/doctor/diagnose | Diagnose issues in an MVP |
POST | /conversational-mvp/editor/doctor/fix | Auto-fix all detected issues |
POST | /conversational-mvp/editor/save | Save file changes |
POST | /conversational-mvp/editor/redeploy | Redeploy MVP with changes |
AI Agents
| Method | Endpoint | Description |
|---|---|---|
POST | /agents/cto/chat | Chat with the CTO agent |
POST | /agents/cmo/chat | Chat with the CMO agent |
POST | /agents/cfo/chat | Chat with the CFO agent |
Quick Start Example
Generate an MVP with a single API call:
const response = await fetch('https://api.autoflowly.com/api/conversational-mvp/quick-mvp', {
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",
ai_provider: "claude"
})
})
const data = await response.json()
console.log(data.preview_url) // https://mvp-budget-tracker.preview.autoflowly.com
console.log(data.mvp_files) // { "frontend/src/app/page.tsx": "...", ... }
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 Provider Selection
The ai_provider parameter controls which AI model generates code:
| Value | Provider | Model |
|---|---|---|
"claude" (default) | Anthropic | claude-3-5-sonnet |
"chatgpt" | OpenAI | gpt-4 / gpt-3.5-turbo |
"gemini" | gemini-pro | |
"auto" | Best available | Automatic selection with fallback |
If your selected provider is unavailable, the system automatically falls back to another provider when AI_FALLBACK_ENABLED=true.
Rate Limits
| Endpoint | Limit |
|---|---|
| MVP Generation | 10 per hour |
| Diagnose/Fix | 30 per hour |
| Agent Chat | 60 per hour |
Error Responses
All errors follow a consistent format:
{
"detail": "Description of the error",
"status_code": 400
}
| Code | Meaning |
|---|---|
400 | Invalid request parameters |
401 | Missing or invalid authentication |
404 | Resource not found |
429 | Rate limit exceeded |
500 | Internal server error |