Generate Fast Spec
Complete documentation for the Fast Spec endpoint. Generate comprehensive project specifications in 30-40 seconds.
Documentation Index
Fetch the complete documentation index at: https://docs.pre.dev/llms.txt
Use this file to discover all available pages before exploring further.
POST /fast-spec
Generate a quick, comprehensive project specification.Overview
- Cost: Variable (typically ~5-10 credits based on complexity)
- Use Cases: MVPs, prototypes, rapid iteration
- Processing Time: ~30-40 seconds (sync) or instant return (async)
- Output: Complete feature breakdown, architecture, milestones
Endpoint
Headers
For JSON requests:Request Body
Parameters
For JSON requests:| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | ✅ | Description of what you want to build |
currentContext | string | ❌ | CRITICAL: Existing project/codebase context. When provided, generates feature addition spec. When omitted, generates full new project spec with setup, deployment, docs, maintenance |
docURLs | string[] | ❌ | Optional: Array of documentation URLs that Architect will reference when generating specifications. Useful for API documentation, design systems, or existing project docs |
async | boolean | ❌ | false (default) - wait for completion, or true - return immediately with requestId for status polling |
| Parameter | Type | Required | Description |
|---|---|---|---|
file | File | ❌ | Optional: File to be parsed as input (e.g., existing code, documentation, requirements). Can be used alone or combined with input text |
input | string | ❌ | Optional: Additional text description when using file upload. Can be empty string if using only file |
docURLs | string[] | ❌ | Optional: Array of documentation URLs that Architect will reference when generating specifications. Useful for API documentation, design systems, or existing project docs |
async | boolean | ❌ | false (default) - wait for completion, or true - return immediately with requestId for status polling |
Understanding currentContext
Omit currentContext (New Project):
- Initial setup and scaffolding
- Deployment configuration
- Documentation structure
- Support and maintenance guidelines
- Infrastructure setup
- CI/CD pipelines
- Monitoring and logging
currentContext (Feature Addition):
- New features only (respects existing architecture)
- Integration points with current codebase
- Migration considerations
- No redundant setup/deployment (already exists)
Example: New Project
Example: Feature Addition
Example: Async Request
Example: With Documentation URLs
Example: With File Upload
Example: File Upload with Additional Context
Response
Success Response (Sync Mode)
| Field | Type | Description |
|---|---|---|
endpoint | string | Endpoint used: "fast_spec" or "deep_spec" |
input | string | Original input text provided |
status | string | Completion status: "completed" when successful |
success | boolean | Whether the request succeeded |
humanSpecUrl | string | URL where the human-readable spec is hosted (downloadable markdown) |
humanSpecMarkdown | string | Full markdown SOW content (human review) |
humanSpecJson | object | Full structured SOW JSON with hours, personas, roles |
totalHumanHours | number | Estimated total hours for a human to implement the spec |
architectureInfographicUrl | string | URL to a visual architecture infographic/diagram for the specification |
codingAgentSpecUrl | string | URL where the coding agent spec format is hosted (downloadable markdown) |
codingAgentSpecMarkdown | string | Simplified markdown SOW for AI coding tools |
codingAgentSpecJson | object | Simplified structured SOW JSON for AI coding tools |
executionTime | number | Processing time in milliseconds |
predevUrl | string | pre.dev project URL where you can view and edit the spec |
creditsUsed | number | Total credits consumed by this spec generation. Available in real-time during processing and persisted on completion. Typical values: Fast spec ~5-10, Deep spec ~10-50 |
zippedDocsUrls | array | New: Array of scraped documentation archives. Each object contains platform (hostname from the doc URL), masterZipShortUrl (download link to the ZIP archive), and optional masterMarkdownShortUrl (consolidated markdown). Empty array if no docURLs provided or scraping fails |
Success Response (Async Mode)
Immediate response whenasync: true:
| Field | Type | Description |
|---|---|---|
specId | string | Unique ID to poll for status (use with /api/spec-status/:specId) |
status | string | Initial status: "pending" |
/api/spec-status/:specId to check progress.
Async Status Flow
- Pending → Initial queue state
- Processing → Actively generating spec
- Completed → Success, output available
- Failed → Error occurred
- Fast Spec: 30-40 seconds
- Deep Spec: 2-3 minutes
Output Structure: Milestones → Stories
Fast Spec follows a two-level hierarchy optimized for rapid development:- ✅ High-level milestones group related features
- ✅ User stories with acceptance criteria
- ✅ Complexity estimates (XS, S, M, L, XL)
- ❌ No granular implementation subtasks
Direct SOW Formats
Fast Spec returns the Scope of Work directly in both JSON and Markdown, and also provides URL endpoints. The JSON is typed and split for coding agents vs. human reviewers: Coding Agent JSON (concise, no hours/personas/roles):- Feed AI tools:
codingAgentSpecJsonorcodingAgentSpecMarkdown - Human-readable UI/PDF:
humanSpecMarkdown - Planning dashboards:
humanSpecJson.totalHours,humanSpecJson.roles - Download links:
codingAgentSpecUrlandhumanSpecUrl
Code Examples
cURL - Complete Flow
Synchronous Request:Python - Complete Implementation
JavaScript/Node.js - Complete Implementation
TypeScript - Type-Safe Implementation
What You Get
The generated specification includes:- ✅ Executive summary
- ✅ Feature breakdown by category
- ✅ Technical architecture recommendations
- ✅ Implementation milestones with effort estimates
- ✅ User stories and acceptance criteria
- ✅ Task checklist with progress tracking
- Task status legend:
[ ]→[→]→[✓]→[⊘] - Update as your agent completes work
- Keep both you and AI aligned on progress
- Task status legend:
- ✅ Risk analysis and considerations
- ✅ Markdown formatted for direct agent use
Using Task Tracking
As your agent implements features, actively manage progress:- Mark tasks in progress: Change
[ ]to[→]when starting - Mark complete: Change
[→]to[✓]when done - Mark skipped: Change
[ ]to[⊘]if skipping (with reason)
Documentation Scraping & Archives
Overview
When you providedocURLs in your request, Architect automatically scrapes the documentation in parallel with spec generation and packages it into downloadable ZIP archives. This feature helps AI agents and developers have context about external APIs, design systems, or frameworks referenced in the spec.
How It Works
- Parallel Processing: Documentation scraping runs simultaneously with spec generation (not sequentially), so it doesn’t slow down your request
- Graceful Degradation: If documentation scraping fails, spec generation still completes successfully
- Organized Archives: Each platform gets its own ZIP with hierarchical folder structure based on the documentation site
Response Field: zippedDocsUrls
Example Request with Documentation URLs
Example Response with Documentation Archives
ZIP Archive Structure
Each ZIP archive contains:- Individual markdown files (one per scraped page)
- Hierarchical folder structure mirroring the documentation site
- Organized by documentation site structure
Supported Domain Formats
The system handles various domain formats:.com,.io,.org,.net.cloud,.dev,.ai- Country-specific TLDs (
.co.uk,.com.au, etc.) - Newer TLDs (
.tech,.app, etc.)
Best Practices for Documentation URLs
Do:- ✅ Provide specific documentation pages relevant to your spec
- ✅ Include API documentation for integrations you’re building
- ✅ Reference design system docs for UI consistency
- ✅ Use official documentation sources
- ❌ Include general marketing pages
- ❌ Link to blog posts instead of official documentation
- ❌ Reference deprecated or outdated documentation
- ❌ Link to non-documentation content
Viewing Documentation Archives
Enterprise users can view and download documentation archives from the API Usage Logs browser:- Navigate to https://pre.dev/enterprise/dashboard?page=api
- Click on any API call to open the details modal
- View the “Documentation Archives” section
- Click download links to get the ZIP files
Error Handling
If documentation scraping fails:zippedDocsUrlswill be an empty array[]- Spec generation continues normally
- No error is thrown (graceful degradation)
docURLs is not provided or is an empty array:
zippedDocsUrlswill be an empty array[]- Spec generation proceeds normally
Best Practices
Writing Effective Input
- Be specific about core features
- Include business context and constraints
- Mention technical preferences if any
Managing Your Agent
- Actively interrupt to ensure tasks are checked off
- Question every skipped task
- Verify acceptance criteria before marking complete
- Triple check that tests are written
Next: Deep Spec Endpoint
Authorizations
API key for authentication. Get your API key from https://pre.dev/projects/playground (Solo) or https://pre.dev/enterprise/dashboard?page=api (Enterprise). Use format: Bearer YOUR_API_KEY
Body
Description of what you want to build or the feature you want to add
"Build a SaaS project management tool with team collaboration and real-time updates"
CRITICAL: Existing project/codebase context. When provided, generates feature addition spec. When omitted, generates full new project spec with setup, deployment, docs, maintenance
"Existing Next.js app with Supabase, has auth, task CRUD, team features"
Optional array of documentation URLs that Architect will reference when generating specifications. Each URL is automatically scraped and packaged into downloadable ZIP archives organized by platform
[
"https://docs.pre.dev",
"https://docs.stripe.com"
]If true, returns immediately with requestId for status polling. If false (default), waits for completion
Response
Specification generated successfully
- Option 1
- Option 2
Which endpoint was used
fast_spec, deep_spec Original input text provided
Completion status
completed Whether the request succeeded
URL where the human-readable spec is hosted (downloadable markdown)
Estimated total hours for a human to implement the spec
URL to a visual architecture infographic/diagram for the specification
URL where the coding agent spec format is hosted (downloadable markdown)
Structured JSON spec optimized for AI coding assistants (excludes hours, personas, roles)
Markdown spec optimized for AI coding assistants
Full structured JSON spec with hours, personas, and roles for human review
Full markdown spec with all details for human review
Processing time in milliseconds
pre.dev project URL where you can view and edit the spec
Array of scraped documentation archives. Empty array if no docURLs provided or scraping fails. Each object contains platform identifier and download links
Total credits consumed by this spec generation. Available in real-time during processing and persisted on completion. Typical values: Fast spec ~5-10, Deep spec ~10-50.
User flow graph with nodes representing user stories/flows and edges showing navigation paths (only when completed)
System architecture graph with C1/C2 level nodes and their relationships (only when completed)
Enriched tech stack with detailed reasons, descriptions, and alternatives for each technology (only when completed)

