---
title: "Answer typed questions about a state"
method: POST
path: "/decision/create"
tags: ["Decision"]
---

# Answer typed questions about a state

`POST /decision/create`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/decision/create`
- Auth: HTTP bearer

## Request body

- object
  - `model` string: The decision model to use
  - `state` union, required: The content to decide about, as text or a JSON object or array of related context
    - string
    - object
    - unknown[]
      - unknown
  - `questions` object, required: The questions to answer keyed by a name of your choice

## Response `200`

The decision was created successfully

- object
  - `answers` object, required: The answers keyed by the question names
  - `usage` object, required
    - `model` string, required: The model that answered
    - `inputTokens` number, required
    - `outputTokens` number, required

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
