> ## Documentation Index
> Fetch the complete documentation index at: https://www.krea.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Bots API

> Talk to your Krea bots over HTTP: list bots, start a chat, send messages, poll for replies, answer questions, and stop or retry a turn.

Use the Bots API to work with your Krea bots from your own application. An API key does what its person does in a bot chat: a message sent over the API starts the same bot turn and shows in the same chat as one sent in the Krea app. Requests and responses use snake\_case JSON fields.

| Endpoint | Purpose |
| - | - |
| [`GET /bots`](https://www.krea.ai/docs/api-reference/bots/list-bots) | List the bots you can use. |
| [`GET /bots/{bot_id}`](https://www.krea.ai/docs/api-reference/bots/get-bot) | Read one bot. |
| [`GET /bots/chats`](https://www.krea.ai/docs/api-reference/bots/list-bot-chats) | List the chats you belong to, newest first. |
| [`POST /bots/chats`](https://www.krea.ai/docs/api-reference/bots/start-bot-chat) | Open a direct chat with a bot, or a group chat with several bots and teammates. |
| [`GET /bots/chats/{chat_id}`](https://www.krea.ai/docs/api-reference/bots/get-bot-chat) | Read a chat with a page of its messages. |
| [`DELETE /bots/chats/{chat_id}`](https://www.krea.ai/docs/api-reference/bots/delete-bot-chat) | Delete a chat for everyone in it. |
| [`GET /bots/chats/{chat_id}/messages`](https://www.krea.ai/docs/api-reference/bots/read-new-bot-chat-messages) | Poll for new messages and the state of the chat. |
| [`POST /bots/chats/{chat_id}/messages`](https://www.krea.ai/docs/api-reference/bots/send-bot-chat-message) | Send a message into a chat. |
| [`POST /bots/chats/{chat_id}/members`](https://www.krea.ai/docs/api-reference/bots/add-bot-chat-members) | Add bots and teammates to a chat. |
| [`DELETE /bots/chats/{chat_id}/members/{member_id}`](https://www.krea.ai/docs/api-reference/bots/remove-bot-chat-member) | Remove a person from a group chat, or leave it. |
| [`DELETE /bots/chats/{chat_id}/bots/{bot_id}`](https://www.krea.ai/docs/api-reference/bots/remove-bot-from-chat) | Remove a bot from a group chat. |
| [`POST /bots/chats/{chat_id}/questions/{question_id}/answer`](https://www.krea.ai/docs/api-reference/bots/answer-bot-question) | Answer a question a bot is waiting on. |
| [`POST /bots/chats/{chat_id}/stop`](https://www.krea.ai/docs/api-reference/bots/stop-bot-chat) | Stop the bots working in a chat. |
| [`POST /bots/chats/{chat_id}/retry`](https://www.krea.ai/docs/api-reference/bots/retry-bot-chat) | Resume bots held because the workspace ran out of compute units. |

Bots work in the background. A send returns at once with a `cursor`. You then poll the chat with that cursor until the bots finish, ask a question, fail, or are stopped. There is no streaming and there are no webhooks.

## Authentication and access

Send `Authorization: Bearer KREA_API_KEY` with every request to `https://api.krea.ai`. The Bots API uses the same keys as the rest of the [public API](https://www.krea.ai/docs/developers/api-keys-and-billing.md).

The key's workspace and person decide what you can see:

* **Bots:** your own bots, and the bots shared with the workspace.
* **Chats:** only the chats you belong to. A chat you are not in returns `404`, also for teammates in the same workspace.

Bots needs a Max plan or higher, or an invitation to Bots. Without it, every endpoint except stop returns `403`:

```json theme={"theme":{"light":"github-light-default","dark":"vesper"}}
{
  "error": "Bots needs a Max plan or higher. Upgrade at https://www.krea.ai/pricing to work with bots.",
  "code": "entitlement_denied",
  "required_plan": "Max"
}
```

An account that Bots is not open to yet gets `403` with `code: "bots_unavailable"`. Stop is never refused for the plan, so running work can always be stopped.

Every chat response includes a `url` that opens the chat in the Krea app. Messages sent over the API are marked **via API** there, and carry `"via": "API"` when you read them back.

## Billing

> [!NOTE]
>
> Bot turns use the workspace's compute unit balance, exactly like turns in the Krea app. They do **not** use the API balance. Usage limits set on a bot or on a chat apply too.

A send is accepted even when the workspace is out of compute units. The hold shows when you read the chat. See [Out of compute units and usage limits](#out-of-compute-units-and-usage-limits).

## Send a message and poll for the reply

Set `KREA_API_KEY` in your environment first. Choose Bash with `curl` and `jq`, Python with `requests`, or Node.js with built-in `fetch`. You need at least one bot. Create bots in the Krea app; the API does not create them.

**1. List your bots**

`GET /bots` returns the bots you can use. Pick a bot's `id`.

**2. Start a chat**

`POST /bots/chats` with `bot_id`, a `title`, and a `message`. Save the returned `chat_id` and `cursor`.

**3. Poll for the reply**

Call `GET /bots/chats/{chat_id}/messages` with `cursor` and `wait=30`. Repeat with the new `cursor` from each response until `status` is no longer `working`.

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
set -euo pipefail
: "${KREA_API_KEY:?Set your Krea API key}"
API=https://api.krea.ai
AUTH="Authorization: Bearer $KREA_API_KEY"

BOT_ID=$(curl --fail-with-body --silent --show-error --max-time 60 \
  "$API/bots" -H "$AUTH" | jq -er '.bots[0].id')

START=$(curl --fail-with-body --silent --show-error --max-time 60 \
  "$API/bots/chats" \
  -H "$AUTH" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg bot_id "$BOT_ID" '{
    bot_id: $bot_id,
    title: "Coffee mug campaign",
    message: "Create three square product images for a ceramic coffee mug on a neutral studio background. Use no text or logos."
  }')")

CHAT_ID=$(printf '%s' "$START" | jq -er '.chat_id')
CURSOR=$(printf '%s' "$START" | jq -er '.cursor')
printf '%s' "$START" | jq -r '.url'

DEADLINE=$((SECONDS + 300))

while (( SECONDS < DEADLINE )); do
  STATE=$(curl --fail-with-body --silent --show-error --max-time 45 --get \
    "$API/bots/chats/$CHAT_ID/messages" \
    -H "$AUTH" \
    --data-urlencode "cursor=$CURSOR" \
    --data-urlencode "wait=30")
  CURSOR=$(printf '%s' "$STATE" | jq -er '.cursor')
  printf '%s' "$STATE" | jq '{status, text, media, files, question, error}'
  STATUS=$(printf '%s' "$STATE" | jq -er '.status')
  if [[ "$STATUS" != "working" ]]; then
    if [[ "$STATUS" == "done" ]]; then exit 0; fi
    printf 'Chat is %s. Open %s\n' "$STATUS" "$(printf '%s' "$STATE" | jq -r '.url')" >&2
    exit 1
  fi
done

printf 'Wait budget exhausted; the bot keeps working. Resume with chat_id=%s cursor=%s\n' \
  "$CHAT_ID" "$CURSOR" >&2
exit 1
```

```python Python theme={"theme":{"light":"github-light-default","dark":"vesper"}}
import json
import os
import time
import requests

api = "https://api.krea.ai"
headers = {"Authorization": f"Bearer {os.environ['KREA_API_KEY']}"}

response = requests.get(f"{api}/bots", headers=headers, timeout=60)
response.raise_for_status()
bots = response.json()["bots"]
if not bots:
    raise SystemExit("No bots yet. Create one in the Krea app first.")

response = requests.post(
    f"{api}/bots/chats",
    headers=headers,
    json={
        "bot_id": bots[0]["id"],
        "title": "Coffee mug campaign",
        "message": "Create three square product images for a ceramic coffee mug on a neutral studio background. Use no text or logos.",
    },
    timeout=60,
)
response.raise_for_status()
start = response.json()
chat_id, cursor = start["chat_id"], start["cursor"]
print(start["url"])

deadline = time.monotonic() + 300
while True:
    if time.monotonic() > deadline:
        raise TimeoutError(
            "Wait budget exhausted; the bot keeps working. Resume with "
            f"chat_id={chat_id} cursor={cursor}"
        )
    response = requests.get(
        f"{api}/bots/chats/{chat_id}/messages",
        headers=headers,
        params={"cursor": cursor, "wait": 30},
        timeout=45,
    )
    response.raise_for_status()
    state = response.json()
    cursor = state["cursor"]
    print(state["text"])
    if state["status"] != "working":
        break

print(json.dumps({key: state.get(key) for key in ("status", "media", "files", "question", "error")}, indent=2))
if state["status"] != "done":
    raise RuntimeError(f"Chat is {state['status']}. Open {state['url']}")
```

```javascript Node.js theme={"theme":{"light":"github-light-default","dark":"vesper"}}
import { performance } from "node:perf_hooks";

const token = process.env.KREA_API_KEY;
if (!token) throw new Error("Set your Krea API key");
const api = "https://api.krea.ai";

async function call(method, path, { body, query, timeoutMs = 60_000 } = {}) {
  const url = new URL(`${api}${path}`);
  for (const [key, value] of Object.entries(query ?? {})) url.searchParams.set(key, value);
  const response = await fetch(url, {
    method,
    headers: {
      Authorization: `Bearer ${token}`,
      ...(body ? { "Content-Type": "application/json" } : {}),
    },
    ...(body ? { body: JSON.stringify(body) } : {}),
    signal: AbortSignal.timeout(timeoutMs),
  });
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  }
  return response.json();
}

const { bots } = await call("GET", "/bots");
if (bots.length === 0) throw new Error("No bots yet. Create one in the Krea app first.");

const start = await call("POST", "/bots/chats", {
  body: {
    bot_id: bots[0].id,
    title: "Coffee mug campaign",
    message: "Create three square product images for a ceramic coffee mug on a neutral studio background. Use no text or logos.",
  },
});
const chatId = start.chat_id;
let cursor = start.cursor;
console.log(start.url);

const deadline = performance.now() + 300_000;
let state;
while (true) {
  if (performance.now() > deadline) {
    throw new Error(
      `Wait budget exhausted; the bot keeps working. Resume with chat_id=${chatId} cursor=${cursor}`,
    );
  }
  state = await call("GET", `/bots/chats/${chatId}/messages`, {
    query: { cursor, wait: 30 },
    timeoutMs: 45_000,
  });
  cursor = state.cursor;
  console.log(state.text);
  if (state.status !== "working") break;
}

const { status, media, files, question, error } = state;
console.log(JSON.stringify({ status, media, files, question, error }, null, 2));
if (status !== "done") throw new Error(`Chat is ${status}. Open ${state.url}`);
```

For Python, install `requests` with `pip install requests`. For Node.js, use Node.js 22+ and save the example as `example.mjs`.

These examples send one message and poll for up to five minutes. They stop on HTTP errors, and exit with an error when the chat ends in any status other than `done`. They never retry a send automatically. If a send request times out, the first request may have posted the message. Repeat it with the same `idempotency_key`, or read the chat before you send again.

When the wait budget runs out, the bot keeps working. Save the chat ID and cursor to resume polling later.

### Start a chat

`POST /bots/chats` returns `201` with `chat_id`, `title`, `message_id`, `cursor`, `bots`, and `url`.

| Field | Behavior |
| - | - |
| `bot_id` | UUID of a bot from `GET /bots`. Pass `bot_id`, `bot_ids`, or both. |
| `bot_ids` | Up to 20 bot UUIDs, for a group chat. See [Group chats](#group-chats). |
| `member_ids` | Optional, up to 50 user IDs of teammates in the workspace. See [Group chats](#group-chats). |
| `title` | Optional, up to 80 characters. With a title, the request opens a new chat of its own. With one bot, no members, and no title, it opens your direct chat with the bot, and reuses that chat when it already exists. |
| `message` | Optional first message, up to 8,000 characters. It starts the bot's first turn. |
| `attachments` | Optional, up to 10. Attachments need a `message` here. See [Attachments](#attachments). |
| `idempotency_key` | Optional, up to 200 characters. See [Retry a send safely](#retry-a-send-safely). |

A new chat opened without a `message` has the bot say hi. That greeting is a bot turn and is billed like one. Opening a direct chat that already exists returns that chat. Without a `message`, `message_id` is `null`.

### Send a follow-up

`POST /bots/chats/{chat_id}/messages` posts a message into an existing chat and returns `202` with a new `cursor`:

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
SENT=$(curl --fail-with-body --silent --show-error \
  "https://api.krea.ai/bots/chats/$CHAT_ID/messages" \
  -H "Authorization: Bearer $KREA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "Make a landscape variation of the first image."}')

# Poll with this new cursor.
CURSOR=$(printf '%s' "$SENT" | jq -er '.cursor')
```

`text` takes up to 8,000 characters. Send `text`, at least one attachment, or both.

### Retry a send safely

A send starts a billed bot turn, so sending twice by accident costs twice. `POST /bots/chats` and `POST /bots/chats/{chat_id}/messages` accept an optional `idempotency_key`, a string of your choosing that names the request:

```json theme={"theme":{"light":"github-light-default","dark":"vesper"}}
{ "text": "Make a landscape variation of the first image.", "idempotency_key": "order-1842-variation" }
```

If a request times out or the response is lost, repeat it with the same key. The API returns the first chat and message instead of sending again. Keys are scoped to you. Use a new key for each message you mean to send, including one with the same text.

### Poll for new messages

`GET /bots/chats/{chat_id}/messages` takes two query parameters:

| Parameter | Behavior |
| - | - |
| `cursor` | The `cursor` of the previous response, so only what happened since is returned. Without one, the read starts after your own newest message. |
| `wait` | Seconds to hold the request until the bots finish or ask something, from `0` to `30`. Defaults to `0`, which answers at once. |

Keep your HTTP client timeout longer than `wait`. The response describes the chat since `cursor`:

| Field | Meaning |
| - | - |
| `status` | `working` while a bot is mid-turn, `needs_input` when a bot waits on `question`, then `done`, `failed`, or `stopped`. |
| `finished` | `true` once `status` is `done`, `failed`, or `stopped`. |
| `timed_out` | `true` when `wait` ran out while a bot was still working, or when more is unread than one response carries. Read again with `cursor`. |
| `messages` | New visible messages, oldest first. Each has `id`, `created_at`, `author`, `text`, `attachments`, and `via` when it was not written in Krea. |
| `text` | The bots' new message text, joined. |
| `media` | Images, video, and audio the bots posted. Each item has a `url` and can include `uri`, `name`, `mime_type`, `width`, and `height`. Krea files come as a signed link. |
| `files` | Other files the bots posted, in the same shape as `media`. |
| `question` | Present when a bot waits on an answer. See [Question cards](#question-cards). |
| `error` | `{ code, message }`, present when `status` is `failed`. |
| `out_of_compute_bot_ids` | Bots held in this chat because the workspace ran out of compute units. |
| `working`, `progress` | The turns in progress and their new steps. |
| `cursor` | Pass it to the next read. |
| `url` | Link to the chat in the Krea app. |

Each response only carries what is new since `cursor`. Collect `text`, `media`, and `files` across reads if you need the whole reply.

To read a chat's history instead, use `GET /bots/chats/{chat_id}`. It returns a page of messages, newest page first, with `limit` from `1` to `100` (default `30`). Pass the returned `before` value as `before` to page back.

## Attachments

`POST /bots/chats` and `POST /bots/chats/{chat_id}/messages` accept up to 10 attachments per message. Each is `{ url, name?, content_type? }`:

```json theme={"theme":{"light":"github-light-default","dark":"vesper"}}
{
  "text": "Use this photo as the reference.",
  "attachments": [
    { "url": "https://example.com/mug.jpg", "name": "mug.jpg", "content_type": "image/jpeg" },
    { "url": "file:550e8400-e29b-41d4-a716-446655440000" }
  ]
}
```

`url` accepts an `http(s)` URL, such as the asset URL returned by [`POST /assets`](https://www.krea.ai/docs/api-reference/assets/upload-an-asset), or a Krea Files URI `file:<uuid>` that you can access. `name` and `content_type` are optional strings of up to 255 characters. A Krea file that is missing or not accessible returns `404` with `code: "attachment_not_found"`.

## Question cards

A bot can stop and ask before it continues. The read then returns `status: "needs_input"` with a `question`:

```json theme={"theme":{"light":"github-light-default","dark":"vesper"}}
{
  "status": "needs_input",
  "finished": false,
  "question": {
    "id": "toolu_01A2b3C4d5",
    "bot_id": "3f0c8a52-1d7e-4c3b-9a65-2b8e4f1d7c90",
    "kind": "question",
    "text": "Which cup?",
    "options": ["Mug", "Tumbler"],
    "answerable": true
  }
}
```

Answer it with `POST /bots/chats/{chat_id}/questions/{question_id}/answer`, then poll again with the `cursor` the answer returns:

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
curl --fail-with-body --silent --show-error \
  "https://api.krea.ai/bots/chats/$CHAT_ID/questions/$QUESTION_ID/answer" \
  -H "Authorization: Bearer $KREA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"answer": "Mug"}'
```

What to send depends on `kind`:

| `kind` | Answer |
| - | - |
| `question` | Free text, or one of `options` sent exactly. When the bot asked several questions at once, `text` numbers them and `options` is empty. Send `{ "answers": [...] }` with one answer each, in order, up to 10. |
| `approval` | `Go ahead` or `Not now`. Any other text does not approve. It goes to the bot as feedback. |
| `permission`, `cost_confirm` | `Allow once`, `Always allow`, or `Don't allow`. Other text returns `400`. |
| Other kinds | `answerable` is `false`. Only the chat in the Krea app can answer. Open the chat's `url`. |

Answering a question that was already answered returns `404`.

## Group chats

A chat with several bots, with teammates, or with a title is a group chat. Start one with `bot_ids` and, optionally, `member_ids`:

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
curl --fail-with-body --silent --show-error \
  "https://api.krea.ai/bots/chats" \
  -H "Authorization: Bearer $KREA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg lead "$LEAD_BOT_ID" --arg second "$SECOND_BOT_ID" --arg teammate "$TEAMMATE_ID" '{
    bot_ids: [$lead, $second],
    member_ids: [$teammate],
    title: "Coffee mug campaign",
    message: "Plan a three-image campaign for a coffee mug."
  }')"
```

The rules are the ones the Krea app applies:

* Every bot must be one you can use, or the request returns `404`.
* Every person in `member_ids` must be in the workspace, or the request returns `400`.
* A private bot works only with its owner. A chat with other people needs bots that are shared with the workspace, or the request returns `400`.

Teammate user IDs appear as `people` in the chats you share with them, from `GET /bots/chats` and `GET /bots/chats/{chat_id}`.

### Who answers

The first bot in `bot_ids` leads the chat, and `lead_bot_id` names it. A message that names no bot goes to the lead. To speak to a specific bot, write `@` and its name in the message, for example `@Thumby make the logo bigger`.

Every response says which bot it is about. Each message carries `author.id` and `author.name`, a `question` carries `bot_id`, and each entry in `working` carries `bot_id`. In a poll, `status` stays `working` until every bot in the chat is at rest.

### Add and remove bots and people

`POST /bots/chats/{chat_id}/members` takes `bot_ids`, `member_ids`, or both, and returns who is in the chat now: `chat_id`, `title`, `kind`, `lead_bot_id`, `bots`, `people`, and `url`. Anyone in the chat can add. Adding to a direct chat turns it into a group chat. Bots and people already in the chat are left as they are.

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
curl --fail-with-body --silent --show-error \
  "https://api.krea.ai/bots/chats/$CHAT_ID/members" \
  -H "Authorization: Bearer $KREA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg bot "$BOT_ID" '{bot_ids: [$bot]}')"
```

Removing takes no body and returns `{ "chat_id": "...", "removed": { "kind": "bot", "id": "..." }, "left": false }`:

| Request | Who can call it |
| - | - |
| `DELETE /bots/chats/{chat_id}/bots/{bot_id}` | The person who started the chat, or the bot's owner. |
| `DELETE /bots/chats/{chat_id}/members/{member_id}` | The person who started the chat, for anyone else in it. |
| `DELETE /bots/chats/{chat_id}/members/{your_user_id}` | Anyone except the person who started the chat. You leave the chat, and `left` is `true`. |

Anyone else gets `403` (`forbidden`). The person who started a chat cannot leave it, and a direct chat's bot cannot be removed; both return `400`. Delete the chat instead. Removing a bot or a person stops the work the bot was doing, or the work bots were doing for that person.

### Delete a chat

`DELETE /bots/chats/{chat_id}` deletes a direct or group chat for everyone in it and returns `{ "chat_id": "...", "deleted": true }`. Only the person who started the chat or a workspace admin can delete it; anyone else in the chat gets `403` (`forbidden`). Every bot turn and helper working in the chat stops. A deleted chat returns `404` from then on, and opening a direct chat with the same bot again starts a new one.

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
curl --fail-with-body --silent --show-error -X DELETE \
  "https://api.krea.ai/bots/chats/$CHAT_ID" \
  -H "Authorization: Bearer $KREA_API_KEY"
```

## Stop a turn

`POST /bots/chats/{chat_id}/stop` stops every bot working in the chat, and their helpers. Both body fields are optional:

| Field | Behavior |
| - | - |
| `bot_id` | Stop only this bot. In a group chat the other bots keep working, and the response still has `status: "working"` while they do. |
| `cursor` | The cursor to read from, as in a poll. |

```bash cURL theme={"theme":{"light":"github-light-default","dark":"vesper"}}
curl --fail-with-body --silent --show-error \
  "https://api.krea.ai/bots/chats/$CHAT_ID/stop" \
  -H "Authorization: Bearer $KREA_API_KEY" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --arg cursor "$CURSOR" '{cursor: $cursor}')"
```

The response is the state of the chat in the same shape as a poll, normally with `status: "stopped"` and `finished: true`.

## Out of compute units and usage limits

A send returns `202` even when the workspace has no compute units left, or when a usage limit is spent. The turn does not run. The hold shows when you read the chat:

```json theme={"theme":{"light":"github-light-default","dark":"vesper"}}
{
  "status": "failed",
  "finished": true,
  "error": { "code": "out_of_compute", "message": "..." },
  "out_of_compute_bot_ids": ["3f0c8a52-1d7e-4c3b-9a65-2b8e4f1d7c90"]
}
```

| `error.code` | Meaning |
| - | - |
| `out_of_compute` | The workspace ran out of compute units. The held bots are listed in `out_of_compute_bot_ids`. |
| `bot_usage_limit` | The bot reached its usage limit. |
| `chat_usage_limit` | The chat reached its usage limit. |

These three are billing holds, not faults. Other codes report a turn that failed: `refused`, `busy`, `timeout`, `provider`, `server`, `context`, `claude_billing`, and `unknown`.

After you add compute units, call `POST /bots/chats/{chat_id}/retry` to resume the held bots, or send a new message. Retry takes no body and returns `{ "retried": true, "out_of_compute": false }` when a bot resumed. While the balance is still empty it does nothing and returns `{ "retried": false, "out_of_compute": true }`. Poll again after a retry.

## Errors

Endpoint errors use `{ "error": "...", "code": "..." }`. Only `error` is required. A turn that fails after the send was accepted appears as `status: "failed"` in a successful read instead.

| HTTP status | Meaning |
| - | - |
| `400` | Malformed JSON body, or a request the chat refuses (`bad_request`), such as a cursor the chat did not return or an answer that does not fit the question. |
| `401` | Missing or invalid authentication. |
| `403` | Bots is not included in the workspace plan (`entitlement_denied`, with `required_plan`), or not open to this account (`bots_unavailable`). Or you may not make this change to the chat (`forbidden`), such as removing a bot you neither own nor brought into a chat you started. |
| `404` | Bot, chat, or question is missing or not accessible (`not_found`), including chats you do not belong to. Or a Krea file attachment is missing or not accessible (`attachment_not_found`). |
| `409` | The chat changed under the request, or a stop has not settled yet (`conflict`). Try again in a moment. |
| `422` | Invalid input: `{ "error": "Validation failed", "details": [...] }`. Unknown body fields are rejected. |
| `429` | Too many requests (`rate_limited`). |

The `429` limit only guards against runaway clients: 60 writes and 600 reads per minute per user. Writes are start, send, answer, stop, retry, delete, and adding or removing bots and people. Long polling with `wait=30` stays far below the read limit.

## Not in this version

* Creating, editing, or deleting bots, and bot settings. Manage bots in the Krea app.
* The vault.
* Webhooks and streaming. Poll with `wait` instead.
* Renaming or archiving a chat. Do that in the Krea app.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.