Skip to content
Try Free →

SDKs

Last updated: · 2 min read

Current state

There are no official AskVault SDK packages for any language. Call the REST API directly. You authenticate with an API key in the Authorization header; the workspace is resolved from the key, so requests carry no workspace ID. See Authentication.

Using fetch (JavaScript)

const response = await fetch('https://api.askvault.co/v1/query', {
method: 'POST',
headers: {
'Authorization': 'Bearer ak_xxx',
'Content-Type': 'application/json',
},
body: JSON.stringify({ query: 'What is your refund policy?' }),
});
const data = await response.json();
console.log(data.answer);

Using requests (Python)

import requests
response = requests.post(
'https://api.askvault.co/v1/query',
headers={'Authorization': 'Bearer ak_xxx'},
json={'query': 'What is your refund policy?'},
)
print(response.json()['answer'])

Keep your API key on your server. Do not ship it in browser or mobile client code.

Was this page helpful?