POST
/
v1
/
knowledge
curl --request POST \
  --url https://api.valyu.network/v1/knowledge \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "query": "<string>",
  "search_type": "proprietary",
  "data_sources": [
    "valyu/valyu-arxiv",
    "valyu/valyu-wikipedia",
    "https://www.valyu.network/"
  ],
  "max_num_results": 10,
  "similarity_threshold": 0.4,
  "query_rewrite": true,
  "max_price": 123
}'
{
  "success": true,
  "error": "<string>",
  "tx_id": "<string>",
  "query": "<string>",
  "results": [
    {
      "title": "<string>",
      "url": "<string>",
      "content": "<string>",
      "source": "<string>",
      "price": 123,
      "length": 123,
      "image_url": {},
      "data_type": "unstructured",
      "relevance_score": 0.5
    }
  ],
  "results_by_source": {
    "web": 123,
    "proprietary": 123
  },
  "total_deduction_pcm": 123,
  "total_deduction_dollars": 123,
  "total_characters": 123
}

Authorizations

x-api-key
string
header
required

Body

application/json
Parameters for the context search.

The body is of type object.

Response

200
application/json
Successful response.

The response is of type object.