Ask a question about the docs
curl --request POST \
--url https://app.trustivan.com/api/v1/docs/ask \
--header 'Content-Type: application/json' \
--data '
{
"question": "<string>",
"paths": [
"<string>"
]
}
'import requests
url = "https://app.trustivan.com/api/v1/docs/ask"
payload = {
"question": "<string>",
"paths": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({question: '<string>', paths: ['<string>']})
};
fetch('https://app.trustivan.com/api/v1/docs/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/docs/ask"
payload := strings.NewReader("{\n \"question\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"found": true,
"answer": "<string>",
"sources": [
{
"n": 123,
"path": "<string>",
"title": "<string>"
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Ask a question about the docs
Answers a question from at most five docs pages, named by path. The server fetches each page’s Markdown copy from the docs site itself and never takes page text from the request; the model is told to answer only from those pages and to cite them. Public: limited per client address per hour and per deployment per day (DOCS_ASK_HOURLY_PER_IP, DOCS_ASK_DAILY_LIMIT).
POST
/
docs
/
ask
Ask a question about the docs
curl --request POST \
--url https://app.trustivan.com/api/v1/docs/ask \
--header 'Content-Type: application/json' \
--data '
{
"question": "<string>",
"paths": [
"<string>"
]
}
'import requests
url = "https://app.trustivan.com/api/v1/docs/ask"
payload = {
"question": "<string>",
"paths": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({question: '<string>', paths: ['<string>']})
};
fetch('https://app.trustivan.com/api/v1/docs/ask', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trustivan.com/api/v1/docs/ask"
payload := strings.NewReader("{\n \"question\": \"<string>\",\n \"paths\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"found": true,
"answer": "<string>",
"sources": [
{
"n": 123,
"path": "<string>",
"title": "<string>"
}
]
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}{
"error": "<string>",
"code": "validation_failed",
"required_scope": "<string>",
"principal": "user"
}Body
application/json