import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.chats.create_chat()
# Handle response
print(res)import { Textql } from "@textql/sdk";
const textql = new Textql({
apiKey: process.env["TEXTQL_API_KEY"] ?? "",
});
async function run() {
const result = await textql.chats.createChat({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"paradigm": {
"version": 123
},
"message": "<string>",
"playbookId": "<string>",
"research": true,
"dashboardMode": true,
"vllmModelId": "<string>",
"fastMode": true,
"maxThinking": true
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paradigm: {version: 123},
message: '<string>',
playbookId: '<string>',
research: true,
dashboardMode: true,
vllmModelId: '<string>',
fastMode: true,
maxThinking: true
})
};
fetch('https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat', 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 => "https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat",
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([
'paradigm' => [
'version' => 123
],
'message' => '<string>',
'playbookId' => '<string>',
'research' => true,
'dashboardMode' => true,
'vllmModelId' => '<string>',
'fastMode' => true,
'maxThinking' => true
]),
CURLOPT_HTTPHEADER => [
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json",
"tql_api_key: <api-key>"
],
]);
$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 := "https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat"
payload := strings.NewReader("{\n \"paradigm\": {\n \"version\": 123\n },\n \"message\": \"<string>\",\n \"playbookId\": \"<string>\",\n \"research\": true,\n \"dashboardMode\": true,\n \"vllmModelId\": \"<string>\",\n \"fastMode\": true,\n \"maxThinking\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("tql_api_key", "<api-key>")
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("https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paradigm\": {\n \"version\": 123\n },\n \"message\": \"<string>\",\n \"playbookId\": \"<string>\",\n \"research\": true,\n \"dashboardMode\": true,\n \"vllmModelId\": \"<string>\",\n \"fastMode\": true,\n \"maxThinking\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["tql_api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paradigm\": {\n \"version\": 123\n },\n \"message\": \"<string>\",\n \"playbookId\": \"<string>\",\n \"research\": true,\n \"dashboardMode\": true,\n \"vllmModelId\": \"<string>\",\n \"fastMode\": true,\n \"maxThinking\": true\n}"
response = http.request(request)
puts response.read_body{
"chat": {
"id": "<string>",
"paradigm": {
"version": 123,
"options": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
}
},
"timestamp": "2023-11-07T05:31:56Z",
"orgId": "<string>",
"memberId": "<string>",
"summary": "<string>",
"playbookId": "<string>",
"research": true,
"creatorEmail": "<string>",
"apiKeyClientId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"isBookmarked": true,
"preferredProvider": "<string>",
"templateDataId": "<string>",
"batchRunId": "<string>",
"preview": "<string>",
"dashboardMode": true,
"isRunning": true,
"isUnread": true,
"vllmModelId": "<string>",
"fastMode": true,
"agentId": "<string>",
"agentName": "<string>",
"agentProfileImageUrl": "<string>",
"maxThinking": true
}
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Create Chat
import os
from textql_sdk import Textql
with Textql(
api_key=os.getenv("TEXTQL_API_KEY", ""),
) as textql:
res = textql.chats.create_chat()
# Handle response
print(res)import { Textql } from "@textql/sdk";
const textql = new Textql({
apiKey: process.env["TEXTQL_API_KEY"] ?? "",
});
async function run() {
const result = await textql.chats.createChat({
body: {},
});
console.log(result);
}
run();curl --request POST \
--url https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--header 'tql_api_key: <api-key>' \
--data '
{
"paradigm": {
"version": 123
},
"message": "<string>",
"playbookId": "<string>",
"research": true,
"dashboardMode": true,
"vllmModelId": "<string>",
"fastMode": true,
"maxThinking": true
}
'const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
tql_api_key: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
paradigm: {version: 123},
message: '<string>',
playbookId: '<string>',
research: true,
dashboardMode: true,
vllmModelId: '<string>',
fastMode: true,
maxThinking: true
})
};
fetch('https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat', 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 => "https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat",
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([
'paradigm' => [
'version' => 123
],
'message' => '<string>',
'playbookId' => '<string>',
'research' => true,
'dashboardMode' => true,
'vllmModelId' => '<string>',
'fastMode' => true,
'maxThinking' => true
]),
CURLOPT_HTTPHEADER => [
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json",
"tql_api_key: <api-key>"
],
]);
$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 := "https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat"
payload := strings.NewReader("{\n \"paradigm\": {\n \"version\": 123\n },\n \"message\": \"<string>\",\n \"playbookId\": \"<string>\",\n \"research\": true,\n \"dashboardMode\": true,\n \"vllmModelId\": \"<string>\",\n \"fastMode\": true,\n \"maxThinking\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("tql_api_key", "<api-key>")
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("https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("tql_api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"paradigm\": {\n \"version\": 123\n },\n \"message\": \"<string>\",\n \"playbookId\": \"<string>\",\n \"research\": true,\n \"dashboardMode\": true,\n \"vllmModelId\": \"<string>\",\n \"fastMode\": true,\n \"maxThinking\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.textql.com/textql.rpc.public.chat.ChatService/CreateChat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["tql_api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"paradigm\": {\n \"version\": 123\n },\n \"message\": \"<string>\",\n \"playbookId\": \"<string>\",\n \"research\": true,\n \"dashboardMode\": true,\n \"vllmModelId\": \"<string>\",\n \"fastMode\": true,\n \"maxThinking\": true\n}"
response = http.request(request)
puts response.read_body{
"chat": {
"id": "<string>",
"paradigm": {
"version": 123,
"options": {
"universal": {
"connectorIds": [
123
],
"datasetId": "<string>",
"webSearchEnabled": true,
"sqlEnabled": true,
"ontologyEnabled": true,
"ontologyEditingEnabled": true,
"pythonEnabled": true,
"autoApproveEnabled": true,
"googleDriveEnabled": true,
"powerbiEnabled": true,
"contextEditingEnabled": true,
"formEditorEnabled": true,
"playbookToolsEnabled": true,
"microsoft365Enabled": true,
"feedExplorerEnabled": true,
"bashEnabled": true,
"javascriptEnabled": true,
"feedPostEnabled": true,
"feedCommentEnabled": true,
"feedEngageEnabled": true,
"streamlitEnabled": true,
"compactionDisabled": true,
"gmailEnabled": true,
"chatHistorySearchEnabled": true,
"googleCalendarEnabled": true,
"emailOutputEnabled": true,
"powerbiSelections": [
{
"workspaceId": "<string>",
"reportIds": [
"<string>"
],
"datasetIds": [
"<string>"
],
"workspaceName": "<string>",
"connectorId": 123
}
],
"smsMode": true,
"apiAccessKeyIds": [
"<string>"
]
}
}
},
"timestamp": "2023-11-07T05:31:56Z",
"orgId": "<string>",
"memberId": "<string>",
"summary": "<string>",
"playbookId": "<string>",
"research": true,
"creatorEmail": "<string>",
"apiKeyClientId": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"isBookmarked": true,
"preferredProvider": "<string>",
"templateDataId": "<string>",
"batchRunId": "<string>",
"preview": "<string>",
"dashboardMode": true,
"isRunning": true,
"isUnread": true,
"vllmModelId": "<string>",
"fastMode": true,
"agentId": "<string>",
"agentName": "<string>",
"agentProfileImageUrl": "<string>",
"maxThinking": true
}
}{
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
Headers
Define the version of the Connect protocol
1 Define the timeout, in ms
Body
ChatParadigm includes paradigm options
Show child attributes
Show child attributes
MODEL_UNKNOWN, MODEL_DEFAULT_SMALL, MODEL_DEFAULT, MODEL_DEFAULT_LARGE, MODEL_DEFAULT_REASONING, MODEL_HAIKU_4_5, MODEL_OPUS_4_8, MODEL_FABLE_5, MODEL_SONNET_5, MODEL_GPT_5_6_SOL, MODEL_GEMINI_3_FLASH, MODEL_GEMINI_3_PRO, MODEL_GEMINI_3_1_PRO, MODEL_GEMINI_3_5_FLASH, MODEL_GPT_5_6_TERRA, MODEL_GPT_5_6_LUNA, MODEL_DEEPSEEK_3_2, MODEL_GLM_5, MODEL_VLLM, MODEL_KIMI_K2_6, MODEL_GLM_5_2, MODEL_KIMI_K2_7_CODE, MODEL_QWEN3_7_PLUS, MODEL_MUSE_SPARK_1_1 optionally pre-fill first message
optionally associate with a playbook
whether to enable report mode for this chat
whether to enable dashboard mode for this chat
optionally set chat methodology at creation
METHODOLOGY_UNKNOWN, METHODOLOGY_ADAPTIVE, METHODOLOGY_PRESCRIPTIVE, METHODOLOGY_THOROUGH, METHODOLOGY_CAREFUL, METHODOLOGY_ONTOLOGY_BUILDING vllm_model_id is the model identifier forwarded to the org's vLLM endpoint. Only valid when model == MODEL_VLLM. Requires @textql.com superadmin.
fast_mode enables Anthropic's fast inference (speed: "fast") for this chat. Currently supported on Opus 4.6 only. Pricing is 6x standard rates.
max_thinking runs extended thinking at max effort with visible reasoning. Supported on Sonnet 5, Fable 5, and Opus 4.8.
Response
Success
Show child attributes
Show child attributes