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.
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
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 - 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
Indicates if the request was successful.
Unique identifier of the project.
Current status of the project. Values: in_progress, completed, failed.
data.estimatedCompletionMs
Estimated time remaining in milliseconds (only present when in_progress).
Complete project data (only present when completed).
Generated project description.
Project type (web, mobile, mcp).
data.project.questionnaire
AI-generated project questionnaire data.
Array of generated documents.
data.project.documents[].type
Document type (README, Product Requirements, etc.).
data.project.documents[].filename
Document filename.
data.project.documents[].content
Document content in markdown format.
data.project.documents[].generated_at
ISO 8601 timestamp of document generation.
data.project.documents[].stage
Generation stage (project-brief, requirements, etc.).
data.project.documents[].tokens_used
AI tokens used to generate this document.
Generation metadata (only present when completed).
data.metadata.creditsConsumed
Total credits consumed for this project.
data.metadata.generationTimeMs
Total time spent generating in milliseconds.
data.metadata.documentsGenerated
Number of documents generated.
Error details (only present when failed).
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)
Bearer token authentication using API keys (ir_live_* or ir_test_*)
The unique identifier of the project
Project status retrieved successfully