Docs

Buckets

Upload documents into a bucket, check search readiness, and ask questions through the v2 knowledge-search API.

Create Bucket

bashcurl -X POST https://api.schift.io/v2/buckets \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SCHIFT_API_KEY" \
  -d '{"name": "research-papers", "description": "ML research corpus"}'
FieldTypeRequiredDescription
namestringYesUnique bucket name within your organization
descriptionstringNoHuman-readable description

Upload Files

Upload one or more files via multipart form data. Processing is asynchronous — the endpoint returns job IDs immediately and files are processed in the background.

bashcurl -X POST https://api.schift.io/v2/buckets/{bucket_id}/documents \
  -H "Authorization: Bearer $SCHIFT_API_KEY" \
  -F "[email protected]" \
  -F "[email protected]" \
  -F "ocr_strategy=auto" \
  -F "chunk_size=512" \
  -F 'metadata={"source":"research"}'
FieldTypeDefaultDescription
filesFile[]One or more files (PDF, DOCX, Markdown, images, text)
ocr_strategystringautoOCR mode: auto, force, or skip
chunk_sizeinteger512Characters per text chunk
chunk_overlapinteger50Overlap between consecutive chunks
metadatastringOptional JSON metadata attached to uploaded documents

Check Readiness

bashcurl https://api.schift.io/v2/buckets/{bucket_id}/search/status \
  -H "Authorization: Bearer $SCHIFT_API_KEY"

Search Bucket

bashcurl -X POST https://api.schift.io/v2/buckets/{bucket_id}/search \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $SCHIFT_API_KEY" \
  -d '{
    "query": "attention mechanisms in transformers",
    "top_k": 8,
    "context_budget": 4000,
    "options": {
      "rerank": {"enabled": true, "top_k": 20},
      "instructions": {"task": "retrieval_query"}
    }
  }'
FieldTypeDefaultDescription
querystringNatural language search query
top_kinteger8Maximum cited passages to return
context_budgetintegerserver defaultApproximate maximum context size
filtersobjectMetadata filters for results
options.rerankobjectOptional ranking controls

V2 search returns answer-ready context plus citations. The server owns embedding, hybrid retrieval, reranking, context packing, and warning handling.

List & Delete

bash# List all buckets
curl https://api.schift.io/v2/buckets \
  -H "Authorization: Bearer $SCHIFT_API_KEY"

# Delete a bucket (irreversible)
curl -X DELETE https://api.schift.io/v2/buckets/{bucket_id} \
  -H "Authorization: Bearer $SCHIFT_API_KEY"