Skip to main content

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:
https://api.moorcheh.ai/v1

Authentication

The Moorcheh API uses API key authentication. You must include your API key in the x-api-key header with every request.
The header name is x-api-key (all lowercase).

Request/Response Naming

Use snake_case for request and response fields (for example: top_k, kiosk_mode, namespace_name). Legacy camelCase is still supported for backward compatibility on public endpoints, but returns deprecation headers: Deprecation, Sunset, and Warning. CamelCase support is deprecated and scheduled for removal on 1 May 2026.

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

x-api-key: your-api-key-here

Example Request

curl -X GET "https://api.moorcheh.ai/v1/namespaces" \
  -H "x-api-key: your-api-key-here" \
  -H "Content-Type: application/json"

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 header
2

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 CodeMeaningDescription
200OKRequest succeeded
201CreatedResource created successfully
202AcceptedRequest accepted for processing
400Bad RequestInvalid request parameters
401UnauthorizedInvalid or missing API key
403ForbiddenInsufficient permissions
404Not FoundResource not found
409ConflictResource already exists
413Payload Too LargeFile exceeds size limit (10MB)
429Too Many RequestsRate limit exceeded
500Internal Server ErrorServer-side error

Error Response Format

{
  "error": "Error description",
  "message": "Detailed error message"
}

Security Best Practices

  • Use environment variables instead of hardcoding
  • Never commit API keys to version control
  • Use secret management services in production
# Good: Use environment variables
export MOORCHEH_API_KEY="your-api-key"
All API requests must use HTTPS. HTTP requests will be rejected.
  • Generate new API keys periodically
  • Revoke old keys after rotation
  • Monitor key usage in your console
  • Add exponential backoff for retries
  • Monitor API usage
  • Implement client-side throttling
  • 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 a 429 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

Need Help?

Quick Start

Get started in 5 minutes

Guides

Learn core concepts

Support

Contact our team

GitHub

View open-source SDKs