Skip to main content
Create a new index and persist its artifacts for later retrieval. Additional body fields
FieldTypeRequiredNotes
docsobject[]Array of documents. Each document must include id and text; you may optionally supply metadata (key-value pairs).
modelIdstring◻️Defaults to moss-minilm. Other options include moss-mediumlm.
Example request
curl -X POST "https://service.usemoss.dev/manage" \
  -H "Content-Type: application/json" \
  -H "x-service-version: v1" \
  -H "x-project-key: moss_access_key_xxxxx" \
  -d '{
    "action": "createIndex",
    "projectId": "project_123",
    "indexName": "support-faq",
    "modelId": "moss-minilm",
    "docs": [
      { "id": "faq-001", "text": "How do I reset my password?", "metadata": { "category": "account" } },
      { "id": "faq-002", "text": "Where can I download invoices?" }
    ]
  }'
Responses
true
Errors
  • 400 when any required field is missing.
  • 404 if the project does not exist.
  • 500 on unexpected storage or indexing failures.