Answer question
curl --request POST \
--url https://www.dench.com/api/v1/search/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'string'})
};
fetch('https://www.dench.com/api/v1/search/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/search/answer"
payload = { "query": "string" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"answer": "Dench is an AI agent workspace with a built-in CRM.",
"citations": [
{
"url": "https://www.dench.com",
"title": "Dench",
"id": "https://www.dench.com"
}
],
"costDollars": {
"total": 0.005
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}gateway
Answer question
Answer a question with web search.
POST
/
search
/
answer
Answer question
curl --request POST \
--url https://www.dench.com/api/v1/search/answer \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "string"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: 'string'})
};
fetch('https://www.dench.com/api/v1/search/answer', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.dench.com/api/v1/search/answer"
payload = { "query": "string" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"answer": "Dench is an AI agent workspace with a built-in CRM.",
"citations": [
{
"url": "https://www.dench.com",
"title": "Dench",
"id": "https://www.dench.com"
}
],
"costDollars": {
"total": 0.005
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"details": "<unknown>"
}
}Authorizations
DenchApiKeyAgentSession
Workspace-scoped Dench API key from workspace settings. This is the same key used by DENCH_API_KEY in sandboxes.
Body
application/json