curl https://api.initrepo.com/v1/projects/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer ir_live_your_api_key" \
-H "API-Version: v1.0"
{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "in_progress",
"estimatedCompletionMs": 120000
}
}
HTTP/1.1 200 OK
API-Version: v1.0
API-Supported-Versions: v1.0
API-Latest-Version: v1.0
X-Request-ID: req_1234567890
X-RateLimit-Remaining: 98
X-RateLimit-Reset: 1699123456
Endpoints
Get Project Status
Retrieves the current status of a project and returns results when complete.
GET
/
api
/
v1
/
projects
/
{projectId}
curl https://api.initrepo.com/v1/projects/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer ir_live_your_api_key" \
-H "API-Version: v1.0"
{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "in_progress",
"estimatedCompletionMs": 120000
}
}
HTTP/1.1 200 OK
API-Version: v1.0
API-Supported-Versions: v1.0
API-Latest-Version: v1.0
X-Request-ID: req_1234567890
X-RateLimit-Remaining: 98
X-RateLimit-Reset: 1699123456
Retrieve the current status of a project and get results when generation is complete.
Request
curl https://api.initrepo.com/v1/projects/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer ir_live_your_api_key" \
-H "API-Version: v1.0"
Path Parameters
string
required
The unique identifier of the project to retrieve.
Response - In Progress
{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "in_progress",
"estimatedCompletionMs": 120000
}
}
Response Headers:
HTTP/1.1 200 OK
API-Version: v1.0
API-Supported-Versions: v1.0
API-Latest-Version: v1.0
X-Request-ID: req_1234567890
X-RateLimit-Remaining: 98
X-RateLimit-Reset: 1699123456
Response - Completed
{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "completed",
"project": {
"name": "AI-Commerce Platform",
"description": "Modern e-commerce platform with AI-powered recommendations",
"type": "web",
"questionnaire": {
"targetAudience": "Small to medium online retailers",
"monetization": "SaaS subscription model",
"techStack": ["React", "Node.js", "PostgreSQL", "Redis"]
},
"documents": [
{
"type": "README",
"filename": "README.md",
"content": "# AI-Commerce Platform\n\nA modern e-commerce solution...",
"generated_at": "2024-01-15T10:30:00Z",
"stage": "project-brief",
"tokens_used": 1200
},
{
"type": "Product Requirements",
"filename": "PRD.md",
"content": "# Product Requirements Document\n\n## Overview...",
"generated_at": "2024-01-15T10:32:00Z",
"stage": "requirements",
"tokens_used": 2100
}
]
},
"metadata": {
"creditsConsumed": 15000,
"generationTimeMs": 165000,
"documentsGenerated": 10
}
}
}
Response - Failed
{
"success": true,
"data": {
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"status": "failed",
"error": {
"code": "generation_failed",
"message": "Project generation failed due to AI service timeout. Credits refunded."
}
}
}
Response Fields
boolean
Indicates if the request was successful.
string
Unique identifier of the project.
string
Current status of the project. Values:
in_progress, completed, failed.integer
Estimated time remaining in milliseconds (only present when in_progress).
object
Complete project data (only present when completed).
string
Generated project name.
string
Generated project description.
string
Project type (web, mobile, mcp).
object
AI-generated project questionnaire data.
array
Array of generated documents.
string
Document type (README, Product Requirements, etc.).
string
Document filename.
string
Document content in markdown format.
string
ISO 8601 timestamp of document generation.
string
Generation stage (project-brief, requirements, etc.).
integer
AI tokens used to generate this document.
object
Generation metadata (only present when completed).
integer
Total credits consumed for this project.
integer
Total time spent generating in milliseconds.
integer
Number of documents generated.
object
Error details (only present when failed).
string
Error code identifier.
string
Human-readable error message.
Error Responses
Not Found Error (404)
Authentication Error (401)
Rate Limit Exceeded (429)
Rate Limits
This endpoint is rate limited to 100 requests per minute per API key.Usage Notes
- Polling: For in-progress projects, poll this endpoint every 10-30 seconds
- Exponential Backoff: Implement exponential backoff for failed requests
- Caching: Cache completed project data to avoid unnecessary API calls
- Error Handling: Always handle rate limiting (429) and authentication errors (401)
Authorizations
Bearer token authentication using API keys (ir_live_* or ir_test_*)
Path Parameters
The unique identifier of the project