Bots

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

Request

  • Base URL
    https://api.krea.ai
  • Auth
    HTTP bearer

Path parameters

chat_id, string uuid required

Request body

object required
bot_id, string uuid

Stop only this bot. Without it, every bot working in the chat stops.

cursor, string

The cursor of the previous response, so only what happened since is returned. Without one, the read starts after your own newest message.

Response

The state of the chat after stopping.

object required
chat_id, string required
title, string required
status, 'working' | 'needs_input' | 'done' | 'failed' | 'stopped' required

working while a bot is mid-turn, needs_input when a bot waits on question, then done, failed or stopped.

finished, boolean required

True once status is done, failed or stopped.

bots, object[] required
working, object[] required
progress, string[] required

New steps of the working bots' turns.

messages, object[] required

New visible messages since cursor, oldest first.

text, string required

The bots' new message text, joined.

media, object[] required

Images, video and audio the bots posted since cursor.

files, object[] required
question, object
error, object

Present when status is failed. out_of_compute, bot_usage_limit and chat_usage_limit are billing holds, not faults.

out_of_compute_bot_ids, string[] required

Bots held in this chat because the workspace ran out of compute units. Add units, then call retry or send a message.

timed_out, boolean required

True when wait ran out while a bot was still working, or more is unread than one response carries. Read again with cursor.

cursor, string required
url, string required

Changes