# Chat

> > This page is auto-generated from the formations OpenAPI spec.
> Do not edit manually — run `pnpm generate-formations-resource-docs` to regenerate.

# Chat

> This page is auto-generated from the formations OpenAPI spec.
> Do not edit manually — run `pnpm generate-formations-resource-docs` to regenerate.

Creates a chat within the formation's project, connected either to an AI provider or — by declaring no provider — to the project's `default_model_route_id`.

## Syntax

```yaml
type: chat
properties:
  ai_provider_id: String
  name: String
  instructions: String
  model: String
```

## Output

The physical resource ID is the **public ID** of the created resource. Reference it from other resources with a `ref` expression:

```yaml
      some_field:
        ref: MyChat
```

## Properties

**`ai_provider_id`**

Public ID of the AI provider to use for this chat. Omit (or declare `null`) to inherit the project's `default_model_route_id`, which requires the project to have one and cannot be combined with `model`.

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`name`**

Human-readable label for the chat

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`instructions`**

System message to set the assistant behaviour

_Required_: No
_Type_: String
_Nullable_: Yes

---

**`model`**

Model override; defaults to the AI provider's default model

_Required_: No
_Type_: String
_Nullable_: Yes

---
