Stop Bot Chat
curl --request POST \
--url https://api.krea.ai/bots/chats/{chat_id}/stop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cursor": "<string>"
}
'import requests
url = "https://api.krea.ai/bots/chats/{chat_id}/stop"
payload = {
"bot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cursor": "<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({bot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', cursor: '<string>'})
};
fetch('https://api.krea.ai/bots/chats/{chat_id}/stop', 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://api.krea.ai/bots/chats/{chat_id}/stop",
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([
'bot_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cursor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.krea.ai/bots/chats/{chat_id}/stop"
payload := strings.NewReader("{\n \"bot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cursor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.krea.ai/bots/chats/{chat_id}/stop")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.krea.ai/bots/chats/{chat_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"chat_id": "<string>",
"title": "<string>",
"status": "working",
"finished": true,
"bots": [
{
"id": "<string>",
"name": "<string>",
"role": "<string>",
"description": "<string>",
"color": "<string>",
"owner": {
"id": "<string>",
"name": "<string>"
},
"is_owner": true,
"shared": true,
"status": "idle"
}
],
"working": [
{
"bot_id": "<string>",
"run_id": "<string>",
"started_at": "<string>",
"headline": "<string>",
"eta_minutes": 123
}
],
"progress": [
"<string>"
],
"messages": [
{
"id": 0,
"created_at": "<string>",
"author": {
"kind": "person",
"id": "<string>",
"name": "<string>"
},
"text": "<string>",
"attachments": [
{
"url": "<string>",
"uri": "<string>",
"name": "<string>",
"mime_type": "<string>",
"width": 123,
"height": 123
}
],
"via": "<string>"
}
],
"text": "<string>",
"media": [
{
"url": "<string>",
"uri": "<string>",
"name": "<string>",
"mime_type": "<string>",
"width": 123,
"height": 123
}
],
"files": [
{
"url": "<string>",
"uri": "<string>",
"name": "<string>",
"mime_type": "<string>",
"width": 123,
"height": 123
}
],
"out_of_compute_bot_ids": [
"<string>"
],
"timed_out": true,
"cursor": "<string>",
"url": "<string>",
"question": {
"id": "<string>",
"bot_id": "<string>",
"kind": "question",
"text": "<string>",
"options": [
"<string>"
],
"answerable": true
},
"error": {
"code": "out_of_compute",
"message": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}Bots
Stop Bot Chat
Stop the bots working in a chat, or one of them with bot_id, and their helpers. Open to a workspace that fell below the plan Bots needs, so running work can always be stopped.
POST
/
bots
/
chats
/
{chat_id}
/
stop
Stop Bot Chat
curl --request POST \
--url https://api.krea.ai/bots/chats/{chat_id}/stop \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cursor": "<string>"
}
'import requests
url = "https://api.krea.ai/bots/chats/{chat_id}/stop"
payload = {
"bot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cursor": "<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({bot_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', cursor: '<string>'})
};
fetch('https://api.krea.ai/bots/chats/{chat_id}/stop', 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://api.krea.ai/bots/chats/{chat_id}/stop",
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([
'bot_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cursor' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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 := "https://api.krea.ai/bots/chats/{chat_id}/stop"
payload := strings.NewReader("{\n \"bot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cursor\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.krea.ai/bots/chats/{chat_id}/stop")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"bot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cursor\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.krea.ai/bots/chats/{chat_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bot_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cursor\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"chat_id": "<string>",
"title": "<string>",
"status": "working",
"finished": true,
"bots": [
{
"id": "<string>",
"name": "<string>",
"role": "<string>",
"description": "<string>",
"color": "<string>",
"owner": {
"id": "<string>",
"name": "<string>"
},
"is_owner": true,
"shared": true,
"status": "idle"
}
],
"working": [
{
"bot_id": "<string>",
"run_id": "<string>",
"started_at": "<string>",
"headline": "<string>",
"eta_minutes": 123
}
],
"progress": [
"<string>"
],
"messages": [
{
"id": 0,
"created_at": "<string>",
"author": {
"kind": "person",
"id": "<string>",
"name": "<string>"
},
"text": "<string>",
"attachments": [
{
"url": "<string>",
"uri": "<string>",
"name": "<string>",
"mime_type": "<string>",
"width": 123,
"height": 123
}
],
"via": "<string>"
}
],
"text": "<string>",
"media": [
{
"url": "<string>",
"uri": "<string>",
"name": "<string>",
"mime_type": "<string>",
"width": 123,
"height": 123
}
],
"files": [
{
"url": "<string>",
"uri": "<string>",
"name": "<string>",
"mime_type": "<string>",
"width": 123,
"height": 123
}
],
"out_of_compute_bot_ids": [
"<string>"
],
"timed_out": true,
"cursor": "<string>",
"url": "<string>",
"question": {
"id": "<string>",
"bot_id": "<string>",
"kind": "question",
"text": "<string>",
"options": [
"<string>"
],
"answerable": true
},
"error": {
"code": "out_of_compute",
"message": "<string>"
}
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}{
"error": "<string>",
"code": "<string>",
"required_plan": "<string>"
}Authorizations
Path Parameters
Body
application/json
Response
The state of the chat after stopping.
Was this page helpful?