import requests
url = "https://platform.ankra.app/api/v1/chat/general"
payload = {
"query": "<string>",
"addon_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', addon_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/chat/general', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/chat/general \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"addon_name": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Stream general chat responses
Runs one general (not cluster-scoped) AI chat turn and streams the reply as server-sent events. Deprecated: responses carry Deprecation and Sunset headers, and durable chat sessions (/api/v1/chat/sessions) are the successor.
import requests
url = "https://platform.ankra.app/api/v1/chat/general"
payload = {
"query": "<string>",
"addon_name": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', addon_name: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/chat/general', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/chat/general \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"addon_name": "<string>"
}
'{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Show child attributes
Show child attributes
Show child attributes
Show child attributes
When true, this turn forks the conversation at the end of the supplied conversation_history (edit-and-resend): the server fills in the turns before it from the stored transcript and never the branch after it.
Show child attributes
Show child attributes
ask, agentic, plan Show child attributes
Show child attributes
Show child attributes
Show child attributes
The client rendering this turn. "web" is the native web chat, which can show a secure secret-entry form, so the session runner offers request_secret_input on the turn. Absent or empty keeps the default behaviour (no form is ever requested).
web Response
Streaming chat response