Official client libraries for the Pre.dev Architect API in Python and Node.js/TypeScript.
Generate comprehensive software specifications using AI-powered analysis with a simple, consistent API across both languages.
This repository contains two client libraries with matching APIs:
Python client for the Pre.dev Architect API with full type hints support.
Quick Start:
from predev_api import PredevAPI
predev = PredevAPI(api_key="your_api_key")
result = predev.fast_spec("Build a task management app")Modern TypeScript/Node.js client using ES6+ modules with full type definitions.
Quick Start:
import { PredevAPI } from 'predev-api';
const predev = new PredevAPI({ apiKey: 'your_api_key' });
const result = await predev.fastSpec({ input: 'Build a task management app' });Both libraries provide:
- Fast Spec Generation: Comprehensive specifications quickly - perfect for MVPs and prototypes
- Deep Spec Generation: Ultra-detailed specifications for complex systems with enterprise-grade depth
- Async Spec Generation: Non-blocking async methods for long-running requests
- Status Tracking: Check the status of async specification generation requests
- Enterprise Support: Both solo and enterprise authentication methods
- Type Safety: Full type hints (Python) and TypeScript definitions (Node.js)
- Direct Spec Data: JSON + markdown payloads returned inline alongside S3 URLs
- Error Handling: Custom exceptions for different error scenarios
- Modern Conventions: Latest language features and best practices
Get your API key from the pre.dev dashboard
Generate comprehensive specifications quickly with balanced depth and speed.
Python:
result = predev.fast_spec(
input_text="Your project description"
)TypeScript:
const result = await predev.fastSpec({
input: "Your project description"
});Generate ultra-detailed specifications for complex systems with comprehensive analysis.
Python:
result = predev.deep_spec(
input_text="Your complex project description"
)TypeScript:
const result = await predev.deepSpec({
input: "Your complex project description"
});Generate specifications asynchronously for long-running requests.
Python:
# Fast spec async
result = predev.fast_spec_async(
input_text="Your project description"
)
# Returns: AsyncResponse with specId
# Deep spec async
result = predev.deep_spec_async(
input_text="Your complex project description"
)
# Returns: AsyncResponse with specIdTypeScript:
// Fast spec async
const result = await predev.fastSpecAsync({
input: "Your project description"
});
// Returns: AsyncResponse with specId
// Deep spec async
const result = await predev.deepSpecAsync({
input: "Your complex project description"
});
// Returns: AsyncResponse with specIdCheck the status of an async specification generation request.
Python:
status = predev.get_spec_status("spec_id")TypeScript:
const status = await predev.getSpecStatus("spec_id");Both packages include comprehensive examples in their respective examples/ directories:
cd predev-api-python
export PREDEV_API_KEY="your_api_key"
python examples/fast_spec_example.py
python examples/deep_spec_example.py
python examples/get_status_example.pycd predev-api-node
export PREDEV_API_KEY="your_api_key"
npm run build
npx tsx examples/fastSpecExample.ts
npx tsx examples/deepSpecExample.ts
npx tsx examples/getStatusExample.ts