Prompt
Stack
Library
Templates
Help
Loading...
API Overview
API Endpoints
Available endpoints and Server Actions in PromptStack.
GET
/api/prompts
Fetches all saved prompts with optional search query and category filters.
GET
/api/prompts/:id
Retrieves a single prompt document by its MongoDB ObjectId.
POST
/api/prompts
Creates a new prompt and automatically extracts variable placeholders from the template.
PUT
/api/prompts/:id
Updates an existing prompt document by ID and re-extracts variables.
POST
/api/prompts/:id/run
Hydrates variables and executes the prompt against Gemini or Groq.
GET
/api/stats
Returns workspace metrics: prompt counts, template counts, total runs, and connected providers.
GET
/api/templates
Fetches public templates with optional search and category filters.
GET
/api/templates/:id
Retrieves a single public template document by ID.
POST
/api/templates/:id/fork
Forks a public template into your prompt library and increments usage stats.
POST
/api/templates
Saves a new template to the community repository.
POST
/api/templates/seed
Seeds the database with initial templates if the collection is empty.