Logo IconGuided Mind
v2.4Sign In
Integration

API Per Route

Complete payload documentation for every GuidedMind API endpoint.

Detailed reference for each API endpoint with all available options, default values, and response formats.

POST /rag/search

Search your document index for relevant chunks.

Request Body

ParameterTypeDefaultDescription
queryrequiredstringSearch query (1-1000 chars)
optionsobjectSearch options (see below)

Options Object

ParameterTypeDefaultDescription
limitinteger5Results to return (1-20)
thresholdfloat0.7Minimum similarity score (0-1)
include_metadatabooleantrueInclude document metadata
search_methodstringnullOverride: dense, sparse, hybrid, graph
context_strategystringnullOverride context assembly strategy

Example Request

curl -X POST "https://api.guidedmind.ai/rag/search" \
  -H "X-API-Key: rk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What is the return policy?",
    "options": {
      "limit": 5,
      "threshold": 0.7,
      "include_metadata": true
    }
  }'

Example Response

{
  "query": "What is the return policy?",
  "answer": null,
  "results": [
    {
      "content": "Our return policy allows returns within 30 days...",
      "score": 0.92,
      "document_id": "doc_abc123",
      "document_name": "policies.pdf",
      "metadata": {
        "page": 3,
        "section": "Returns"
      }
    }
  ],
  "metadata": {
    "project_id": 42,
    "project_name": "Customer Support KB",
    "processing_time_ms": 234,
    "chunks_retrieved": 5,
    "search_method_used": "hybrid",
    "timestamp": "2026-05-20T00:00:00Z"
  }
}

Response Schema

Result Object

FieldTypeDescription
contentstringThe matching chunk text
scorefloatSimilarity score (0-1)
document_idstringSource document ID
document_namestringSource file name
metadataobjectDocument metadata (if enabled)

Metadata Object

FieldTypeDescription
project_idintegerProject ID
project_namestringProject name
processing_time_msintegerQuery processing time
chunks_retrievedintegerNumber of results
search_method_usedstringMethod used for search
timestampstringISO 8601 timestamp

POST /rag/upload

Upload a document to your project (processing happens separately).

Request (Multipart Form Data)

ParameterTypeDefaultDescription
filerequiredfileDocument file (PDF, DOCX, TXT, MD, CSV)
project_idrequiredstringTarget project ID

File Limits

FormatMax Size
PDF50MB
DOCX25MB
TXT/MD10MB
CSV25MB

Example Request

curl -X POST "https://api.guidedmind.ai/rag/upload" \
  -H "X-API-Key: rk_your_key_here" \
  -F "file=@./policies.pdf" \
  -F "project_id=proj_abc123"

Example Response

{
  "document_id": "doc_xyz789",
  "filename": "policies.pdf",
  "size_bytes": 2048576,
  "status": "uploaded",
  "message": "Document uploaded successfully. Process it to make it searchable."
}

POST /rag/upload-and-process

Upload a document and immediately start processing.

Request (Multipart Form Data)

ParameterTypeDefaultDescription
filerequiredfileDocument file
project_idrequiredstringTarget project ID
chunk_sizestringOverride chunk size (default: project setting)
chunk_overlapstringOverride chunk overlap (default: project setting)

Example Request

curl -X POST "https://api.guidedmind.ai/rag/upload-and-process" \
  -H "X-API-Key: rk_your_key_here" \
  -F "file=@./policies.pdf" \
  -F "project_id=proj_abc123" \
  -F "chunk_size=512" \
  -F "chunk_overlap=50"

Example Response

{
  "document_id": "doc_xyz789",
  "filename": "policies.pdf",
  "status": "processing",
  "chunks_created": 42,
  "message": "Document uploaded and processing started."
}

Use upload-and-process for simplicity. Use upload + separate processing when you need to batch multiple documents before indexing.