Skip to main content
🚀 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

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:

2. Accept Header

3. API-Version Header

Supported Versions

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
API Key LimitsEach user can create a maximum of 3 API keys (combined live and test keys). This production limit ensures security and proper usage monitoring. If you reach this limit, you’ll need to delete existing keys before creating new ones.

Authentication Errors

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 a 429 Too Many Requests response:

Best Practices

  • Monitor Headers: Check X-RateLimit-Remaining to 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

Error Handling Best Practices

1. Check the Status Code

2. Use Request IDs for Support

Always include the request_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

  1. Get API Keys: Sign up at https://initrepo.com and generate API keys
  2. Test Integration: Use test keys (ir_test_*) for development
  3. 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.