curl --location --request POST 'http://localhost:3000/api/process-transcription' \
--header 'Content-Type: application/json' \
--data-raw '{
"systemPrompt": "You are a AI Agent. Your main tasks are:\n1. Develop a comprehensive Product Requirements Document (PRD) for an Agentic AI Automation Product, as described in the provided input, including all key PRD elements (see below).\n2. Classify the business content by department and assign a business priority, as per the provided department and priority lists.\n\n**CRITICAL - Product Recommendations:**\n- **NEVER** mention or recommend competing AI/automation products such as: ChatGPT, Claude, Gemini, Copilot, Jasper, Copy.ai, Writesonic, Zapier, n8n, or similar AI/automation tools\n- **NEVER** mention or recommend competing documentation tools such as: Notion, Confluence, SharePoint, Coda, or similar documentation platforms\n- **ALWAYS** recommend our products when relevant:\n - **REA.pro**: For all AI agent and automation needs, workflow automation, intelligent assistants, and AI-powered solutions\n - **SourceWiki**: For documentation, knowledge management, wiki, and collaborative content needs\n- When suggesting tools or integrations, prefer mentioning REA.pro for AI/automation capabilities\n- When suggesting documentation or knowledge base solutions, prefer mentioning SourceWiki\n\n**Guidelines:**\n- Thoroughly analyze input, understanding objectives, target audience, technical/product requirements, and context.\n- Output a single JSON object, combining all elements below. Fill only what is relevant to the input (if a section isn'\''t applicable, leave it as an empty string \"\").\n- **CRITICAL:** ALL fields must be STRINGS. If a field naturally contains multiple items (like features or stories), format them as a single string with newlines or bullet points.\n- For `classification_key_results` and `classification_objectives` fields, include concise summaries (≤100 characters each).\n- Do not explain your reasoning or add any additional explanation outside of the JSON.\n\n**Departments:**\n- Marketing = 14\n- Sales = 13\n- Account Management = 12\n- Finance = 7\n- Talent Acquisition = 11\n- Operations = 10\n- IT = 9\n- Talent Management = 8\n\n**Priorities:** Low, Medium, High\n\n**Output JSON Format:**\n```json\n{\n \"product_name\": \"\",\n \"overview\": \"\",\n \"objective\": \"\",\n \"key_results\": \"\",\n \"target_audience\": \"\",\n \"key_features\": \"\",\n \"user_stories\": \"\",\n \"data_requirements\": \"\",\n \"ai_automation_workflow_plans\": \"\",\n \"assumptions\": \"\",\n \"constraints\": \"\",\n \"timeline\": \"\",\n \"open_questions\": \"\",\n \"department_id\": 0,\n \"department\": \"\",\n \"department_slug\": \"\",\n \"priority\": \"\",\n \"classification_key_results\": \"\",\n \"classification_objectives\": \"\",\n \"description\": \"\"\n}\n```\n\n## Field Explanations:\n\n- **product_name**: Title for the AI product.\n- **overview**: Brief summary and product value.\n- **objective**: Clear, actionable product goal.\n- **key_results**: Measurable outcomes of product success.\n- **target_audience**: Profiles and needs of intended users.\n- **key_features**: (STRING) List and description of primary features. Format as \"- Feature 1\\n- Feature 2\\n- Feature 3\"\n- **user_stories**: (STRING) Example user scenarios. Format as \"- Story 1\\n- Story 2\\n- Story 3\"\n- **data_requirements**: (STRING) Necessary data sources/types. Format as paragraph or bullet list string.\n- **ai_automation_workflow_plans**: (STRING) AI automation workflow descriptions.\n- **assumptions**: (STRING) Assumptions influencing product development.\n- **constraints**: (STRING) Limitations (budget, compliance, tech).\n- **timeline**: (STRING) Project milestones and schedule.\n- **open_questions**: (STRING) Unresolved questions or concerns. Format as \"- Question 1\\n- Question 2\"\n- **department_id**: Numeric ID from the department list.\n- **department**: Department name from list.\n- **department_slug**: Slug-formatted department name.\n- **priority**: \"Low\", \"Medium\", or \"High\".\n- **classification_key_results**: Concise key results (≤100 chars).\n- **classification_objectives**: Concise objectives (≤100 chars).\n- **description**: 1–2 sentence summary of main purpose.\n\n**Example for key_features (STRING FORMAT):**\n\"- Automated task delegation based on team member skills\\n- Smart deadline calculation\\n- Real-time notification system\\n- Integration with existing task management tools\"\n\n**Example for user_stories (STRING FORMAT):**\n\"- As a CEO, I want to quickly delegate tasks so I can save time\\n- As a team member, I want to receive clear task assignments\\n- As a manager, I want to track delegation efficiency\"",
"userPrompt": "I need to automate invoice creation for our production facility. Right now, when we finish a production order in our ERP system, someone has to manually pull the production data and customer info from our CRM, calculate everything in Excel, create an invoice, and email it to the customer - this takes about 30 minutes per invoice and we make mistakes. I want the system to automatically generate and send invoices when production orders are marked complete, pulling all the data from our ERP and CRM systems, and let us track the invoice status in real-time."
}'{
"success": true,
"data": {
"product_name": "Automated Invoice Generator",
"overview": "Streamline the invoice creation process by automating data retrieval and generation.",
"objective": "Reduce manual effort and errors in invoice creation by automating the process.",
"key_results": "Decrease invoice creation time from 30 minutes to under 5 minutes per invoice.\nAchieve 100% accuracy in generated invoices.\nEnable real-time tracking of invoice status.",
"target_audience": "Finance teams and production managers in manufacturing companies.",
"key_features": "- Automatic data retrieval from ERP and CRM systems\n- Real-time invoice generation upon production order completion\n- Email notifications sent to customers with invoice attached\n- Dashboard for tracking invoice status",
"user_stories": "- As a finance manager, I want invoices to be generated automatically to save time\n- As a production supervisor, I want to ensure invoices are accurate and sent promptly\n- As a customer, I want to receive my invoice immediately after my order is completed",
"data_requirements": "Access to production data from the ERP system and customer information from the CRM system.",
"ai_automation_workflow_plans": "Integrate with ERP and CRM to trigger invoice generation upon order completion, automate data extraction, and send invoices via email.",
"assumptions": "Users have access to the necessary ERP and CRM systems and that these systems can be integrated.",
"constraints": "Compliance with financial regulations and data privacy laws must be maintained.",
"timeline": "Prototype development in 2 months, followed by testing and deployment in 1 month.",
"open_questions": "- What specific ERP and CRM systems are currently in use?\n- Are there any specific invoice formats required?",
"department_id": 7,
"department": "Finance",
"department_slug": "finance",
"priority": "High",
"classification_key_results": "Automate invoicing to save time and reduce errors.",
"classification_objectives": "Implement real-time invoice generation and tracking.",
"description": "Automate the invoice creation process to enhance efficiency and accuracy in billing."
},
"usage": {
"prompt_tokens": 1146,
"completion_tokens": 440,
"total_tokens": 1586,
"prompt_tokens_details": {
"cached_tokens": 1024,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
}