Skip to main content
Initialize an upload session for creating a new index. Returns a presigned URL where you can upload your pre-computed index data, along with a jobId to use with startBuild once the upload completes. Required fields: indexName, modelId, docCount, dimension
FieldTypeRequiredNotes
indexNamestringName for the new index.
modelIdstringEmbedding model identifier (e.g. moss-minilm).
docCountintegerTotal number of documents being uploaded.
dimensionintegerEmbedding vector dimension (e.g. 384 for moss-minilm).
Example request
curl -X POST "https://service.usemoss.dev/v1/manage" \
  -H "Content-Type: application/json" \
  -H "x-service-version: v1" \
  -H "x-project-key: moss_access_key_xxxxx" \
  -d '{
    "action": "initUpload",
    "projectId": "project_123",
    "indexName": "support-faq",
    "modelId": "moss-minilm",
    "docCount": 2,
    "dimension": 384
  }'
Responses
{
  "jobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "uploadUrl": "https://<bucket>.r2.cloudflarestorage.com/temp-uploads/<project_id>/<job_id>/data.bin?<signed_params>",
  "expiresIn": 3600
}
FieldTypeNotes
jobIdstringUse this ID with startBuild after uploading.
uploadUrlstringPresigned URL to PUT your index data. Expires after expiresIn seconds.
expiresInintegerSeconds until the upload URL expires (default 3600).
Errors
  • 400 when docCount or dimension is missing or invalid.
  • 404 if the project does not exist.