Run deep search
curl --request POST \
--url https://app.lev8.com/v1/deep-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What does OpenAI do and who is its CEO?"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What does OpenAI do and who is its CEO?'})
};
fetch('https://app.lev8.com/v1/deep-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.lev8.com/v1/deep-search"
payload = { "query": "What does OpenAI do and who is its CEO?" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"answer": {
"Citations": [],
"Result": "OpenAI is an AI research and product company. Its CEO is Sam Altman."
}
}Deep Search
Run deep search
Answer a natural-language research question synchronously.
POST
/
v1
/
deep-search
Run deep search
curl --request POST \
--url https://app.lev8.com/v1/deep-search \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "What does OpenAI do and who is its CEO?"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'What does OpenAI do and who is its CEO?'})
};
fetch('https://app.lev8.com/v1/deep-search', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.lev8.com/v1/deep-search"
payload = { "query": "What does OpenAI do and who is its CEO?" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"answer": {
"Citations": [],
"Result": "OpenAI is an AI research and product company. Its CEO is Sam Altman."
}
}Submits a Deep Search query and returns the generated answer in the same request.
Example
curl "https://app.lev8.com/v1/deep-search" \
--request POST \
--header "Content-Type: application/json" \
--header "Authorization: Bearer $LEV8_API_KEY" \
--data '{
"query": "What does OpenAI do and who is its CEO?"
}'
Response
{
"success": true,
"answer": {
"Citations": [],
"Result": "OpenAI is an AI research and product company. Its CEO is Sam Altman."
}
}
answer can be any non-null JSON value. The object above reflects the current upstream format, but clients should pass through or inspect the value dynamically instead of requiring Citations, Result, or a string.
If the workflow completes without a generated result, the response can use success: false:
{
"success": false,
"answer": {
"answer": "No result generated from deep search"
}
}
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Optional stable key for this logical request. When omitted, lev8 generates one and returns it in the response Header.
Maximum string length:
128Body
application/json
Natural-language research question to answer with Deep Search.
Required string length:
1 - 4000Example:
"What does OpenAI do and who is its CEO?"
Response
Deep Search answer.