curl -X POST "https://api.moorcheh.ai/v1/answer" \ -H "Content-Type: application/json" \ -H "x-api-key: your-api-key-here" \ -d '{ "namespace": "my-document-collection", "query": "What are the main benefits of Moorcheh?", "type": "text", "top_k": 5 }'
Copy
{ "answer": "Serverless architecture offers several benefits, including reduced operational costs as you only pay for what you use, automatic scaling to handle workload changes, and faster time-to-market since developers can focus on code instead of infrastructure management.", "model": "anthropic.claude-3-sonnet-20240229-v1:0", "contextCount": 3, "query": "What are the main benefits of using serverless architecture?"}
AI Generation
Generate AI Answer
Generate AI-powered answers to questions using your uploaded data as context or direct AI model calls.
POST
https://api.moorcheh.ai
/
v1
/
answer
Copy
curl -X POST "https://api.moorcheh.ai/v1/answer" \ -H "Content-Type: application/json" \ -H "x-api-key: your-api-key-here" \ -d '{ "namespace": "my-document-collection", "query": "What are the main benefits of Moorcheh?", "type": "text", "top_k": 5 }'
Copy
{ "answer": "Serverless architecture offers several benefits, including reduced operational costs as you only pay for what you use, automatic scaling to handle workload changes, and faster time-to-market since developers can focus on code instead of infrastructure management.", "model": "anthropic.claude-3-sonnet-20240229-v1:0", "contextCount": 3, "query": "What are the main benefits of using serverless architecture?"}
Generate AI-powered answers to questions with two modes: Search Mode (with namespace) and Direct AI Mode (empty namespace). The API supports context-aware generation using your data or direct AI model calls.
Supports multiple AI models including Claude 3.7 Sonnet, Claude Sonnet 4, Llama 4 Maverick, and DeepSeek-R1. Use empty string "" as namespace for direct AI calls.
Empty Namespace Mode: Only these fields are allowed: namespace, query, temperature, chatHistory, footerPrompt, headerPrompt, aiModelProvided Namespace Mode: All fields are allowed: namespace, query, top_k, threshold, type, kiosk_mode, aiModel, chatHistory, headerPrompt, footerPrompt, temperature
Copy
curl -X POST "https://api.moorcheh.ai/v1/answer" \ -H "Content-Type: application/json" \ -H "x-api-key: your-api-key-here" \ -d '{ "namespace": "my-document-collection", "query": "What are the main benefits of Moorcheh?", "type": "text", "top_k": 5 }'
Copy
{ "answer": "Serverless architecture offers several benefits, including reduced operational costs as you only pay for what you use, automatic scaling to handle workload changes, and faster time-to-market since developers can focus on code instead of infrastructure management.", "model": "anthropic.claude-3-sonnet-20240229-v1:0", "contextCount": 3, "query": "What are the main benefits of using serverless architecture?"}