Skip to main content
POST
Generate 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: ~1 minute (sync) or instant return (async)
  • Output: Complete feature breakdown, architecture, milestones

Endpoint

Headers

For JSON requests:
For file upload requests:

Request Body

Parameters

For JSON requests: For file upload requests (multipart/form-data):

Understanding currentContext

Omit currentContext (New Project):
Generates: Complete new project including:
  • Initial setup and scaffolding
  • Deployment configuration
  • Documentation structure
  • Support and maintenance guidelines
  • Infrastructure setup
  • CI/CD pipelines
  • Monitoring and logging
Provide currentContext (Feature Addition):
Generates: Incremental feature spec including:
  • 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)

Success Response (Async Mode)

Immediate response when async: true:
Poll /spec-status/:specId to check progress.

Async Status Flow

  1. Pending → Initial queue state
  2. Processing → Actively generating spec
  3. Completed → Success, output available
  4. Failed → Error occurred
Typical processing times:
  • Fast Spec: ~1 minute
  • Deep Spec: ~3-5 minutes
Poll every 10-15 seconds for best UX.

Output Structure: Milestones → Stories

Fast Spec follows a two-level hierarchy optimized for rapid development:
Key Characteristics:
  • 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. Recommended usage
  • Feed AI tools: codingAgentSpecJson or codingAgentSpecMarkdown
  • Human-readable UI/PDF: humanSpecMarkdown
  • Planning dashboards: humanSpecJson.totalHours, humanSpecJson.roles
  • Download links: codingAgentSpecUrl and humanSpecUrl

Type definitions (shared by Fast and Deep Spec)

Coding Agent JSON (concise, no hours/personas/roles):
Human JSON (full detail with hours/personas/roles):

Code Examples

cURL - Complete Flow

Synchronous Request:
Asynchronous Request with Polling:

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 (status legend: [ ][→][✓][⊘])
  • Risk analysis and considerations
  • Markdown formatted for direct agent use

Using Task Tracking

As your agent implements features, actively manage progress:
  1. Mark tasks in progress: Change [ ] to [→] when starting
  2. Mark complete: Change [→] to [✓] when done
  3. Mark skipped: Change [ ] to [⊘] if skipping (with reason)
Don’t let your agent skip tasks without questioning why — it keeps implementation comprehensive and on-track.

Documentation Scraping & Archives

Overview

When you provide docURLs 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

  1. Parallel Processing: Documentation scraping runs simultaneously with spec generation (not sequentially), so it doesn’t slow down your request
  2. Graceful Degradation: If documentation scraping fails, spec generation still completes successfully
  3. 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
Don’t:
  • ❌ 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:
  1. Navigate to https://pre.dev/enterprise/dashboard?page=api
  2. Click on any API call to open the details modal
  3. View the “Documentation Archives” section
  4. Click download links to get the ZIP files

Error Handling

If documentation scraping fails:
  • zippedDocsUrls will be an empty array []
  • Spec generation continues normally
  • No error is thrown (graceful degradation)
If docURLs is not provided or is an empty array:
  • zippedDocsUrls will 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

Generate ultra-detailed specifications for complex projects.

Authorizations

Authorization
string
header
default:YOUR_API_KEY
required

API key for authentication. Get your API key from https://pre.dev/projects/key (Solo) or https://pre.dev/enterprise/dashboard?page=api (Enterprise). Use format: Bearer YOUR_API_KEY

Body

input
string
required

Description of what you want to build or the feature you want to add

Example:

"Build a SaaS project management tool with team collaboration and real-time updates"

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

Example:

"Existing Next.js app with Supabase, has auth, task CRUD, team features"

docURLs
string<uri>[]

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

Example:
async
boolean
default:false

If true, returns immediately with requestId for status polling. If false (default), waits for completion

Response

Specification generated successfully

endpoint
enum<string>

Which endpoint was used

Available options:
fast_spec,
deep_spec
input
string

Original input text provided

status
enum<string>

Completion status

Available options:
completed
success
boolean

Whether the request succeeded

humanSpecUrl
string<uri>

URL where the human-readable spec is hosted (downloadable markdown)

totalHumanHours
number

Estimated total hours for a human to implement the spec

architectureInfographicUrl
string<uri>

URL to a visual architecture infographic/diagram for the specification

codingAgentSpecUrl
string<uri>

URL where the coding agent spec format is hosted (downloadable markdown)

codingAgentSpecJson
object

Structured JSON spec optimized for AI coding assistants (excludes hours, personas, roles)

codingAgentSpecMarkdown
string

Markdown spec optimized for AI coding assistants

humanSpecJson
object

Full structured JSON spec with hours, personas, and roles for human review

humanSpecMarkdown
string

Full markdown spec with all details for human review

executionTime
integer

Processing time in milliseconds

predevUrl
string<uri>

pre.dev project URL where you can view and edit the spec

zippedDocsUrls
object[]

Array of scraped documentation archives. Empty array if no docURLs provided or scraping fails. Each object contains platform identifier and download links

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.

userFlowGraph
object

User flow graph with nodes representing user stories/flows and edges showing navigation paths (only when completed)

architectureGraph
object

System architecture graph with C1/C2 level nodes and their relationships (only when completed)

enrichedTechStack
object[]

Enriched tech stack with detailed reasons, descriptions, and alternatives for each technology (only when completed)