Read the Docs

🚀 Getting Started
  1. Create an App in your workspace. This will generate a unique app_id used for all context operations.
  2. Upload Documents using the /api/v1/apps/add-context endpoint or the in-app "Add Context" tool. Each file becomes part of the vector index.
  3. Add Users to your app from the workspace. Each assigned user receives a unique user_id for personalized context merging.
  4. Start Making API Calls using your app_id and optional user_id to retrieve, complete, or enhance content in context.

Add App Context

Upload files to build or update an app’s vector index. Accepts PDFs, DOCX, TXT, and more.

POST /api/v1/apps/add-context
FormData:
  app_id: "ak_abc123"
  owner_id: "u_xyz456"
  files: [file1.pdf, file2.docx]
    
Returns a success message and document count if indexing completes successfully.

Query Assistant

Ask natural language questions and receive intelligent answers grounded in your indexed content.

POST /api/v1/ai/query
    {
      "query": "What is our refund policy?",
      "app_id": "ak_abc123",
      "user_id": "u_xyz456" // optional
    }
      
Returns a context-aware AI response in data.response using your app and user-level index.

Get App Users

Retrieve users who have been assigned to your app for personalized context merging.

POST /api/v1/apps/users
{
  "app_id": "ak_abc123"
}
    
Returns a list of users with user_id and optional email metadata.

Retrieve Context

Search your indexed documents (app + user) for relevant content using vector similarity.

POST /api/v1/ai/retrieve-context
{
  "query": "project update",
  "app_id": "ak_abc123",
  "user_id": "u_xyz456" // optional
}
    
Returns a list of matching nodes in data.matches, each with text, score, metadata, and ref_doc_id.

Autocomplete Input

Return short text completions based on context-relevant terms, useful for form fields.

POST /api/v1/ai/complete-input
{
  "query": "AutoP",
  "app_id": "ak_abc123",
  "user_id": "u_xyz456", // optional
  "max_chars": 10        // optional
}
    
Returns a short string in data.completion based on the indexed content.

Enhance Text

Improve clarity and tone while preserving meaning, ideal for customer inputs or support messages.

POST /api/v1/ai/enhance-input
{
  "query": "this writing is sloppy",
  "app_id": "ak_abc123",
  "user_id": "u_xyz456" // optional
}
    
Returns a cleaned-up version in data.enhanced_text based on your document index.