Endpoints reference

Every generation endpoint follows the same contract — POST JSON with an idea string and optional upstream artefacts, receive a { data, meta } envelope. Base URL: https://www.planmysaas.com/api/v1.

POST /mcp/generate/research

Market research for a product idea. 25 credits.

Request body

{
  "idea":    "A quiet-hours SMS scheduler for solo SaaS founders",  // required, 10-2000 chars
  "context": "Target market: IN + US; bootstrap solo founders"      // optional
}

Response data shape

{
  "summary": string,
  "marketSize": { "tam": string, "sam": string, "som": string, "reasoning": string },
  "audience":   [ { "segment": string, "painPoints": string[], "willingness": string } ],
  "competitors":[ { "name": string, "positioning": string, "gap": string } ],
  "trends":     string[],
  "risks":      string[],
  "unitEconomics": { "model": string, "estimatedLTV": string, "estimatedCAC": string, "grossMargin": string },
  "recommendation": string
}

POST /mcp/generate/architecture

Production-grade system architecture. 20 credits. Pass the research output as research for coherence.

Request body

{
  "idea":         "…",
  "context":      "…" ,  // optional
  "research":     { ... } // optional — output of /generate/research
}

Response data shape

{
  "summary": string,
  "nodes":   [ { "label": string, "type": "frontend|backend|database|auth|queue|storage|cache|ai|gateway|external",
                 "description": string, "tech": string } ],
  "edges":   [ { "from": string, "to": string, "protocol": string, "purpose": string } ],
  "techStack": [ { "category": string, "choice": string, "rationale": string } ],
  "dataModel": [ { "entity": string, "fields": string[], "relationships": string[] } ],
  "securityBoundaries": [ { "name": string, "protects": string, "mechanism": string } ],
  "scalingStrategy": string,
  "estimatedMonthlyCost": { "users1k": string, "users10k": string, "users100k": string }
}

POST /mcp/generate/features

Prioritised feature specs with user stories, API surface, and effort estimates. 25 credits. Optionally pass research + architecture for deeper context.

Request body

{
  "idea":         "…",
  "context":      "…",
  "research":     { ... },  // optional
  "architecture": { ... }   // optional
}

Response data shape

{
  "summary": string,
  "features": [ {
    "name":        string,
    "priority":    "P0|P1|P2|P3",
    "description": string,
    "userStories": string[],
    "acceptanceCriteria": string[],
    "apiSurface":  [ { "method": string, "path": string, "purpose": string } ],
    "dataImpact":  string,
    "edgeCases":   string[],
    "estimatedEffort": "XS|S|M|L|XL"
  } ]
}

POST /mcp/generate/phases

3-5 shipping phases with deliverables, success metrics, and realistic timeline. 15 credits.

Request body

{
  "idea":     "…",
  "context":  "…",
  "features": { ... }   // optional but recommended
}

Response data shape

{
  "summary": string,
  "phases": [ {
    "name":           string,   // e.g. "Phase 1: MVP"
    "duration":       string,   // e.g. "4 weeks"
    "goal":           string,
    "features":       string[],
    "deliverables":   string[],
    "risks":          string[],
    "successMetrics": string[]
  } ],
  "totalTimeline": string
}

POST /mcp/generate/prompt-pack

Cursor / Claude Code ready prompt pack with setup prompt + 10-20 paste-ready prompts. 30 credits. Starter+ plan.

Request body

{
  "idea":         "…",
  "context":      "…",
  "architecture": { ... },  // optional
  "features":     { ... }   // optional
}

Response data shape

{
  "summary":     string,
  "setupPrompt": string,
  "prompts": [ {
    "name":           string,
    "category":       "scaffolding|feature|ui|backend|test|polish",
    "prompt":         string,
    "expectedOutput": string,
    "dependencies":   string[]
  } ]
}

POST /mcp/generate/blueprint

One-shot full pipeline — research → architecture → features → phases → prompt pack. 150 credits. Starter+ plan. Takes 2-4 minutes; allow for 5-minute client timeout.

Request body

{
  "idea":    "…",
  "context": "…"
}

Response data shape

{
  "idea":         string,
  "research":     { ... },
  "architecture": { ... },
  "features":     { ... },
  "phases":       { ... },
  "promptPack":   { ... },
  "generatedAt":  string    // ISO-8601
}

GET /mcp/credits

Check your workspace credit balance + plan tier. Free — no credits debited.

Response data shape

{
  "workspaceId":     string,
  "workspaceName":   string,
  "credits":         number,   // balance
  "plan":            "free|starter|pro|team",
  "planLabel":       string,
  "creditsPerCycle": number    // monthly allowance for paid plans
}

Worked example — chained pipeline

Pass upstream output as context to each next call. This is what the MCP server does under the hood; here it's spelled out in plain HTTP:

# Step 1 — research
RESEARCH=$(curl -s -X POST .../generate/research \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d '{"idea":"Quiet-hours SMS scheduler for solo founders"}' | jq .data)

# Step 2 — architecture with research as context
ARCH=$(curl -s -X POST .../generate/architecture \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d "{\"idea\":\"Quiet-hours SMS scheduler…\",\"research\":$RESEARCH}" | jq .data)

# Step 3 — features, wiring in both upstream artefacts
FEATURES=$(curl -s -X POST .../generate/features \
  -H "X-API-Key: $KEY" -H "Content-Type: application/json" \
  -d "{\"idea\":\"…\",\"research\":$RESEARCH,\"architecture\":$ARCH}" | jq .data)

Standard headers on every response

  • X-Request-Id — echo or generate per request. Include when filing support tickets.
  • X-Credits-Charged — credits deducted on this call (0 for read endpoints).
  • X-Credits-Remaining — workspace balance after the call.

See also: error codes, rate limits.