Stream chat response (v3)
curl --request POST \
--url http://api.superwize.ai/api/chat/streamChatV3 \
--header 'Content-Type: application/json' \
--data '
{
"message": "What are the main causes of climate change?",
"conversationId": "conv_01JHKYW2V8XQ123456789",
"studyMode": true,
"quizMode": true,
"teacherMode": true,
"model": "meetkai:functionary-urdu-mini-pak",
"systemContext": {},
"files": [
{
"fileId": "file_01JHKZ06R8OP123456789",
"mimeType": "image/png",
"filename": "Primary Key"
}
],
"branchFrom": "conv_01JHKYW2V8XQ123456700",
"branchPointItemId": "obj_01JHKZ0PV2WX123456789",
"articleId": "obj_01JHKZ0PV2WX123456789"
}
'import requests
url = "http://api.superwize.ai/api/chat/streamChatV3"
payload = {
"message": "What are the main causes of climate change?",
"conversationId": "conv_01JHKYW2V8XQ123456789",
"studyMode": True,
"quizMode": True,
"teacherMode": True,
"model": "meetkai:functionary-urdu-mini-pak",
"systemContext": {},
"files": [
{
"fileId": "file_01JHKZ06R8OP123456789",
"mimeType": "image/png",
"filename": "Primary Key"
}
],
"branchFrom": "conv_01JHKYW2V8XQ123456700",
"branchPointItemId": "obj_01JHKZ0PV2WX123456789",
"articleId": "obj_01JHKZ0PV2WX123456789"
}
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({
message: 'What are the main causes of climate change?',
conversationId: 'conv_01JHKYW2V8XQ123456789',
studyMode: true,
quizMode: true,
teacherMode: true,
model: 'meetkai:functionary-urdu-mini-pak',
systemContext: {},
files: [
{
fileId: 'file_01JHKZ06R8OP123456789',
mimeType: 'image/png',
filename: 'Primary Key'
}
],
branchFrom: 'conv_01JHKYW2V8XQ123456700',
branchPointItemId: 'obj_01JHKZ0PV2WX123456789',
articleId: 'obj_01JHKZ0PV2WX123456789'
})
};
fetch('http://api.superwize.ai/api/chat/streamChatV3', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.superwize.ai/api/chat/streamChatV3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => 'What are the main causes of climate change?',
'conversationId' => 'conv_01JHKYW2V8XQ123456789',
'studyMode' => true,
'quizMode' => true,
'teacherMode' => true,
'model' => 'meetkai:functionary-urdu-mini-pak',
'systemContext' => [
],
'files' => [
[
'fileId' => 'file_01JHKZ06R8OP123456789',
'mimeType' => 'image/png',
'filename' => 'Primary Key'
]
],
'branchFrom' => 'conv_01JHKYW2V8XQ123456700',
'branchPointItemId' => 'obj_01JHKZ0PV2WX123456789',
'articleId' => 'obj_01JHKZ0PV2WX123456789'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.superwize.ai/api/chat/streamChatV3"
payload := strings.NewReader("{\n \"message\": \"What are the main causes of climate change?\",\n \"conversationId\": \"conv_01JHKYW2V8XQ123456789\",\n \"studyMode\": true,\n \"quizMode\": true,\n \"teacherMode\": true,\n \"model\": \"meetkai:functionary-urdu-mini-pak\",\n \"systemContext\": {},\n \"files\": [\n {\n \"fileId\": \"file_01JHKZ06R8OP123456789\",\n \"mimeType\": \"image/png\",\n \"filename\": \"Primary Key\"\n }\n ],\n \"branchFrom\": \"conv_01JHKYW2V8XQ123456700\",\n \"branchPointItemId\": \"obj_01JHKZ0PV2WX123456789\",\n \"articleId\": \"obj_01JHKZ0PV2WX123456789\"\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))
}HttpResponse<String> response = Unirest.post("http://api.superwize.ai/api/chat/streamChatV3")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"What are the main causes of climate change?\",\n \"conversationId\": \"conv_01JHKYW2V8XQ123456789\",\n \"studyMode\": true,\n \"quizMode\": true,\n \"teacherMode\": true,\n \"model\": \"meetkai:functionary-urdu-mini-pak\",\n \"systemContext\": {},\n \"files\": [\n {\n \"fileId\": \"file_01JHKZ06R8OP123456789\",\n \"mimeType\": \"image/png\",\n \"filename\": \"Primary Key\"\n }\n ],\n \"branchFrom\": \"conv_01JHKYW2V8XQ123456700\",\n \"branchPointItemId\": \"obj_01JHKZ0PV2WX123456789\",\n \"articleId\": \"obj_01JHKZ0PV2WX123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.superwize.ai/api/chat/streamChatV3")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"What are the main causes of climate change?\",\n \"conversationId\": \"conv_01JHKYW2V8XQ123456789\",\n \"studyMode\": true,\n \"quizMode\": true,\n \"teacherMode\": true,\n \"model\": \"meetkai:functionary-urdu-mini-pak\",\n \"systemContext\": {},\n \"files\": [\n {\n \"fileId\": \"file_01JHKZ06R8OP123456789\",\n \"mimeType\": \"image/png\",\n \"filename\": \"Primary Key\"\n }\n ],\n \"branchFrom\": \"conv_01JHKYW2V8XQ123456700\",\n \"branchPointItemId\": \"obj_01JHKZ0PV2WX123456789\",\n \"articleId\": \"obj_01JHKZ0PV2WX123456789\"\n}"
response = http.request(request)
puts response.read_body{
"event": "message",
"data": {
"type": "conversation.created",
"conversationId": "conv_01JHKYW2V8XQ123456789"
},
"id": "obj_01JHKZ0PV2WX123456789",
"retry": 3000
}{
"defined": "<unknown>",
"code": "<unknown>",
"status": "<unknown>",
"message": "Authentication is required to access this endpoint.",
"data": "<unknown>"
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "The action is not allowed or requires more credits.",
"data": {
"code": "INSUFFICIENT_CREDITS",
"required": 1,
"dailyBalance": 250,
"bonusBalance": 250,
"resetsAt": "2026-01-02T00:00:00.000Z"
}
}{
"defined": true,
"code": "PRECONDITION_FAILED",
"status": 412,
"message": "Client version does not satisfy this endpoint requirements.",
"data": {
"code": "VERSION_MISMATCH",
"required": "1.1.3",
"provided": "1.0.8"
}
}Chat
Stream chat response (v3)
Current streaming chat endpoint for clients on API >= 1.1.2. Supports uploaded files, branching context, and tool execution.
POST
/
chat
/
streamChatV3
Stream chat response (v3)
curl --request POST \
--url http://api.superwize.ai/api/chat/streamChatV3 \
--header 'Content-Type: application/json' \
--data '
{
"message": "What are the main causes of climate change?",
"conversationId": "conv_01JHKYW2V8XQ123456789",
"studyMode": true,
"quizMode": true,
"teacherMode": true,
"model": "meetkai:functionary-urdu-mini-pak",
"systemContext": {},
"files": [
{
"fileId": "file_01JHKZ06R8OP123456789",
"mimeType": "image/png",
"filename": "Primary Key"
}
],
"branchFrom": "conv_01JHKYW2V8XQ123456700",
"branchPointItemId": "obj_01JHKZ0PV2WX123456789",
"articleId": "obj_01JHKZ0PV2WX123456789"
}
'import requests
url = "http://api.superwize.ai/api/chat/streamChatV3"
payload = {
"message": "What are the main causes of climate change?",
"conversationId": "conv_01JHKYW2V8XQ123456789",
"studyMode": True,
"quizMode": True,
"teacherMode": True,
"model": "meetkai:functionary-urdu-mini-pak",
"systemContext": {},
"files": [
{
"fileId": "file_01JHKZ06R8OP123456789",
"mimeType": "image/png",
"filename": "Primary Key"
}
],
"branchFrom": "conv_01JHKYW2V8XQ123456700",
"branchPointItemId": "obj_01JHKZ0PV2WX123456789",
"articleId": "obj_01JHKZ0PV2WX123456789"
}
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({
message: 'What are the main causes of climate change?',
conversationId: 'conv_01JHKYW2V8XQ123456789',
studyMode: true,
quizMode: true,
teacherMode: true,
model: 'meetkai:functionary-urdu-mini-pak',
systemContext: {},
files: [
{
fileId: 'file_01JHKZ06R8OP123456789',
mimeType: 'image/png',
filename: 'Primary Key'
}
],
branchFrom: 'conv_01JHKYW2V8XQ123456700',
branchPointItemId: 'obj_01JHKZ0PV2WX123456789',
articleId: 'obj_01JHKZ0PV2WX123456789'
})
};
fetch('http://api.superwize.ai/api/chat/streamChatV3', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://api.superwize.ai/api/chat/streamChatV3",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'message' => 'What are the main causes of climate change?',
'conversationId' => 'conv_01JHKYW2V8XQ123456789',
'studyMode' => true,
'quizMode' => true,
'teacherMode' => true,
'model' => 'meetkai:functionary-urdu-mini-pak',
'systemContext' => [
],
'files' => [
[
'fileId' => 'file_01JHKZ06R8OP123456789',
'mimeType' => 'image/png',
'filename' => 'Primary Key'
]
],
'branchFrom' => 'conv_01JHKYW2V8XQ123456700',
'branchPointItemId' => 'obj_01JHKZ0PV2WX123456789',
'articleId' => 'obj_01JHKZ0PV2WX123456789'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://api.superwize.ai/api/chat/streamChatV3"
payload := strings.NewReader("{\n \"message\": \"What are the main causes of climate change?\",\n \"conversationId\": \"conv_01JHKYW2V8XQ123456789\",\n \"studyMode\": true,\n \"quizMode\": true,\n \"teacherMode\": true,\n \"model\": \"meetkai:functionary-urdu-mini-pak\",\n \"systemContext\": {},\n \"files\": [\n {\n \"fileId\": \"file_01JHKZ06R8OP123456789\",\n \"mimeType\": \"image/png\",\n \"filename\": \"Primary Key\"\n }\n ],\n \"branchFrom\": \"conv_01JHKYW2V8XQ123456700\",\n \"branchPointItemId\": \"obj_01JHKZ0PV2WX123456789\",\n \"articleId\": \"obj_01JHKZ0PV2WX123456789\"\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))
}HttpResponse<String> response = Unirest.post("http://api.superwize.ai/api/chat/streamChatV3")
.header("Content-Type", "application/json")
.body("{\n \"message\": \"What are the main causes of climate change?\",\n \"conversationId\": \"conv_01JHKYW2V8XQ123456789\",\n \"studyMode\": true,\n \"quizMode\": true,\n \"teacherMode\": true,\n \"model\": \"meetkai:functionary-urdu-mini-pak\",\n \"systemContext\": {},\n \"files\": [\n {\n \"fileId\": \"file_01JHKZ06R8OP123456789\",\n \"mimeType\": \"image/png\",\n \"filename\": \"Primary Key\"\n }\n ],\n \"branchFrom\": \"conv_01JHKYW2V8XQ123456700\",\n \"branchPointItemId\": \"obj_01JHKZ0PV2WX123456789\",\n \"articleId\": \"obj_01JHKZ0PV2WX123456789\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://api.superwize.ai/api/chat/streamChatV3")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"message\": \"What are the main causes of climate change?\",\n \"conversationId\": \"conv_01JHKYW2V8XQ123456789\",\n \"studyMode\": true,\n \"quizMode\": true,\n \"teacherMode\": true,\n \"model\": \"meetkai:functionary-urdu-mini-pak\",\n \"systemContext\": {},\n \"files\": [\n {\n \"fileId\": \"file_01JHKZ06R8OP123456789\",\n \"mimeType\": \"image/png\",\n \"filename\": \"Primary Key\"\n }\n ],\n \"branchFrom\": \"conv_01JHKYW2V8XQ123456700\",\n \"branchPointItemId\": \"obj_01JHKZ0PV2WX123456789\",\n \"articleId\": \"obj_01JHKZ0PV2WX123456789\"\n}"
response = http.request(request)
puts response.read_body{
"event": "message",
"data": {
"type": "conversation.created",
"conversationId": "conv_01JHKYW2V8XQ123456789"
},
"id": "obj_01JHKZ0PV2WX123456789",
"retry": 3000
}{
"defined": "<unknown>",
"code": "<unknown>",
"status": "<unknown>",
"message": "Authentication is required to access this endpoint.",
"data": "<unknown>"
}{
"defined": true,
"code": "FORBIDDEN",
"status": 403,
"message": "The action is not allowed or requires more credits.",
"data": {
"code": "INSUFFICIENT_CREDITS",
"required": 1,
"dailyBalance": 250,
"bonusBalance": 250,
"resetsAt": "2026-01-02T00:00:00.000Z"
}
}{
"defined": true,
"code": "PRECONDITION_FAILED",
"status": 412,
"message": "Client version does not satisfy this endpoint requirements.",
"data": {
"code": "VERSION_MISMATCH",
"required": "1.1.3",
"provided": "1.0.8"
}
}Body
application/json
Response
Streaming chat events emitted.
- Option 1
- Option 2
- Option 3
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
- Option 6
- Option 7
- Option 8
- Option 9
- Option 10
- Option 11
- Option 12
- Option 13
- Option 14
- Option 15
- Option 16
- Option 17
- Option 18
- Option 19
- Option 20
- Option 21
- Option 22
- Option 23
- Option 24
- Option 25
- Option 26
- Option 27
- Option 28
- Option 29
- Option 30
- Option 31
- Option 32
- Option 33
- Option 34
- Option 35
Show child attributes
Show child attributes
⌘I