Welcome to Moorcheh API
The Moorcheh API provides powerful vector and text search capabilities through a simple and intuitive REST API. Our API allows you to create namespaces, upload text or vector data, and perform semantic searches with high accuracy and low latency.Base URL
All API endpoints are accessible at:Authentication
The Moorcheh API uses API key authentication. You must include your API key in thex-api-Key header with every request.
The header name is
x-api-Key with a capital K. This is case-sensitive.Get Your API Key
1
Sign Up
Create your account at console.moorcheh.ai
2
Generate API Key
Navigate to the API Keys section and generate a new key
3
Store Securely
Copy and securely store your API key
Authentication Header
Example Request
API Endpoints
Namespace Management
Create, list, and delete namespaces
Search & Discovery
Perform semantic search across namespaces
AI Generation
Generate AI-powered answers from your data
Data Operations
Upload and manage text or vector data
Basic Workflow
1
Authenticate
Include your API key in the
x-api-Key header2
Create a Namespace
Create a namespace to organize your data (text or vector type)
3
Upload Data
Upload text documents or vector embeddings to your namespace
4
Search
Perform semantic search to retrieve relevant data
5
Generate Answers
Use AI models to generate contextual answers from your data
Error Responses
The API uses standard HTTP status codes:| Status Code | Meaning | Description |
|---|---|---|
| 200 | OK | Request succeeded |
| 201 | Created | Resource created successfully |
| 202 | Accepted | Request accepted for processing |
| 400 | Bad Request | Invalid request parameters |
| 401 | Unauthorized | Invalid or missing API key |
| 403 | Forbidden | Insufficient permissions |
| 404 | Not Found | Resource not found |
| 409 | Conflict | Resource already exists |
| 413 | Payload Too Large | File exceeds size limit (10MB) |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Server-side error |
Error Response Format
Security Best Practices
Store API Keys Securely
Store API Keys Securely
- Use environment variables instead of hardcoding
- Never commit API keys to version control
- Use secret management services in production
Use HTTPS Only
Use HTTPS Only
All API requests must use HTTPS. HTTP requests will be rejected.
Rotate Keys Regularly
Rotate Keys Regularly
- Generate new API keys periodically
- Revoke old keys after rotation
- Monitor key usage in your console
Implement Rate Limiting
Implement Rate Limiting
- Add exponential backoff for retries
- Monitor API usage
- Implement client-side throttling
Validate Inputs
Validate Inputs
- Sanitize user inputs before searching
- Validate metadata formats
- Check file types before upload
Rate Limits
API keys are subject to rate limiting based on your subscription tier. If you exceed your rate limit, you’ll receive a429 Too Many Requests response.
Contact support@moorcheh.ai for information about rate limits and enterprise plans.
SDKs and Integrations
Python SDK
Official Python SDK with full API coverage
LangChain
Vector store integration for LangChain
LlamaIndex
Native LlamaIndex vector store support
MCP Server
Model Context Protocol integration
Chat Boilerplate
Ready-to-use chat application