Skip to main content
POST
/
queries
/
semantic
Create Semantic Query
curl --request POST \
  --url https://api.tractorbeam.ai/queries/semantic \
  --header 'Content-Type: application/json' \
  --data '
{
  "graphs": [
    "user_123/graph-1",
    "user_123/graph-2"
  ],
  "query": {
    "type": "text",
    "value": "<string>"
  },
  "response_format": "tuples",
  "top_k": 10,
  "depth": 3,
  "embedding_model": "bge-small-en-v1.5"
}
'
{
  "tuples": [
    {
      "tuple": [
        "<string>",
        "<string>",
        "<string>"
      ],
      "score": 123,
      "source": "<string>"
    }
  ],
  "graphs": [
    "user_123/graph-1",
    "user_123/graph-2"
  ]
}

Body

application/json
graphs
string[]
required
Example:
["user_123/graph-1", "user_123/graph-2"]
query
object
required
response_format
enum<string>
Available options:
tuples,
chains
top_k
integer
Required range: x >= 0
Example:

10

depth
integer
Required range: x >= 0
Example:

3

embedding_model
string | null
Example:

"bge-small-en-v1.5"

Response

Query executed successfully

tuples
object[]
required
graphs
string[]
required
Example:
["user_123/graph-1", "user_123/graph-2"]