Seemodo exposes a comprehensive set of API endpoints for code generation, sandbox management, and various utilities.
Code Generation
Generate AI Code Stream
/api/generate-ai-code-stream
Stream full application generation with AI.
POST /api/generate-ai-code-stream
{
"prompt": "Build a todo app with dark theme",
"sandboxId": "sandbox_123",
"model": "google/gemini-3-pro-preview",
"images": ["data:image/png;base64,..."]
}
Response: Server-Sent Events (SSE) stream with code chunks.
Generate Screen
Generate a single React screen component.
POST /api/generate-screen
{
"prompt": "User profile settings page",
"width": 375,
"height": 840,
"isWireframe": false,
"sandboxId": "sandbox_123",
"deepDesign": true,
"maxMode": false,
"pageType": "normal",
"images": []
}
Generate Flow
AI generates a list of screens for a complete app flow.
POST /api/generate-flow
{
"context": "E-commerce app for fashion brand",
"screenCount": 5,
"images": []
}
Response:
{
"screens": [
{ "name": "Home", "prompt": "Product discovery..." },
{ "name": "Product Detail", "prompt": "..." },
{ "name": "Cart", "prompt": "..." }
]
}
Generate Wireframe
Generate tldraw wireframe shapes.
POST /api/generate-wireframe
{
"prompt": "Dashboard layout with sidebar",
"width": 1440,
"height": 900
}
Code Editing
Apply AI Code Stream
/api/apply-ai-code-stream
Apply AI-generated code changes via streaming.
POST /api/apply-ai-code-stream
{
"sandboxId": "sandbox_123",
"prompt": "Add dark mode toggle",
"context": { "files": [...] }
}
Edit Screen
Edit existing screen with AI.
POST /api/edit-screen
{
"sandboxId": "sandbox_123",
"screenId": "screen_456",
"editPrompt": "Change button color to purple"
}
Analyze Edit Intent
Analyze which files need modification for an edit request.
POST /api/analyze-edit-intent
{
"prompt": "Add user authentication",
"files": [...]
}
Sandbox Management
Create Sandbox
/api/create-ai-sandbox-v2
Create a new sandbox instance.
POST /api/create-ai-sandbox-v2
{}
Response:
{
"sandboxId": "sandbox_123",
"url": "https://preview-url.modal.run",
"apiUrl": "https://api-url.modal.run",
"opencodeUrl": "https://opencode-url.modal.run"
}
Add Sandbox Page
Add a new page/route to an existing sandbox.
POST /api/add-sandbox-page
{
"sandboxId": "sandbox_123",
"pageSlug": "page-2",
"html": "<div>...</div>",
"prompt": "Contact form"
}
Kill Sandbox
Terminate a sandbox instance.
POST /api/kill-sandbox
{
"sandboxId": "sandbox_123"
}
Sandbox Status
Check sandbox health and status.
GET /api/sandbox-status?sandboxId=sandbox_123
Get Sandbox Files
Retrieve file listing from sandbox.
GET /api/get-sandbox-files?sandboxId=sandbox_123
Sandbox Routes
Get available routes in the sandbox application.
GET /api/sandbox-routes?sandboxId=sandbox_123
Restart Vite
Restart the Vite development server.
POST /api/restart-vite
{
"sandboxId": "sandbox_123"
}
Create ZIP
Create a downloadable ZIP of the project.
POST /api/create-zip
{
"sandboxId": "sandbox_123"
}
Response: ZIP file download.
Error Handling
Check Vite Errors
Get current Vite/build errors.
GET /api/check-vite-errors?sandboxId=sandbox_123
Check Sandbox Imports
/api/check-sandbox-imports
Check for missing package imports.
POST /api/check-sandbox-imports
{
"sandboxId": "sandbox_123",
"fileContent": "import lodash from 'lodash';"
}
Report Vite Error
Report a Vite error for AI to fix.
POST /api/report-vite-error
{
"sandboxId": "sandbox_123",
"error": "Module not found: react-icons"
}
Package Management
Install Packages
Install npm packages in the sandbox.
POST /api/install-packages
{
"sandboxId": "sandbox_123",
"packages": ["lodash", "date-fns"]
}
Detect and Install Packages
/api/detect-and-install-packages
Auto-detect missing packages and install them.
POST /api/detect-and-install-packages
{
"sandboxId": "sandbox_123"
}
Brainstorm
Bootstrap Brainstorm
/api/brainstorm/bootstrap
Initialize a brainstorming session.
POST /api/brainstorm/bootstrap
{
"prompt": "Build an AI-powered note taking app",
"context": {}
}
Probe Brainstorm
Continue brainstorming with follow-up questions.
POST /api/brainstorm/probe
{
"sessionId": "session_123",
"answers": { "q1": "option_a", "q2": ["opt1", "opt2"] }
}
Seemodo Cloud
Activate Cloud
Activate Supabase integration for a sandbox.
POST /api/seemodo-cloud
{
"sandboxId": "sandbox_123",
"projectRef": "abcdefghijklmnop",
"apiToken": "sbp_..."
}
Supabase Proxy
/api/supabase-proxy/[...path]
Proxy requests to Supabase Management API.
GET /api/supabase-proxy/projects/abcdef/database/tables
Utilities
Scrape Website
Scrape a URL for cloning.
POST /api/scrape-website
{
"url": "https://stripe.com/payments"
}
Extract Brand Styles
/api/extract-brand-styles
Extract colors and fonts from a URL.
POST /api/extract-brand-styles
{
"url": "https://example.com"
}
Enhance Prompt
AI-enhance a user prompt.
POST /api/enhance-prompt
{
"prompt": "login page",
"type": "single"
}
Run Command
Execute a shell command in the sandbox.
POST /api/run-command
{
"sandboxId": "sandbox_123",
"command": "ls -la src/"
}
Sandbox Logs Stream
Stream sandbox logs via Server-Sent Events.
GET /api/sandbox-logs-stream?sandboxId=sandbox_123
Git Operations
Perform git operations in the sandbox.
POST /api/sandbox-git
{
"sandboxId": "sandbox_123",
"action": "commit",
"message": "Add user authentication"
}
Error Responses
All endpoints return consistent error responses:
{
"success": false,
"error": "Error message describing what went wrong"
}
Common HTTP status codes:
| Code | Meaning |
|---|
| 200 | Success |
| 400 | Bad request (invalid parameters) |
| 401 | Unauthorized (missing API key) |
| 404 | Resource not found |
| 500 | Server error |