API
Reference for the StackPilot analysis endpoint: request format, response schema, and error handling.
The StackPilot analysis API powers the search experience. It accepts a project description and returns a ranked technology stack.
Endpoint
bash
POST /api/analyze
Content-Type: application/jsonRequest body
json
{
"description": "I want to build a YouTube clone"
}Example request
bash
curl -X POST https://get-stack.vercel.app/api/analyze \
-H "Content-Type: application/json" \
-d '{"description": "I want to build a YouTube clone"}';Response schema
json
{
"query": "I want to build a YouTube clone",
"categories": [
{
"id": "authentication",
"name": "Authentication",
"providers": [
{
"name": "Clerk",
"rank": 1,
"description": "Drop-in auth with OAuth and session management.",
"bestUseCases": ["User login", "Multi-tenant SaaS"],
"website": "https://clerk.com"
}
]
}
]
}Errors
- 400 — the description is empty or too short.
- 502 — the AI provider could not be reached. Try again shortly.
- 500 — an unexpected server error occurred.