HushSearchDocs

Context Pack

Token-budgeted context for an LLM prompt, gathered from the web.

Answers & researchFree demo, no key

POST/v1/context/2 credits

Request
curl -X POST https://api.hushsearch.io/v1/context/ \
  -H "X-API-Key: hs_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "FastAPI dependency injection with async generators",
  "tokens_num": 2000
}'

Returns a single context string sized to a token budget, built from the most relevant passages across several sources, with the sources listed separately. Useful for dropping straight into a prompt.

Parameters

FieldTypeDefaultNotes
querystring—Required. 1–2,000 characters.
tokens_numinteger or "dynamic""dynamic"Approximate token budget, 50–100,000.
num_resultsinteger12Sources to consider, 1–40.
categorystring—Soft hint such as code, docs, github, financial_report.

Response

{
  "query": "how does pgvector HNSW indexing work",
  "context": "[1] pgvector adds HNSW indexes …",
  "tokens_num": 2048,
  "sources": [{ "index": 1, "title": "…", "url": "https://…" }],
  "credits_used": 2,
  "credits_remaining": 498,
  "response_time_ms": 2410
}

On this page