- Endpoint:
POST /api/research - Description: Triggers a new research job.
- Body:
{ "keywords": "string", "criteria": ["string" | object], "apiKeys": { "groq": "string", "tavily": "string" }, "model": "string" } - Response:
{ "jobId": "string", "success": true }
- Endpoint:
GET /api/research/status?jobId={jobId} - Description: Polls the current status, progress, and logs of a job.
- Response:
{ "jobId": "string", "status": "processing" | "completed" | "failed", "progress": number, "logs": [{ "message": "string", "timestamp": number }], "result": object (if completed) }
- Endpoint:
POST /api/research/extended - Description: Starts a research job that includes a human-in-the-loop selection step.
- Body: (Same as Start Research)
- Endpoint:
POST /api/research/extended/selection - Description: Submits the user's selected links to proceed with the extended research.
- Body:
{ "jobId": "string", "selectedLinks": ["url1", "url2"] }
- Endpoint:
POST /api/vector-store - Description: Queues a batch embedding job.
- Body:
{ "text": "Large text content...", "mixedbreadKey": "mxb_...", "pineconeKey": "pc_...", "pineconeIndex": "index-name" }
- Endpoint:
POST /api/inngest - Description: The entry point for Inngest executors. Not for manual consumption.
- Endpoint:
/api/auth/* - Description: Handled by NextAuth.js for user session management.