Skip to main content
POST
https://api.moorcheh.ai
/
v1
/
namespaces
curl -X POST "https://api.moorcheh.ai/v1/namespaces" \
  -H "Content-Type: application/json" \
  -H "x-api-Key: your-api-key-here" \
  -d '{
    "namespace_name": "my-documents",
    "type": "text"
  }'
{
  "status": "success",
  "message": "Namespace 'my-documents' created successfully. ✅",
  "namespace_name": "my-documents"
}

Overview

Create a new namespace to organize and store your data. Namespaces provide isolated environments for your documents or vectors, ensuring data separation and enabling organized data management.
Namespace names must be unique within your account and can only contain alphanumeric characters, hyphens, and underscores.

Authentication

x-api-Key
string
required
Your API key for authentication
Content-Type
string
required
Must be application/json

Body

namespace_name
string
required
Unique name for the namespace (alphanumeric, hyphens, underscores only)
type
string
required
Namespace type: “text” or “vector”
vector_dimension
number
Required for vector namespaces. Dimension of vectors to be stored (e.g., 1536 for OpenAI embeddings)
curl -X POST "https://api.moorcheh.ai/v1/namespaces" \
  -H "Content-Type: application/json" \
  -H "x-api-Key: your-api-key-here" \
  -d '{
    "namespace_name": "my-documents",
    "type": "text"
  }'
{
  "status": "success",
  "message": "Namespace 'my-documents' created successfully. ✅",
  "namespace_name": "my-documents"
}

Next Steps

After creating a namespace, you can:

Important Notes

  • Namespace type cannot be changed after creation
  • Vector dimension must be specified for vector namespaces and cannot be modified
  • Namespace creation counts toward your tier limits
  • Namespace names must be unique within your account