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

projectId
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 - 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

success
boolean
Indicates if the request was successful.
data.projectId
string
Unique identifier of the project.
data.status
string
Current status of the project. Values: in_progress, completed, failed.
data.estimatedCompletionMs
integer
Estimated time remaining in milliseconds (only present when in_progress).
data.project
object
Complete project data (only present when completed).
data.project.name
string
Generated project name.
data.project.description
string
Generated project description.
data.project.type
string
Project type (web, mobile, mcp).
data.project.questionnaire
object
AI-generated project questionnaire data.
data.project.documents
array
Array of generated documents.
data.project.documents[].type
string
Document type (README, Product Requirements, etc.).
data.project.documents[].filename
string
Document filename.
data.project.documents[].content
string
Document content in markdown format.
data.project.documents[].generated_at
string
ISO 8601 timestamp of document generation.
data.project.documents[].stage
string
Generation stage (project-brief, requirements, etc.).
data.project.documents[].tokens_used
integer
AI tokens used to generate this document.
data.metadata
object
Generation metadata (only present when completed).
data.metadata.creditsConsumed
integer
Total credits consumed for this project.
data.metadata.generationTimeMs
integer
Total time spent generating in milliseconds.
data.metadata.documentsGenerated
integer
Number of documents generated.
data.error
object
Error details (only present when failed).
data.error.code
string
Error code identifier.
data.error.message
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

Authorization
string
header
required

Bearer token authentication using API keys (ir_live_* or ir_test_*)

Path Parameters

projectId
string<uuid>
required

The unique identifier of the project

Response

Project status retrieved successfully

success
boolean
Example:

true

data
object