Documentation Index
Fetch the complete documentation index at: https://docs.initrepo.com/llms.txt
Use this file to discover all available pages before exploring further.
π API Now AvailableThe InitRepo REST API is now live and provides programmatic access to AI-powered project generation with credit-based billing.
Overview
The InitRepo API provides comprehensive programmatic access to AI-powered project generation capabilities:Key Features
- AI-Powered Generation: Create comprehensive software project documentation automatically
- Credit-Based Billing: Transparent pricing with automatic refunds for failed generations
- Async Processing: Non-blocking project generation with status polling
- Webhook Support: Real-time notifications for project completion
- Enterprise Security: Multiple layers of security including XSS protection and SSRF prevention
Base Information
| Property | Value |
|---|---|
| Base URL | https://api.initrepo.com/v1 (production)https://dev-api.initrepo.com/v1 (development) |
| Protocol | HTTPS (TLS 1.3+) |
| Authentication | Bearer token with API keys |
| Rate Limiting | 100 requests per minute per API key |
| Content-Type | application/json |
| Credit Cost | 15,000 credits per project generation |
| API Version | v1.0 (current stable) |
| Interactive Docs | Swagger UI |
API Versioning
InitRepo API uses semantic versioning to ensure backward compatibility and smooth upgrades:Version Methods
You can specify the API version using any of these methods:1. URL-based Versioning (Recommended)
2. Accept Header
3. API-Version Header
Supported Versions
| Version | Status | Support Level | Sunset Date |
|---|---|---|---|
| v1.0 | Current | Full support | - |
| v1.1 | Future | Not available | - |
| v2.0 | Future | Not available | - |
Version Headers
All API responses include versioning information:Authentication
API Keys
InitRepo uses Bearer token authentication with cryptographically secure API keys:Live Keys (ir_live_*)
- Format:
ir_live_[32-character-string] - Usage: Production environment, consumes actual credits
- Cost: 15,000 credits per project generation
- Limit: Maximum 3 keys per user
Test Keys (ir_test_*)
- Format:
ir_test_[32-character-string] - Usage: Development/testing environment
- Cost: Free (no credits consumed)
- Limit: Maximum 3 keys per user
Authentication Errors
| Error Code | Status | Description | Resolution |
|---|---|---|---|
AUTHENTICATION_FAILED | 401 | Invalid or missing API key | Check your API key format and validity |
MAX_KEYS_REACHED | 403 | Maximum API keys limit reached | Delete unused keys before creating new ones |
Best Practices
- Rotate Keys Regularly: Update API keys periodically for security
- Use Test Keys: Always test with
ir_test_*keys before going live - Secure Storage: Never commit API keys to version control
- Monitor Usage: Track API key usage through the dashboard
Core Endpoints
Create Project
Get Project Status
Rate Limits
The API enforces rate limits to ensure fair usage and system stability:- Requests per Minute: 100 per API key
- Credit Cost: 15,000 credits per project
- Test Mode: Free access with test keys
Rate Limit Headers
All API responses include rate limiting information:Handling Rate Limits
When you exceed the rate limit, youβll receive a429 Too Many Requests response:
Best Practices
- Monitor Headers: Check
X-RateLimit-Remainingto avoid hitting limits - Implement Backoff: Use exponential backoff when approaching limits
- Batch Operations: Combine multiple operations when possible
Error Handling
The InitRepo API uses standardized error responses with consistent structure and helpful debugging information.Error Response Format
All errors follow this consistent format:Standard Error Codes
| Code | Status | Description | Resolution |
|---|---|---|---|
AUTHENTICATION_FAILED | 401 | Invalid or missing API key | Verify API key format and validity |
RATE_LIMIT_EXCEEDED | 429 | Too many requests | Wait for rate limit reset |
INVALID_JSON | 400 | Malformed JSON in request body | Check JSON syntax and structure |
VALIDATION_ERROR | 422 | Request data validation failed | Review field requirements and formats |
RESOURCE_NOT_FOUND | 404 | Requested resource doesnβt exist | Check resource ID and permissions |
SECURITY_VIOLATION | 403 | Request blocked for security | Review request content and patterns |
INTERNAL_ERROR | 500 | Server-side processing error | Contact support with request ID |
Error Handling Best Practices
1. Check the Status Code
2. Use Request IDs for Support
Always include therequest_id when contacting support:
3. Implement Proper Retry Logic
Common Error Scenarios
Authentication Errors
Validation Errors
Use Cases
Automation & CI/CD
- Automated Documentation: Generate project docs as part of your development workflow
- Quality Assurance: Ensure comprehensive documentation for all projects
- Version Control: Keep documentation in sync with code changes
Custom Integrations
- Project Management: Sync with Jira, Linear, or custom PM tools
- AI Workflows: Use generated documentation to power custom AI tools
- Reporting: Build custom dashboards and analytics
Enterprise Workflows
- Bulk Operations: Manage multiple projects across teams
- Custom Templates: Apply organization-specific documentation standards
- Compliance: Meet regulatory requirements through standardized processes
SDKs & Libraries
Official SDKs are available for popular languages:- JavaScript/TypeScript -
npm install initrepo-api - Python -
pip install initrepo-api - Go -
go get github.com/initrepo/initrepo-go - Java - Maven/Gradle packages available
Getting Started
- Get API Keys: Sign up at https://initrepo.com and generate API keys
- Test Integration: Use test keys (
ir_test_*) for development - Go Live: Switch to live keys (
ir_live_*) for production
Need Help?Join our Discord community for support, or check out the detailed endpoint documentation below.