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

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

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

Need Help?