---
title: "create"
method: POST
path: "/api/chat_interfaces"
tags: ["ChatInterface"]
---

# create

`POST /api/chat_interfaces`

## Request body

- object
  - `data` object, required
    - `type` string, required
    - `attributes` object, required
      - `projectId` string, required
      - `name` string, required
      - `textInputEnabled` boolean, required
      - `textInputAgentId` string, nullable
      - `chatInterfaceButtons` object[]
        - `agentId` string, required
        - `label` string, required
        - `prompt` string, required

## Response `201`

creates a chat_interface with buttons

## Other responses

- `400` — POST /api/chat_interfaces rejects {"createdAt":1}
- `401` — Rejected by 401
- `422` — returns button index in validation errors for labels longer than 100 characters

---

[API](https://skmtc.net/treasure/apis/llm-api.md) · [All operations](https://skmtc.net/treasure/apis/llm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/treasure/llm-api/revisions/56f275763358/schema)
