Skip to main content
POST
/
api
/
v2
/
context
Context Search
curl --request POST \
  --url https://app.octavehq.com/api/v2/context \
  --header 'Content-Type: application/json' \
  --header 'api_key: <api-key>' \
  --data '
{
  "query": "How do you help with HIPAA compliance?",
  "additionalContext": {
    "person": {
      "firstName": "John",
      "lastName": "Doe",
      "title": "CISO",
      "email": "john.doe@healthcare.com"
    },
    "company": {
      "name": "Healthcare Corp",
      "domain": "healthcare.com"
    },
    "details": "Large healthcare provider in California"
  },
  "topK": 10,
  "rerank": "medium",
  "sources": {
    "library": {
      "enabled": true
    },
    "resources": {
      "enabled": true
    }
  },
  "tools": {
    "personProfile": {
      "enabled": false,
      "returnOutput": true,
      "guess": false
    },
    "companyProfile": {
      "enabled": false,
      "returnOutput": true
    },
    "companyResearch": {
      "enabled": false,
      "returnOutput": true
    },
    "personResearch": {
      "enabled": false,
      "returnOutput": true
    },
    "deepWebResearch": {
      "enabled": false,
      "returnOutput": true
    }
  },
  "agentTools": {
    "crmActivity": {
      "enabled": false
    }
  },
  "reasoning": {
    "perDocument": false,
    "overall": false
  }
}
'
{
  "_metadata": {
    "requestId": "requestId",
    "timestamp": "2021-01-01T00:00:00.000Z",
    "usage": 0,
    "message": "message"
  },
  "data": {
    "documents": [
      {
        "id": "<string>",
        "name": "<string>",
        "data": {},
        "score": 5,
        "reasoning": "<string>"
      }
    ],
    "reasoning": "<string>",
    "_debug": {
      "totalFetched": 123,
      "afterReranking": 123,
      "sourcesUsed": {
        "library": true,
        "resources": true,
        "tools": true
      },
      "timeTaken": 123,
      "tokenUsage": {
        "inputTokens": 123,
        "outputTokens": 123,
        "totalTokens": 123
      }
    }
  },
  "usage": 123,
  "found": true,
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.octavehq.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

api_key
string
header
required

Body

application/json

Context search input with configuration

Context search input with inline configuration

query
string
required

Question or task to fetch context for

Minimum string length: 1
additionalContext
object

Optional person/company/details to enhance search

topK
number
rerank
enum<string>
Available options:
off,
low,
medium,
high,
best
sources
object
tools
object
agentTools
object
reasoning
object
commonContext
object

Response

Context search successful

_metadata
object
required
data
object
required
usage
number
required

Usage count for billing/credits

found
boolean
required

Whether the query was found

message
string
required

Message from the context agent